gina 0.1.6-alpha.67 → 0.1.6-alpha.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/framework/v0.1.6-alpha.68/VERSION +1 -0
- package/framework/v0.1.6-alpha.68/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
- package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/js/gina.js +37 -4
- package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +476 -475
- package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +5 -5
- package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +2 -2
- package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/validator/src/main.js +37 -4
- package/package.json +2 -2
- package/framework/v0.1.6-alpha.67/VERSION +0 -1
- package/framework/v0.1.6-alpha.67/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/AUTHORS +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/config.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/controller/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/controller/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/.travis.yml +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/deps/encoding/encoding-indexes.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/deps/encoding/encoding.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/lib/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/lib/types/multipart.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/lib/utils.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-0.2.14/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/.github/workflows/ci.yml +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/.github/workflows/lint.yml +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/lib/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/lib/types/multipart.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/lib/utils.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/busboy-1.6.0/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/dev/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/gna.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/src/make.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/src/resources/currency.csv +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/src/resources/region.csv +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/locales/src/resources/region.mapping.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/mime.types +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/model/entity.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/model/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/model/template/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/file/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/intl/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/plugins/lib/validator/src/form-validator.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/router.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/server.express.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/server.isaac.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/server.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/status.codes +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/env.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/conf/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/console.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/context.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/data/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/json/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/path.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/prototypes.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/task.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/helpers/text.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/archiver/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/add.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/start.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/init.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/helper.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/collection/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/collection/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/collection/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/collection/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/config.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cron/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/dist/public_suffix_list.dat +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/exemples/backend.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/exemples/frontend.html +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/generator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/example/protected_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/example/simple_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/logger/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/math/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/example/merge.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/example/merge_2_literal objects.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/example/merge_and_preserve_first.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/model.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/proc.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/routing/build.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/routing/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/routing/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/shell.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/swig-filters/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/url/README.md +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/url/index.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/url/mocks.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/url/test.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/lib/validator.js +0 -0
- /package/framework/{v0.1.6-alpha.67 → v0.1.6-alpha.68}/package.json +0 -0
|
@@ -7,60 +7,60 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var requirejs,require,define;
|
|
9
9
|
(function(B,Q){function V(Fa,Pa){return Pa||''}function la(Fa){return'[object Function]'===Ea.call(Fa)}function U(Fa){return'[object Array]'===Ea.call(Fa)}function N(Fa,Pa){if(Fa){var Ya;for(Ya=0;Ya<Fa.length&&(!Fa[Ya]||!Pa(Fa[Ya],Ya,Fa));Ya+=1);}}function ha(Fa,Pa){if(Fa){var Ya;for(Ya=Fa.length-1;-1<Ya&&(!Fa[Ya]||!Pa(Fa[Ya],Ya,Fa));--Ya);}}function R(Fa,Pa){return W.call(Fa,Pa)}function S(Fa,Pa){return R(Fa,Pa)&&Fa[Pa]}function u(Fa,Pa){for(var Ya in Fa)if(R(Fa,Ya)&&-1==Ia.indexOf(Ya)&&Pa(Fa[Ya],
|
|
10
|
-
Ya))break}function I(Fa,Pa,Ya,pb){Pa&&u(Pa,function(bb,qb){if(Ya||!R(Fa,qb))!pb||'object'!==typeof bb||!bb||U(bb)||la(bb)||bb instanceof RegExp?Fa[qb]=bb:(Fa[qb]||(Fa[qb]={}),I(Fa[qb],bb,Ya,pb))});return Fa}function
|
|
11
|
-
pb;Ya&&(Pa.originalError=Ya);return Pa}function L(){if(y&&'interactive'===y.readyState)return y;ha(document.getElementsByTagName('script'),function(Fa){if('interactive'===Fa.readyState)return y=Fa});return y}var A,E,n,y,z,F,
|
|
10
|
+
Ya))break}function I(Fa,Pa,Ya,pb){Pa&&u(Pa,function(bb,qb){if(Ya||!R(Fa,qb))!pb||'object'!==typeof bb||!bb||U(bb)||la(bb)||bb instanceof RegExp?Fa[qb]=bb:(Fa[qb]||(Fa[qb]={}),I(Fa[qb],bb,Ya,pb))});return Fa}function v(Fa,Pa){return function(){return Pa.apply(Fa,arguments)}}function za(Fa){throw Fa;}function va(Fa){if(!Fa)return Fa;var Pa=B;N(Fa.split('.'),function(Ya){Pa=Pa[Ya]});return Pa}function P(Fa,Pa,Ya,pb){Pa=Error(Pa+'\nhttps://requirejs.org/docs/errors.html#'+Fa);Pa.requireType=Fa;Pa.requireModules=
|
|
11
|
+
pb;Ya&&(Pa.originalError=Ya);return Pa}function L(){if(y&&'interactive'===y.readyState)return y;ha(document.getElementsByTagName('script'),function(Fa){if('interactive'===Fa.readyState)return y=Fa});return y}var A,E,n,y,z,F,w,x=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,G=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,M=/\.js$/,T=/^\.\//;var ra=Object.prototype;var Ea=ra.toString,W=ra.hasOwnProperty,ia=!('undefined'===typeof window||'undefined'===typeof navigator||!window.document),ea=!ia&&'undefined'!==
|
|
12
12
|
typeof importScripts,Aa=ia&&'PLAYSTATION 3'===navigator.platform?/^complete$/:/^(complete|loaded)$/,ma='undefined'!==typeof opera&&'[object Opera]'===opera.toString(),sa={},Da={},Qa=[],Ja=!1,Ia=['__proto__','constructor'];if('undefined'===typeof define){if('undefined'!==typeof requirejs){if(la(requirejs))return;Da=requirejs;requirejs=void 0}'undefined'===typeof require||la(require)||(Da=require,require=void 0);var Ha=requirejs=function(Fa,Pa,Ya,pb){var bb='_';if(!U(Fa)&&'string'!==typeof Fa){var qb=
|
|
13
|
-
Fa;U(Pa)?(Fa=Pa,Pa=Ya,Ya=pb):Fa=[]}qb&&qb.context&&(bb=qb.context);(pb=S(sa,bb))||(pb=sa[bb]=Ha.s.newContext(bb));qb&&pb.configure(qb);return pb.require(Fa,Pa,Ya)};Ha.config=function(Fa){return Ha(Fa)};Ha.nextTick='undefined'!==typeof Q?function(Fa){Q(Fa,4)}:function(Fa){Fa()};require||=Ha;Ha.version='2.3.7';Ha.jsExtRegExp=/^\/|:|\?|\.js$/;Ha.isBrowser=ia;
|
|
14
|
-
H.length-1;h.nodeIdCompat&&M.test(H[Ta])&&(H[Ta]=H[Ta].replace(M,''));'.'===H[0].charAt(0)&&ka&&(Ta=ka.slice(0,ka.length-1),H=Ta.concat(H));Ta=H;for(Y=0;Y<Ta.length;Y++){var $a=Ta[Y];'.'===$a?(Ta.splice(Y,1),--Y):'..'===$a&&0!==Y&&(1!==Y||'..'!==Ta[2])&&'..'!==Ta[Y-1]&&0<Y&&(Ta.splice(Y-1,2),Y-=2)}H=H.join('/')}if(
|
|
15
|
-
|
|
16
|
-
!0}function bb(H){var ka=H?H.indexOf('!'):-1;if(-1<ka){var
|
|
17
|
-
(
|
|
18
|
-
(Y=!0,
|
|
19
|
-
Y=[],
|
|
13
|
+
Fa;U(Pa)?(Fa=Pa,Pa=Ya,Ya=pb):Fa=[]}qb&&qb.context&&(bb=qb.context);(pb=S(sa,bb))||(pb=sa[bb]=Ha.s.newContext(bb));qb&&pb.configure(qb);return pb.require(Fa,Pa,Ya)};Ha.config=function(Fa){return Ha(Fa)};Ha.nextTick='undefined'!==typeof Q?function(Fa){Q(Fa,4)}:function(Fa){Fa()};require||=Ha;Ha.version='2.3.7';Ha.jsExtRegExp=/^\/|:|\?|\.js$/;Ha.isBrowser=ia;ra=Ha.s={contexts:sa,newContext:function(Fa){function Pa(H,ka,wa){var Y;ka=ka&&ka.split('/');var pa=h.map,Ka=pa&&pa['*'];if(H){H=H.split('/');var Ta=
|
|
14
|
+
H.length-1;h.nodeIdCompat&&M.test(H[Ta])&&(H[Ta]=H[Ta].replace(M,''));'.'===H[0].charAt(0)&&ka&&(Ta=ka.slice(0,ka.length-1),H=Ta.concat(H));Ta=H;for(Y=0;Y<Ta.length;Y++){var $a=Ta[Y];'.'===$a?(Ta.splice(Y,1),--Y):'..'===$a&&0!==Y&&(1!==Y||'..'!==Ta[2])&&'..'!==Ta[Y-1]&&0<Y&&(Ta.splice(Y-1,2),Y-=2)}H=H.join('/')}if(wa&&pa&&(ka||Ka)){Ta=H.split('/');Y=Ta.length;a:for(;0<Y;--Y){var Ab=Ta.slice(0,Y).join('/');if(ka)for($a=ka.length;0<$a;--$a)if(wa=S(pa,ka.slice(0,$a).join('/')))if(wa=S(wa,Ab)){var Bb=
|
|
15
|
+
wa;var gb=Y;break a}if(!Hb&&Ka&&S(Ka,Ab)){var Hb=S(Ka,Ab);var Wa=Y}}!Bb&&Hb&&(Bb=Hb,gb=Wa);Bb&&(Ta.splice(0,gb,Bb),H=Ta.join('/'))}return(Bb=S(h.pkgs,H))?Bb:H}function Ya(H){ia&&N(document.getElementsByTagName('script'),function(ka){if(ka.getAttribute('data-requiremodule')===H&&ka.getAttribute('data-requirecontext')===Ba.contextName)return ka.parentNode.removeChild(ka),!0})}function pb(H){var ka=S(h.paths,H);if(ka&&U(ka)&&1<ka.length)return ka.shift(),Ba.require.undef(H),Ba.makeRequire(null,{skipMap:!0})([H]),
|
|
16
|
+
!0}function bb(H){var ka=H?H.indexOf('!'):-1;if(-1<ka){var wa=H.substring(0,ka);H=H.substring(ka+1,H.length)}return[wa,H]}function qb(H,ka,wa,Y){var pa=null,Ka=ka?ka.name:null,Ta=H,$a=!0,Ab='';H||($a=!1,H='_@r'+(aa+=1));H=bb(H);pa=H[0];H=H[1];if(pa){pa=Pa(pa,Ka,Y);var Bb=S(p,pa)}if(H)if(pa)Ab=wa?H:Bb&&Bb.normalize?Bb.normalize(H,function(Hb){return Pa(Hb,Ka,Y)}):-1===H.indexOf('!')?Pa(H,Ka,Y):H;else{Ab=Pa(H,Ka,Y);H=bb(Ab);pa=H[0];Ab=H[1];wa=!0;var gb=Ba.nameToUrl(Ab)}wa=!pa||Bb||wa?'':'_unnormalized'+
|
|
17
|
+
(xa+=1);return{prefix:pa,name:Ab,parentMap:ka,unnormalized:!!wa,url:gb,originalName:Ta,isDefine:$a,id:(pa?pa+'!'+Ab:Ab)+wa}}function Vb(H){var ka=H.id,wa=S(e,ka);wa||=e[ka]=new Ba.Module(H);return wa}function wb(H,ka,wa){var Y=H.id,pa=S(e,Y);if(!R(p,Y)||pa&&!pa.defineEmitComplete)if(pa=Vb(H),pa.error&&'error'===ka)wa(pa.error);else pa.on(ka,wa);else'defined'===ka&&wa(p[Y])}function nb(H,ka){var wa=H.requireModules,Y=!1;if(ka)ka(H);else if(N(wa,function(pa){if(pa=S(e,pa))pa.error=H,pa.events.error&&
|
|
18
|
+
(Y=!0,pa.emit('error',H))}),!Y)Ha.onError(H)}function xb(){Qa.length&&(N(Qa,function(H){var ka=H[0];'string'===typeof ka&&(Ba.defQueueMap[ka]=!0);m.push(H)}),Qa=[])}function yb(H){delete e[H];delete b[H]}function La(H,ka,wa){var Y=H.map.id;H.error?H.emit('error',H.error):(ka[Y]=!0,N(H.depMaps,function(pa,Ka){pa=pa.id;var Ta=S(e,pa);!Ta||H.depMatched[Ka]||wa[pa]||(S(ka,pa)?(H.defineDep(Ka,p[pa]),H.check()):La(Ta,ka,wa))}),wa[Y]=!0)}function db(){var H,ka,wa=(H=1E3*h.waitSeconds)&&Ba.startTime+H<(new Date).getTime(),
|
|
19
|
+
Y=[],pa=[],Ka=!1,Ta=!0;if(!ca){ca=!0;u(b,function($a){var Ab=$a.map,Bb=Ab.id;if($a.enabled&&(Ab.isDefine||pa.push($a),!$a.error))if(!$a.inited&&wa)pb(Bb)?Ka=ka=!0:(Y.push(Bb),Ya(Bb));else if(!$a.inited&&$a.fetched&&Ab.isDefine&&(Ka=!0,!Ab.prefix))return Ta=!1});if(wa&&Y.length)return H=P('timeout','Load timeout for modules: '+Y,null,Y),H.contextName=Ba.contextName,nb(H);Ta&&N(pa,function($a){La($a,{},{})});wa&&!ka||!Ka||!ia&&!ea||l||(l=Q(function(){l=0;db()},50));ca=!1}}function Gb(H){R(p,H[0])||
|
|
20
20
|
Vb(qb(H[0],null,!0)).init(H[1],H[2])}function Ub(H){H=H.currentTarget||H.srcElement;var ka=Ba.onScriptLoad;H.detachEvent&&!ma?H.detachEvent('onreadystatechange',ka):H.removeEventListener('load',ka,!1);ka=Ba.onScriptError;H.detachEvent&&!ma||H.removeEventListener('error',ka,!1);return{node:H,id:H&&H.getAttribute('data-requiremodule')}}function pc(){for(xb();m.length;){var H=m.shift();if(null===H[0])return nb(P('mismatch','Mismatched anonymous define() module: '+H[H.length-1]));Gb(H)}Ba.defQueueMap=
|
|
21
|
-
{}}var ca,l,h={waitSeconds:7,baseUrl:'./',paths:{},bundles:{},pkgs:{},shim:{},config:{}},e={},b={},q={},m=[],p={},O={},D={},aa=1,
|
|
22
|
-
{})}}};var oa=function(H){this.events=S(q,H.id)||{};this.map=H;this.shim=S(h.shim,H.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};oa.prototype={init:function(H,ka,
|
|
23
|
-
ka){this.depMatched[H]||(this.depMatched[H]=!0,--this.depCount,this.depExports[H]=ka)},fetch:function(){if(!this.fetched){this.fetched=!0;Ba.startTime=(new Date).getTime();var H=this.map;if(this.shim)Ba.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],
|
|
24
|
-
this.map.id;var ka=this.depExports;var
|
|
25
|
-
this.map,
|
|
26
|
-
this.map,ka=H.id,
|
|
27
|
-
if(Y=S(e,Ab.id)){this.depMaps.push(Ab);if(this.events.error)Y.on('error',
|
|
28
|
-
Hb&&(
|
|
29
|
-
!1,!this.skipMap);this.depMaps[ka]=H;if(
|
|
30
|
-
on:function(H,ka){var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'Invalid require call'),
|
|
34
|
-
|
|
35
|
-
H.id)&&Vb(H).enable()},completeLoad:function(H){var ka=S(h.shim,H)||{},
|
|
36
|
-
H+(ka||'');else{Y=h.paths;var
|
|
37
|
-
H.srcElement).readyState))y=null,H=Ub(H),Ba.completeLoad(H.id)},onScriptError:function(H){var ka=Ub(H);if(!pb(ka.id)){var
|
|
38
|
-
arguments)}});if(ia){var mb=
|
|
21
|
+
{}}var ca,l,h={waitSeconds:7,baseUrl:'./',paths:{},bundles:{},pkgs:{},shim:{},config:{}},e={},b={},q={},m=[],p={},O={},D={},aa=1,xa=1;var ba={require:function(H){return H.require?H.require:H.require=Ba.makeRequire(H.map)},exports:function(H){H.usingExports=!0;if(H.map.isDefine)return H.exports?p[H.map.id]=H.exports:H.exports=p[H.map.id]={}},module:function(H){return H.module?H.module:H.module={id:H.map.id,uri:H.map.url,config:function(){return S(h.config,H.map.id)||{}},exports:H.exports||(H.exports=
|
|
22
|
+
{})}}};var oa=function(H){this.events=S(q,H.id)||{};this.map=H;this.shim=S(h.shim,H.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};oa.prototype={init:function(H,ka,wa,Y){Y=Y||{};if(!this.inited){this.factory=ka;if(wa)this.on('error',wa);else this.events.error&&(wa=v(this,function(pa){this.emit('error',pa)}));this.depMaps=H&&H.slice(0);this.errback=wa;this.inited=!0;this.ignore=Y.ignore;Y.enabled||this.enabled?this.enable():this.check()}},defineDep:function(H,
|
|
23
|
+
ka){this.depMatched[H]||(this.depMatched[H]=!0,--this.depCount,this.depExports[H]=ka)},fetch:function(){if(!this.fetched){this.fetched=!0;Ba.startTime=(new Date).getTime();var H=this.map;if(this.shim)Ba.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],v(this,function(){return H.prefix?this.callPlugin():this.load()}));else return H.prefix?this.callPlugin():this.load()}},load:function(){var H=this.map.url;O[H]||(O[H]=!0,Ba.load(this.map.id,H))},check:function(){if(this.enabled&&!this.enabling){var H=
|
|
24
|
+
this.map.id;var ka=this.depExports;var wa=this.exports,Y=this.factory;if(!this.inited)R(Ba.defQueueMap,H)||this.fetch();else if(this.error)this.emit('error',this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(la(Y)){if(this.events.error&&this.map.isDefine||Ha.onError!==za)try{wa=Ba.execCb(H,Y,ka,wa)}catch(Ta){var pa=Ta}else wa=Ba.execCb(H,Y,ka,wa);this.map.isDefine&&void 0===wa&&((ka=this.module)?wa=ka.exports:this.usingExports&&(wa=this.exports));if(pa)return pa.requireMap=
|
|
25
|
+
this.map,pa.requireModules=this.map.isDefine?[this.map.id]:null,pa.requireType=this.map.isDefine?'define':'require',nb(this.error=pa)}else wa=Y;this.exports=wa;if(this.map.isDefine&&!this.ignore&&(p[H]=wa,Ha.onResourceLoad)){var Ka=[];N(this.depMaps,function(Ta){Ka.push(Ta.normalizedMap||Ta)});Ha.onResourceLoad(Ba,this.map,Ka)}yb(H);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit('defined',this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var H=
|
|
26
|
+
this.map,ka=H.id,wa=qb(H.prefix);this.depMaps.push(wa);wb(wa,'defined',v(this,function(Y){var pa=S(D,this.map.id),Ka=this.map.name,Ta=this.map.parentMap?this.map.parentMap.name:null,$a=Ba.makeRequire(H.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){Y.normalize&&(Ka=Y.normalize(Ka,function(gb){return Pa(gb,Ta,!0)})||'');var Ab=qb(H.prefix+'!'+Ka,this.map.parentMap,!0);wb(Ab,'defined',v(this,function(gb){this.map.normalizedMap=Ab;this.init([],function(){return gb},null,{enabled:!0,ignore:!0})}));
|
|
27
|
+
if(Y=S(e,Ab.id)){this.depMaps.push(Ab);if(this.events.error)Y.on('error',v(this,function(gb){this.emit('error',gb)}));Y.enable()}}else if(pa)this.map.url=Ba.nameToUrl(pa),this.load();else{var Bb=v(this,function(gb){this.init([],function(){return gb},null,{enabled:!0})});Bb.error=v(this,function(gb){this.inited=!0;this.error=gb;gb.requireModules=[ka];u(e,function(Hb){0===Hb.map.id.indexOf(ka+'_unnormalized')&&yb(Hb.map.id)});nb(gb)});Bb.fromText=v(this,function(gb,Hb){var Wa=H.name,cb=qb(Wa),fa=Ja;
|
|
28
|
+
Hb&&(gb=Hb);fa&&(Ja=!1);Vb(cb);R(h.config,ka)&&(h.config[Wa]=h.config[ka]);try{Ha.exec(gb)}catch(X){return nb(P('fromtexteval','fromText eval for '+ka+' failed: '+X,X,[ka]))}fa&&(Ja=!0);this.depMaps.push(cb);Ba.completeLoad(Wa);$a([Wa],Bb)});Y.load(H.name,$a,Bb,h)}}));Ba.enable(wa,this);this.pluginMaps[wa.id]=wa},enable:function(){b[this.map.id]=this;this.enabling=this.enabled=!0;N(this.depMaps,v(this,function(H,ka){var wa;if('string'===typeof H){H=qb(H,this.map.isDefine?this.map:this.map.parentMap,
|
|
29
|
+
!1,!this.skipMap);this.depMaps[ka]=H;if(wa=S(ba,H.id)){this.depExports[ka]=wa(this);return}this.depCount+=1;wb(H,'defined',v(this,function(pa){this.undefed||(this.defineDep(ka,pa),this.check())}));this.errback?wb(H,'error',v(this,this.errback)):this.events.error&&wb(H,'error',v(this,function(pa){this.emit('error',pa)}))}wa=H.id;var Y=e[wa];R(ba,wa)||!Y||Y.enabled||Ba.enable(H,this)}));u(this.pluginMaps,v(this,function(H){var ka=S(e,H.id);ka&&!ka.enabled&&Ba.enable(H,this)}));this.enabling=!1;this.check()},
|
|
30
|
+
on:function(H,ka){var wa=this.events[H];wa||=this.events[H]=[];wa.push(ka)},emit:function(H,ka){N(this.events[H],function(wa){wa(ka)});'error'===H&&delete this.events[H]}};var Ba={config:h,contextName:Fa,registry:e,defined:p,urlFetched:O,defQueue:m,defQueueMap:{},Module:oa,makeModuleMap:qb,nextTick:Ha.nextTick,onError:nb,configure:function(H){H.baseUrl&&'/'!==H.baseUrl.charAt(H.baseUrl.length-1)&&(H.baseUrl+='/');if('string'===typeof H.urlArgs){var ka=H.urlArgs;H.urlArgs=function(pa,Ka){return(-1===
|
|
31
|
+
Ka.indexOf('?')?'?':'&')+ka}}var wa=h.shim,Y={paths:!0,bundles:!0,config:!0,map:!0};u(H,function(pa,Ka){Y[Ka]?(h[Ka]||(h[Ka]={}),I(h[Ka],pa,!0,!0)):h[Ka]=pa});H.bundles&&u(H.bundles,function(pa,Ka){N(pa,function(Ta){Ta!==Ka&&(D[Ta]=Ka)})});H.shim&&(u(H.shim,function(pa,Ka){U(pa)&&(pa={deps:pa});!pa.exports&&!pa.init||pa.exportsFn||(pa.exportsFn=Ba.makeShimExports(pa));wa[Ka]=pa}),h.shim=wa);H.packages&&N(H.packages,function(pa){pa='string'===typeof pa?{name:pa}:pa;var Ka=pa.name;pa.location&&(h.paths[Ka]=
|
|
32
|
+
pa.location);h.pkgs[Ka]=pa.name+'/'+(pa.main||'main').replace(T,'').replace(M,'')});u(e,function(pa,Ka){pa.inited||pa.map.unnormalized||(pa.map=qb(Ka,null,!0))});(H.deps||H.callback)&&Ba.require(H.deps||[],H.callback)},makeShimExports:function(H){return function(){var ka;H.init&&(ka=H.init.apply(B,arguments));return ka||H.exports&&va(H.exports)}},makeRequire:function(H,ka){function wa(Y,pa,Ka){var Ta;ka.enableBuildCallback&&pa&&la(pa)&&(pa.__requireJsBuild=!0);if('string'===typeof Y){if(la(pa))return nb(P('requireargs',
|
|
33
|
+
'Invalid require call'),Ka);if(H&&R(ba,Y))return ba[Y](e[H.id]);if(Ha.get)return Ha.get(Ba,Y,H,wa);var $a=qb(Y,H,!1,!0);$a=$a.id;return R(p,$a)?p[$a]:nb(P('notloaded','Module name "'+$a+'" has not been loaded yet for context: '+Fa+(H?'':'. Use require([])')))}pc();Ba.nextTick(function(){pc();Ta=Vb(qb(null,H));Ta.skipMap=ka.skipMap;Ta.init(Y,pa,Ka,{enabled:!0});db()});return wa}ka=ka||{};I(wa,{isBrowser:ia,toUrl:function(Y){var pa=Y.lastIndexOf('.'),Ka=Y.split('/')[0];if(-1!==pa&&('.'!==Ka&&'..'!==
|
|
34
|
+
Ka||1<pa)){var Ta=Y.substring(pa,Y.length);Y=Y.substring(0,pa)}return Ba.nameToUrl(Pa(Y,H&&H.id,!0),Ta,!0)},defined:function(Y){return R(p,qb(Y,H,!1,!0).id)},specified:function(Y){Y=qb(Y,H,!1,!0).id;return R(p,Y)||R(e,Y)}});H||(wa.undef=function(Y){xb();var pa=qb(Y,H,!0),Ka=S(e,Y);Ka.undefed=!0;Ya(Y);delete p[Y];delete O[pa.url];delete q[Y];ha(m,function(Ta,$a){Ta[0]===Y&&m.splice($a,1)});delete Ba.defQueueMap[Y];Ka&&(Ka.events.defined&&(q[Y]=Ka.events),yb(Y))});return wa},enable:function(H){S(e,
|
|
35
|
+
H.id)&&Vb(H).enable()},completeLoad:function(H){var ka=S(h.shim,H)||{},wa=ka.exports;for(xb();m.length;){var Y=m.shift();if(null===Y[0]){Y[0]=H;if(pa)break;var pa=!0}else Y[0]===H&&(pa=!0);Gb(Y)}Ba.defQueueMap={};Y=S(e,H);if(!pa&&!R(p,H)&&Y&&!Y.inited)if(!h.enforceDefine||wa&&va(wa))Gb([H,ka.deps||[],ka.exportsFn]);else return pb(H)?void 0:nb(P('nodefine','No define call for '+H,null,[H]));db()},nameToUrl:function(H,ka,wa){var Y,pa;(Y=S(h.pkgs,H))&&(H=Y);if(Y=S(D,H))return Ba.nameToUrl(Y,ka,wa);if(Ha.jsExtRegExp.test(H))Y=
|
|
36
|
+
H+(ka||'');else{Y=h.paths;var Ka=H.split('/');for(pa=Ka.length;0<pa;--pa){var Ta=Ka.slice(0,pa).join('/');if(Ta=S(Y,Ta)){U(Ta)&&(Ta=Ta[0]);Ka.splice(0,pa,Ta);break}}Y=Ka.join('/');Y+=ka||(/^data:|^blob:|\?/.test(Y)||wa?'':'.js');Y=('/'===Y.charAt(0)||Y.match(/^[\w\+\.\-]+:/)?'':h.baseUrl)+Y}return h.urlArgs&&!/^blob:/.test(Y)?Y+h.urlArgs(H,Y):Y},load:function(H,ka){Ha.load(Ba,H,ka)},execCb:function(H,ka,wa,Y){return ka.apply(Y,wa)},onScriptLoad:function(H){if('load'===H.type||Aa.test((H.currentTarget||
|
|
37
|
+
H.srcElement).readyState))y=null,H=Ub(H),Ba.completeLoad(H.id)},onScriptError:function(H){var ka=Ub(H);if(!pb(ka.id)){var wa=[];u(e,function(Y,pa){0!==pa.indexOf('_@r')&&N(Y.depMaps,function(Ka){if(Ka.id===ka.id)return wa.push(pa),!0})});return nb(P('scripterror','Script error for "'+ka.id+(wa.length?'", needed by: '+wa.join(', '):'"'),H,[ka.id]))}}};Ba.require=Ba.makeRequire();return Ba}};Ha({});N(['toUrl','undef','defined','specified'],function(Fa){Ha[Fa]=function(){var Pa=sa._;return Pa.require[Fa].apply(Pa,
|
|
38
|
+
arguments)}});if(ia){var mb=ra.head=document.getElementsByTagName('head')[0];if(A=document.getElementsByTagName('base')[0])mb=ra.head=A.parentNode}Ha.onError=za;Ha.createNode=function(Fa,Pa,Ya){Pa=Fa.xhtml?document.createElementNS('http://www.w3.org/1999/xhtml','html:script'):document.createElement('script');Pa.type=Fa.scriptType||'text/javascript';Pa.charset='utf-8';Pa.async=!0;return Pa};Ha.load=function(Fa,Pa,Ya){var pb=Fa&&Fa.config||{};if(ia){var bb=Ha.createNode(pb,Pa,Ya);bb.setAttribute('data-requirecontext',
|
|
39
39
|
Fa.contextName);bb.setAttribute('data-requiremodule',Pa);!bb.attachEvent||bb.attachEvent.toString&&0>bb.attachEvent.toString().indexOf('[native code')||ma?(bb.addEventListener('load',Fa.onScriptLoad,!1),bb.addEventListener('error',Fa.onScriptError,!1)):(Ja=!0,bb.attachEvent('onreadystatechange',Fa.onScriptLoad));bb.src=Ya;if(pb.onNodeCreated)pb.onNodeCreated(bb,pb,Pa,Ya);z=bb;A?mb.insertBefore(bb,A):mb.appendChild(bb);z=null;return bb}if(ea)try{Q(function(){},0),importScripts(Ya),Fa.completeLoad(Pa)}catch(qb){Fa.onError(P('importscripts',
|
|
40
|
-
'importScripts failed for '+Pa+' at '+Ya,qb,[Pa]))}};ia&&!Da.skipDataMain&&ha(document.getElementsByTagName('script'),function(Fa){mb||(mb=Fa.parentNode);if(E=Fa.getAttribute('data-main'))return F=E,Da.baseUrl||-1!==F.indexOf('!')||(n=F.split('/'),F=n.pop(),
|
|
40
|
+
'importScripts failed for '+Pa+' at '+Ya,qb,[Pa]))}};ia&&!Da.skipDataMain&&ha(document.getElementsByTagName('script'),function(Fa){mb||(mb=Fa.parentNode);if(E=Fa.getAttribute('data-main'))return F=E,Da.baseUrl||-1!==F.indexOf('!')||(n=F.split('/'),F=n.pop(),w=n.length?n.join('/')+'/':'./',Da.baseUrl=w),F=F.replace(M,''),Ha.jsExtRegExp.test(F)&&(F=E),Da.deps=Da.deps?Da.deps.concat(F):[F],!0});define=function(Fa,Pa,Ya){var pb;'string'!==typeof Fa&&(Ya=Pa,Pa=Fa,Fa=null);U(Pa)||(Ya=Pa,Pa=null);!Pa&&la(Ya)&&
|
|
41
41
|
(Pa=[],Ya.length&&(Ya.toString().replace(x,V).replace(G,function(qb,Vb){Pa.push(Vb)}),Pa=(1===Ya.length?['require']:['require','exports','module']).concat(Pa)));if(Ja&&(pb=z||L())){Fa||=pb.getAttribute('data-requiremodule');var bb=sa[pb.getAttribute('data-requirecontext')]}bb?(bb.defQueue.push([Fa,Pa,Ya]),bb.defQueueMap[Fa]=!0):Qa.push([Fa,Pa,Ya])};define.amd={jQuery:!0};Ha.exec=function(Fa){return eval(Fa)};Ha(Da)}})(this,'undefined'===typeof setTimeout?void 0:setTimeout);define('requireLib',function(){});
|
|
42
42
|
!function(B,Q){'object'==typeof exports&&'undefined'!=typeof module?Q(exports):'function'==typeof define&&define.amd?define('vendor/uuid',['exports'],Q):Q((B=B||self).uuid={})}(this,function(B){function Q(){if(!u)throw Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');return u(I)}function V(n,y){y=y||0;var z=va;return[z[n[y++]],z[n[y++]],z[n[y++]],z[n[y++]],'-',z[n[y++]],z[n[y++]],'-',z[n[y++]],z[n[y++]],'-',z[n[y++]],z[n[y++]],'-',z[n[y++]],
|
|
43
|
-
z[n[y++]],z[n[y++]],z[n[y++]],z[n[y++]],z[n[y++]]].join('')}function la(n,y,z){var F=function(
|
|
44
|
-
|
|
45
|
-
y,z,F,
|
|
46
|
-
x=[],G=32*F.length;for(
|
|
47
|
-
T=ha(T,x,G,M,F[
|
|
48
|
-
20,-373897302);x=R(x,G,M,T,F[
|
|
49
|
-
T,F[
|
|
50
|
-
F[
|
|
51
|
-
M,T,x,F[
|
|
52
|
-
F.charCodeAt(
|
|
53
|
-
Math.floor(G/20),ea=M<<5|M>>>27;a:{switch(ia){case 0:var Aa=T&
|
|
54
|
-
8&255,255&z[3],z[4]>>24&255,z[4]>>16&255,z[4]>>8&255,255&z[4]]});B.v1=function(n,y,z){z=y&&z||0;var F=y||[],
|
|
55
|
-
L=G;A=M;
|
|
43
|
+
z[n[y++]],z[n[y++]],z[n[y++]],z[n[y++]],z[n[y++]]].join('')}function la(n,y,z){var F=function(w,x,G,M){M=G&&M||0;if('string'==typeof w&&(w=function(T){T=unescape(encodeURIComponent(T));for(var ra=Array(T.length),Ea=0;Ea<T.length;Ea++)ra[Ea]=T.charCodeAt(Ea);return ra}(w)),'string'==typeof x&&(x=function(T){var ra=[];return T.replace(/[a-fA-F0-9]{2}/g,function(Ea){ra.push(parseInt(Ea,16))}),ra}(x)),!Array.isArray(w))throw TypeError('value must be an array of bytes');if(!Array.isArray(x)||16!==x.length)throw TypeError('namespace must be uuid string or an Array of 16 byte values');
|
|
44
|
+
w=z(x.concat(w));if(w[6]=15&w[6]|y,w[8]=63&w[8]|128,G)for(x=0;16>x;++x)G[M+x]=w[x];return G||V(w)};try{F.name=n}catch(w){}return F.DNS='6ba7b810-9dad-11d1-80b4-00c04fd430c8',F.URL='6ba7b811-9dad-11d1-80b4-00c04fd430c8',F}function U(n,y){var z=(65535&n)+(65535&y);return(n>>16)+(y>>16)+(z>>16)<<16|65535&z}function N(n,y,z,F,w,x){return U((G=U(U(y,n),U(F,x)))<<(M=w)|G>>>32-M,z);var G,M}function ha(n,y,z,F,w,x,G){return N(y&z|~y&F,n,y,w,x,G)}function R(n,y,z,F,w,x,G){return N(y&F|z&~F,n,y,w,x,G)}function S(n,
|
|
45
|
+
y,z,F,w,x,G){return N(z^(y|~F),n,y,w,x,G)}for(var u='undefined'!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||'undefined'!=typeof msCrypto&&'function'==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),I=new Uint8Array(16),v,za,va=[],P=0;256>P;++P)va[P]=(P+256).toString(16).substr(1);var L=0,A=0;P=la('v3',48,function(n){if('string'==typeof n){var y=unescape(encodeURIComponent(n));n=Array(y.length);for(var z=0;z<y.length;z++)n[z]=y.charCodeAt(z)}return function(F){var w,
|
|
46
|
+
x=[],G=32*F.length;for(w=0;w<G;w+=8){var M=F[w>>5]>>>w%32&255;M=parseInt('0123456789abcdef'.charAt(M>>>4&15)+'0123456789abcdef'.charAt(15&M),16);x.push(M)}return x}(function(F,w){F[w>>5]|=128<<w%32;F[14+(w+64>>>9<<4)]=w;var x=1732584193,G=-271733879,M=-1732584194,T=271733878;for(w=0;w<F.length;w+=16){var ra=x;var Ea=G;var W=M;var ia=T;x=ha(x,G,M,T,F[w],7,-680876936);T=ha(T,x,G,M,F[w+1],12,-389564586);M=ha(M,T,x,G,F[w+2],17,606105819);G=ha(G,M,T,x,F[w+3],22,-1044525330);x=ha(x,G,M,T,F[w+4],7,-176418897);
|
|
47
|
+
T=ha(T,x,G,M,F[w+5],12,1200080426);M=ha(M,T,x,G,F[w+6],17,-1473231341);G=ha(G,M,T,x,F[w+7],22,-45705983);x=ha(x,G,M,T,F[w+8],7,1770035416);T=ha(T,x,G,M,F[w+9],12,-1958414417);M=ha(M,T,x,G,F[w+10],17,-42063);G=ha(G,M,T,x,F[w+11],22,-1990404162);x=ha(x,G,M,T,F[w+12],7,1804603682);T=ha(T,x,G,M,F[w+13],12,-40341101);M=ha(M,T,x,G,F[w+14],17,-1502002290);G=ha(G,M,T,x,F[w+15],22,1236535329);x=R(x,G,M,T,F[w+1],5,-165796510);T=R(T,x,G,M,F[w+6],9,-1069501632);M=R(M,T,x,G,F[w+11],14,643717713);G=R(G,M,T,x,F[w],
|
|
48
|
+
20,-373897302);x=R(x,G,M,T,F[w+5],5,-701558691);T=R(T,x,G,M,F[w+10],9,38016083);M=R(M,T,x,G,F[w+15],14,-660478335);G=R(G,M,T,x,F[w+4],20,-405537848);x=R(x,G,M,T,F[w+9],5,568446438);T=R(T,x,G,M,F[w+14],9,-1019803690);M=R(M,T,x,G,F[w+3],14,-187363961);G=R(G,M,T,x,F[w+8],20,1163531501);x=R(x,G,M,T,F[w+13],5,-1444681467);T=R(T,x,G,M,F[w+2],9,-51403784);M=R(M,T,x,G,F[w+7],14,1735328473);G=R(G,M,T,x,F[w+12],20,-1926607734);x=N(G^M^T,x,G,F[w+5],4,-378558);T=N(x^G^M,T,x,F[w+8],11,-2022574463);M=N(T^x^G,M,
|
|
49
|
+
T,F[w+11],16,1839030562);G=N(M^T^x,G,M,F[w+14],23,-35309556);x=N(G^M^T,x,G,F[w+1],4,-1530992060);T=N(x^G^M,T,x,F[w+4],11,1272893353);M=N(T^x^G,M,T,F[w+7],16,-155497632);G=N(M^T^x,G,M,F[w+10],23,-1094730640);x=N(G^M^T,x,G,F[w+13],4,681279174);T=N(x^G^M,T,x,F[w],11,-358537222);M=N(T^x^G,M,T,F[w+3],16,-722521979);G=N(M^T^x,G,M,F[w+6],23,76029189);x=N(G^M^T,x,G,F[w+9],4,-640364487);T=N(x^G^M,T,x,F[w+12],11,-421815835);M=N(T^x^G,M,T,F[w+15],16,530742520);G=N(M^T^x,G,M,F[w+2],23,-995338651);x=S(x,G,M,T,
|
|
50
|
+
F[w],6,-198630844);T=S(T,x,G,M,F[w+7],10,1126891415);M=S(M,T,x,G,F[w+14],15,-1416354905);G=S(G,M,T,x,F[w+5],21,-57434055);x=S(x,G,M,T,F[w+12],6,1700485571);T=S(T,x,G,M,F[w+3],10,-1894986606);M=S(M,T,x,G,F[w+10],15,-1051523);G=S(G,M,T,x,F[w+1],21,-2054922799);x=S(x,G,M,T,F[w+8],6,1873313359);T=S(T,x,G,M,F[w+15],10,-30611744);M=S(M,T,x,G,F[w+6],15,-1560198380);G=S(G,M,T,x,F[w+13],21,1309151649);x=S(x,G,M,T,F[w+4],6,-145523070);T=S(T,x,G,M,F[w+11],10,-1120210379);M=S(M,T,x,G,F[w+2],15,718787259);G=S(G,
|
|
51
|
+
M,T,x,F[w+9],21,-343485551);x=U(x,ra);G=U(G,Ea);M=U(M,W);T=U(T,ia)}return[x,G,M,T]}(function(F){var w,x=[];x[(F.length>>2)-1]=void 0;for(w=0;w<x.length;w+=1)x[w]=0;var G=8*F.length;for(w=0;w<G;w+=8)x[w>>5]|=(255&F[w/8])<<w%32;return x}(n),8*n.length))});var E=la('v5',80,function(n){var y=[1518500249,1859775393,2400959708,3395469782],z=[1732584193,4023233417,2562383102,271733878,3285377520];if('string'==typeof n){var F=unescape(encodeURIComponent(n));n=Array(F.length);for(var w=0;w<F.length;w++)n[w]=
|
|
52
|
+
F.charCodeAt(w)}n.push(128);F=Math.ceil((n.length/4+2)/16);var x=Array(F);for(w=0;w<F;w++){x[w]=Array(16);for(var G=0;16>G;G++)x[w][G]=n[64*w+4*G]<<24|n[64*w+4*G+1]<<16|n[64*w+4*G+2]<<8|n[64*w+4*G+3]}x[F-1][14]=8*(n.length-1)/Math.pow(2,32);x[F-1][14]=Math.floor(x[F-1][14]);x[F-1][15]=8*(n.length-1)&4294967295;for(w=0;w<F;w++){n=Array(80);for(G=0;16>G;G++)n[G]=x[w][G];for(G=16;80>G;G++){var M=n[G-3]^n[G-8]^n[G-14]^n[G-16];n[G]=M<<1|M>>>31}M=z[0];var T=z[1],ra=z[2],Ea=z[3],W=z[4];for(G=0;80>G;G++){var ia=
|
|
53
|
+
Math.floor(G/20),ea=M<<5|M>>>27;a:{switch(ia){case 0:var Aa=T&ra^~T&Ea;break a;case 1:Aa=T^ra^Ea;break a;case 2:Aa=T&ra^T&Ea^ra&Ea;break a;case 3:Aa=T^ra^Ea;break a}Aa=void 0}ia=ea+Aa+W+y[ia]+n[G]>>>0;W=Ea;Ea=ra;ra=(T<<30|T>>>2)>>>0;T=M;M=ia}z[0]=z[0]+M>>>0;z[1]=z[1]+T>>>0;z[2]=z[2]+ra>>>0;z[3]=z[3]+Ea>>>0;z[4]=z[4]+W>>>0}return[z[0]>>24&255,z[0]>>16&255,z[0]>>8&255,255&z[0],z[1]>>24&255,z[1]>>16&255,z[1]>>8&255,255&z[1],z[2]>>24&255,z[2]>>16&255,z[2]>>8&255,255&z[2],z[3]>>24&255,z[3]>>16&255,z[3]>>
|
|
54
|
+
8&255,255&z[3],z[4]>>24&255,z[4]>>16&255,z[4]>>8&255,255&z[4]]});B.v1=function(n,y,z){z=y&&z||0;var F=y||[],w=(n=n||{}).node||v,x=void 0!==n.clockseq?n.clockseq:za;if(null==w||null==x){var G=n.random||(n.rng||Q)();null==w&&(w=v=[1|G[0],G[1],G[2],G[3],G[4],G[5]]);null==x&&(x=za=16383&(G[6]<<8|G[7]))}G=void 0!==n.msecs?n.msecs:(new Date).getTime();var M=void 0!==n.nsecs?n.nsecs:A+1,T=G-L+(M-A)/1E4;if(0>T&&void 0===n.clockseq&&(x=x+1&16383),(0>T||G>L)&&void 0===n.nsecs&&(M=0),1E4<=M)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
55
|
+
L=G;A=M;za=x;n=(1E4*(268435455&(G+=122192928E5))+M)%4294967296;F[z++]=n>>>24&255;F[z++]=n>>>16&255;F[z++]=n>>>8&255;F[z++]=255&n;n=G/4294967296*1E4&268435455;F[z++]=n>>>8&255;F[z++]=255&n;F[z++]=n>>>24&15|16;F[z++]=n>>>16&255;F[z++]=x>>>8|128;F[z++]=255&x;for(x=0;6>x;++x)F[z+x]=w[x];return y||V(F)};B.v3=P;B.v4=function(n,y,z){z=y&&z||0;'string'==typeof n&&(y='binary'===n?Array(16):null,n=null);var F=(n=n||{}).random||(n.rng||Q)();if(F[6]=15&F[6]|64,F[8]=63&F[8]|128,y)for(n=0;16>n;++n)y[z+n]=F[n];
|
|
56
56
|
return y||V(F)};B.v5=E;Object.defineProperty(B,'__esModule',{value:!0})});
|
|
57
|
-
function Merge(){var B=[],Q=!1,V=function(N,ha){var R=N;Q||('object'==typeof N&&Array.isArray(N),Q=!0);'undefined'==typeof R&&(R='undefined'!=typeof ha&&Array.isArray(ha)?[]:{});var S=!1;'boolean'==typeof arguments[arguments.length-1]&&(S=arguments[arguments.length-1]);var u=1,I=arguments.length,
|
|
58
|
-
typeof arguments[u]&&null!=(
|
|
57
|
+
function Merge(){var B=[],Q=!1,V=function(N,ha){var R=N;Q||('object'==typeof N&&Array.isArray(N),Q=!0);'undefined'==typeof R&&(R='undefined'!=typeof ha&&Array.isArray(ha)?[]:{});var S=!1;'boolean'==typeof arguments[arguments.length-1]&&(S=arguments[arguments.length-1]);var u=1,I=arguments.length,v,za;if('object'!==typeof R&&'function'!==typeof R)R=S?'undefined'==typeof arguments[2]?arguments[1]:arguments[2]:'undefined'==typeof arguments[0]?arguments[1]:arguments[0];else for(;u<I;++u)if('boolean'!=
|
|
58
|
+
typeof arguments[u]&&null!=(v=arguments[u])){if('object'!=typeof v){R=v;break}if(Array.isArray(v)&&Array.isArray(R))R=la(v,R,S);else for(var va in v){R||={name:null};var P=R[va];var L=v[va];if(R!==L)if(L&&(U(L)||(za=Array.isArray(L)))){var A=!1;if(za){za=!1;if(P&&Array.isArray(P))var E=P||[];else if(U(P)){E=P||{};R[va]=E;continue}else E=[];B=E;E=la(L,E,S);R[va]=E}else{E=P&&U(P)?P:null;if(!E){A=!0;E={};for(var n in L)E[n]=L[n]}if(S){for(n in L)'undefined'!=typeof L[n]?Array.isArray(L[n])&&Array.isArray(E[n])?
|
|
59
59
|
E[n]=la(L[n],E[n],S):E[n]=L[n]:Array.isArray(L[n])&&Array.isArray(E[n])&&(E[n]=la(L[n],E[n],S));R[va]=E}else{for(n in L)'undefined'==typeof E[n]?Array.isArray(L[n])&&Array.isArray(E[n])?E[n]=la(L[n],E[n],S):E[n]=L[n]:Array.isArray(L[n])&&Array.isArray(E[n])&&(E[n]=la(L[n],E[n],S));'boolean'==typeof P||A?A&&(R[va]=E):R[va]=V(E,L,S)}}}else void 0!==L&&(R[va]='undefined'==typeof P||null==P||P===L||S?L:P)}}B=[];Q=!1;return R},la=function(N,ha,R){B=[];var S=[],u=V.getKeyComparison();if(/^true$/i.test(R)){if('object'==
|
|
60
|
-
typeof N[0]&&null!=N[0]&&'undefined'!=typeof N[0][u]&&'object'==typeof ha[0]&&'undefined'!=typeof ha[0][u]){B=Array.isArray(ha)?Array.from(ha):JSON.clone(ha);var I=0;for(R=B.length;I<R;++I)S.push(B[I][u]);R=JSON.clone(N);var
|
|
60
|
+
typeof N[0]&&null!=N[0]&&'undefined'!=typeof N[0][u]&&'object'==typeof ha[0]&&'undefined'!=typeof ha[0][u]){B=Array.isArray(ha)?Array.from(ha):JSON.clone(ha);var I=0;for(R=B.length;I<R;++I)S.push(B[I][u]);R=JSON.clone(N);var v=0;I=0;N=R.length;for(var za=P||0,va=ha.length;za<va;++za)a:for(I=I||0;I<N;++I)if(R[I][u]===ha[za][u]){-1<S.indexOf(R[I][u])?(B[v]=R[I],++v):-1==S.indexOf(R[I][u])&&(S.push(R[I][u]),B[v]=R[I],++v);break a}else-1==S.indexOf(R[I][u])&&(S.push(R[I][u]),B.push(R[I]));return B}return Array.isArray(N)&&
|
|
61
61
|
0==N.length||'undefined'==typeof N?/^true$/i.test(R)?N:ha:N}if(0==N.length&&0<ha.length)return B=ha;if(0==ha.length&&0<N.length)for(I=0;I<N.length;++I)ha.push(N[I]);if(0==B.length&&0<ha.length)for(I=0;I<ha.length;++I)'object'!=typeof ha[I]&&-1==B.indexOf(ha[I])&&B.push(ha[I]);if(0<ha.length){if('undefined'!=typeof N[0]&&'object'==typeof N[0]&&null!=N[0]&&'undefined'!=typeof N[0][u]&&'object'==typeof ha[0]&&'undefined'!=typeof ha[0][u]){B=Array.isArray(ha)?Array.from(ha):JSON.clone(ha);R=JSON.clone(N);
|
|
62
|
-
var P=null;I=0;for(N=B.length;I<N;++I)S.push(B[I][u]);for(I=0;I<N;++I)a:for(
|
|
63
|
-
'undefined'!=typeof S&&null!=S&&(S=S[0]||null),-1<ha.indexOf(N[I])&&R)ha.splice(ha.indexOf(N[I]),1,N[I]);else if('undefined'==typeof B[I]&&'object'==typeof N[I])for(
|
|
62
|
+
var P=null;I=0;for(N=B.length;I<N;++I)S.push(B[I][u]);for(I=0;I<N;++I)a:for(za=P||0,va=R.length;za<va;++za)if(null!=R[za]&&'undefined'!=typeof R[za][u]&&R[za][u]!==B[I][u]){if(-1==S.indexOf(R[za][u])){B.push(R[za]);S.push(R[za][u]);P=za+1;N<va&&++N;break a}}else if(null!=R[za]&&'undefined'!=typeof R[za][u]&&R[za][u]===B[I][u])P=za+1;else break a;return B}for(I=0;I<N.length;++I)if(S=null,'undefined'==typeof N||'object'!=typeof N[I]||Array.isArray(N[I])||null==N[I]||(S=Object.getOwnPropertyNames(N[I])),
|
|
63
|
+
'undefined'!=typeof S&&null!=S&&(S=S[0]||null),-1<ha.indexOf(N[I])&&R)ha.splice(ha.indexOf(N[I]),1,N[I]);else if('undefined'==typeof B[I]&&'object'==typeof N[I])for(v in B=ha,'undefined'==typeof B[I]&&(B[I]={}),N[I])B[I].hasOwnProperty(v)||(B[I][v]=N[I][v]);else!R&&-1<B.indexOf(N[I])&&/number/i.test(typeof N[I])&&N[I]!==B[I]?B.push(N[I]):'undefined'==typeof ha[I]||/null/i.test(ha[I])||'undefined'==typeof ha[I][u]||'undefined'==typeof N[I]||'undefined'==typeof N[I][u]||ha[I][u]!=N[I][u]?-1==B.indexOf(N[I])&&
|
|
64
64
|
'object'!=typeof N[I]?B.push(N[I]):'undefined'==typeof ha[I]||/null/i.test(ha[I])||'undefined'==typeof ha[I][S]||'undefined'==typeof N[I]||'undefined'==typeof N[I][S]||ha[I][S]!=N[I][S]||(B[I]=R?N[I]:ha[I]):B[I]=R?N[I]:ha[I]}if(0<B.length&&0<ha.length||0==B.length&&0==ha.length)return B};la.prototype.setKeyComparison=function(N){this.keyComparison=N};var U=function(N){if(!N||'[object Object]'!=={}.toString.call(N)||N.nodeType||N.setInterval)return!1;var ha={}.hasOwnProperty,R=ha.call(N,'constructor');
|
|
65
65
|
ha='undefined'!=typeof N.constructor?ha.call(N.constructor.prototype,'isPrototypeOf'):!1;return!N.constructor||R||ha?!0:!1};V.setKeyComparison=function(N){la.keyComparison=N;return V};V.getKeyComparison=function(){var N=la.keyComparison||'id';la.keyComparison='id';return N};return V}'undefined'!==typeof module&&module.exports?('undefined'==typeof JSON.clone&&require('../../../helpers'),module.exports=Merge()):'function'===typeof define&&define.amd&&define('lib/merge',[],function(){return Merge()});
|
|
66
66
|
function registerEvents(B,Q){'undefined'==typeof gina&&'undefined'!=typeof window.gina&&(gina=window.gina);gina.registeredEvents[B]=Q}function mergeEventProps(B,Q){for(let V in Q)'undefined'==typeof B[V]&&(B[V]=Q[V]);return B}
|
|
@@ -72,18 +72,18 @@ function cancelEvent(B){'undefined'!=typeof B&&null!=B&&(B.cancelBubble=!0,B.pre
|
|
|
72
72
|
function setupXhr(B){var Q=null;if(window.XMLHttpRequest)Q=new XMLHttpRequest;else if(window.ActiveXObject)try{Q=new ActiveXObject('Msxml2.XMLHTTP')}catch(la){try{Q=new ActiveXObject('Microsoft.XMLHTTP')}catch(U){}}if('undefined'!=typeof B){if(!B.url||'undefined'==typeof B.url)throw Error('Missing `options.url`');'undefined'==typeof B.method&&(B.method='GET');B.method=B.method.toUpperCase();if(B.withCredentials){if('withCredentials'in Q)B.isSynchrone?Q.open(B.method,B.url,B.isSynchrone):Q.open(B.method,
|
|
73
73
|
B.url);else if('undefined'!=typeof XDomainRequest)Q=new XDomainRequest,Q.open(B.method,B.url);else{result='CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ';triggerEvent(gina,$target,'error.'+id,result);return}Q.responseType='undefined'!=typeof B.responseType?B.responseType:'';Q.withCredentials=!0}else B.isSynchrone?Q.open(B.method,B.url,B.isSynchrone):Q.open(B.method,B.url);for(var V in B.headers)'Content-Type'==V&&'undefined'!=typeof enctype&&null!=
|
|
74
74
|
enctype&&''!=enctype||Q.setRequestHeader(V,B.headers[V])}return Q}
|
|
75
|
-
function handleXhr(B,Q,V,la){if(!B)throw Error('No `xhr` object initiated');var U=null,N=null,ha=null,R=null,S=null,u=V.$link||null,I=V.$form||null,
|
|
76
|
-
I&&
|
|
77
|
-
I&&(I.eventData.error=L);u&&(u.eventData.error=L);window.ginaToolbar.update('data-xhr',L,!0);triggerEvent(gina,
|
|
75
|
+
function handleXhr(B,Q,V,la){if(!B)throw Error('No `xhr` object initiated');var U=null,N=null,ha=null,R=null,S=null,u=V.$link||null,I=V.$form||null,v=null;delete V.$link;delete V.$form;I||u?u?(u.target=document.getElementById(u.id),v=gina.link.target,S=gina.link.id):(v=I.target,S=v.getAttribute('id')):(v=Q,S=v.getAttribute('id'));var za=u&&Q.getAttribute('data-gina-link-event-on-success')||u&&Q.getAttribute('data-gina-link-event-on-error')?!0:!1,va=I&&v.getAttribute('data-gina-form-event-on-submit-success')||
|
|
76
|
+
I&&v.getAttribute('data-gina-form-event-on-submit-error')?!0:!1;va&&I&&listenToXhrEvents(I,'form');Q=Q.getAttribute('enctype')||V.headers['Content-Type'];for(var P in V.headers)'Content-Type'==P&&'undefined'!=typeof Q&&null!=Q&&''!=Q||B.setRequestHeader(P,V.headers[P]);B.withCredentials='undefined'!=typeof V.withCredentials?V.withCredentials:!1;B.onerror=function(L,A){L={status:B.status||500,error:'Transaction error: might be due to the server CORS settings.\nPlease, check the console for more details.'};
|
|
77
|
+
I&&(I.eventData.error=L);u&&(u.eventData.error=L);window.ginaToolbar.update('data-xhr',L,!0);triggerEvent(gina,v,'error.'+S,L);va&&triggerEvent(gina,v,'error.'+S+'.hform',L);za&&triggerEvent(gina,v,'error.'+S+'.hlink',L)};B.onreadystatechange=function(L){L=/Google Inc/i.test(navigator.vendor)?50:0;2==B.readyState&&(N=/^attachment;/.test(B.getResponseHeader('Content-Disposition'))?!0:!1,!B.responseType&&N&&(B.responseType='blob'));if(4==B.readyState)if(U=null,ha=B.getResponseHeader('Content-Type'),
|
|
78
78
|
/^2/.test(B.status)){try{if(/blob/.test(B.responseType)||N){if('undefined'==typeof ha||null==ha)ha='application/octet-stream';U=new Blob([this.response],{type:ha});var A=document.createElement('a');A.style='display: none';document.body.appendChild(A);var E=window.URL.createObjectURL(U);A.href=E;var n=B.getResponseHeader('Content-Disposition');A.download=n.match('=(.*)')[0].substr(1);A.click();window.URL.revokeObjectURL(E);R={status:B.status,statusText:B.statusText,responseType:U.type,type:U.type,
|
|
79
79
|
size:U.size}}!R&&/\/json/.test(ha)&&(R=JSON.parse(B.responseText),'undefined'==typeof R.status&&(R.status=B.status||200));if(!R&&/\/html/.test(ha)&&(R={contentType:ha,content:B.responseText},'undefined'==typeof R.status&&(R.status=B.status),'undefined'!=typeof gina.popin&&gina.hasPopinHandler)){var y=gina.popin.getActivePopin();if(y){XHRData={};try{XHRData=(new DOMParser).parseFromString(R.content,'text/html').getElementById('gina-without-layout-xhr-data'),XHRData=JSON.parse(decodeURIComponent(XHRData.value)),
|
|
80
|
-
XHRView=(new DOMParser).parseFromString(R.content,'text/html').getElementById('gina-without-layout-xhr-view'),XHRView=JSON.parse(decodeURIComponent(XHRView.value)),gina&&typeof window.ginaToolbar&&'undefined'!=typeof XHRData&&window.ginaToolbar.update('data-xhr',XHRData),gina&&typeof window.ginaToolbar&&'undefined'!=typeof XHRView&&window.ginaToolbar.update('view-xhr',XHRView)}catch(x){throw x;}y.loadContent(R.content);R=XHRData;triggerEvent(gina,
|
|
81
|
-
(I.eventData.success=R);XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{'undefined'!=typeof XHRData&&/\/html/.test(ha)&&window.ginaToolbar.update('data-xhr',XHRData)}catch(x){throw x;}triggerEvent(gina,
|
|
82
|
-
window.ginaToolbar.update('data-xhr',XHRData)}catch(G){throw G;}triggerEvent(gina,
|
|
80
|
+
XHRView=(new DOMParser).parseFromString(R.content,'text/html').getElementById('gina-without-layout-xhr-view'),XHRView=JSON.parse(decodeURIComponent(XHRView.value)),gina&&typeof window.ginaToolbar&&'undefined'!=typeof XHRData&&window.ginaToolbar.update('data-xhr',XHRData),gina&&typeof window.ginaToolbar&&'undefined'!=typeof XHRView&&window.ginaToolbar.update('view-xhr',XHRView)}catch(x){throw x;}y.loadContent(R.content);R=XHRData;triggerEvent(gina,v,'success.'+S,R);return}}R||(R=B.responseText);I&&
|
|
81
|
+
(I.eventData.success=R);XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{'undefined'!=typeof XHRData&&/\/html/.test(ha)&&window.ginaToolbar.update('data-xhr',XHRData)}catch(x){throw x;}triggerEvent(gina,v,'success.'+S,R);va&&triggerEvent(gina,v,'success.'+S+'.hform',R);za&&triggerEvent(gina,v,'success.'+S+'.hlink',R)}catch(x){R={status:422,error:x.message,stack:x.stack};I&&(I.eventData.error=R);XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{'undefined'!=typeof XHRData&&
|
|
82
|
+
window.ginaToolbar.update('data-xhr',XHRData)}catch(G){throw G;}triggerEvent(gina,v,'error.'+S,R);va&&triggerEvent(gina,v,'error.'+S+'.hform',R);za&&triggerEvent(gina,v,'error.'+S+'.hlink',R)}if('undefined'!=typeof R&&'undefined'!=typeof R.location)return window.location.hash='',R.location=/^http/.test(R.location)||/^\//.test(R.location)?R.location:location.protocol+'//'+R.location,setTimeout(()=>{window.location.href=R.location},L)}else if(0!=B.status)if(R={status:B.status,message:''},/blob/.test(B.responseType)){U=
|
|
83
83
|
new Blob([this.response],{type:'text/plain'});var z=new FileReader,F='';z.addEventListener('loadend',x=>{/string/i.test(typeof x.srcElement.result)?F+=x.srcElement.result:'object'==typeof x.srcElement.result?R=merge(R,x.srcElement.result):R.message+=x.srcElement.result;if(/^2/.test(z.readyState)){if(/^(\{|\[)/.test(F))try{R=merge(R,JSON.parse(F))}catch(T){R=merge(R,T)}R.message||delete R.message;I&&(I.eventData.error=R);if('undefined'!=typeof R&&'undefined'!=typeof R.error&&R.error.fields&&'object'==
|
|
84
|
-
typeof R.error.fields){x={};var G=0,M;for(M in R.error.fields)++G,x[M]={isApplicationValidationError:R.error.fields[M]};0<G&&handleErrorsDisplay(I.target,x)}XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{window.ginaToolbar.update('data-xhr',XHRData)}catch(T){throw T;}triggerEvent(gina,
|
|
85
|
-
x)}I&&(I.eventData.error=R);if('undefined'!=typeof R&&'undefined'!=typeof R.error&&R.error.fields&&'object'==typeof R.error.fields){A={};E=0;for(var
|
|
86
|
-
'error.'+S+'.hlink',R)}};B.onprogress=function(L){var A='0';L.lengthComputable&&(A=L.loaded/L.total,A=parseInt(100*A));L={status:100,progress:A};I&&(I.eventData.onprogress=L);triggerEvent(gina,
|
|
84
|
+
typeof R.error.fields){x={};var G=0,M;for(M in R.error.fields)++G,x[M]={isApplicationValidationError:R.error.fields[M]};0<G&&handleErrorsDisplay(I.target,x)}XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{window.ginaToolbar.update('data-xhr',XHRData)}catch(T){throw T;}triggerEvent(gina,v,'error.'+S,R);va&&triggerEvent(gina,v,'error.'+S+'.hform',R);za&&triggerEvent(gina,v,'error.'+S+'.hlink',R)}});z.readAsText(U)}else{try{R=merge(R,JSON.parse(B.responseText))}catch(x){R=merge(R,
|
|
85
|
+
x)}I&&(I.eventData.error=R);if('undefined'!=typeof R&&'undefined'!=typeof R.error&&R.error.fields&&'object'==typeof R.error.fields){A={};E=0;for(var w in R.error.fields)++E,A[w]={isApplicationValidationError:R.error.fields[w]};0<E&&handleErrorsDisplay(I.target,A)}XHRData=R;if(gina&&'object'==typeof window.ginaToolbar&&XHRData)try{window.ginaToolbar.update('data-xhr',XHRData)}catch(x){throw x;}triggerEvent(gina,v,'error.'+S,R);va&&triggerEvent(gina,v,'error.'+S+'.hform',R);za&&triggerEvent(gina,v,
|
|
86
|
+
'error.'+S+'.hlink',R)}};B.onprogress=function(L){var A='0';L.lengthComputable&&(A=L.loaded/L.total,A=parseInt(100*A));L={status:100,progress:A};I&&(I.eventData.onprogress=L);triggerEvent(gina,v,'progress.'+S,L)};B.ontimeout=function(L){R={status:408,error:'Request Timeout'};I&&(I.eventData.ontimeout=R);triggerEvent(gina,v,'error.'+S,R);va&&triggerEvent(gina,v,'error.'+S+'.hform',R);za&&triggerEvent(gina,v,'error.'+S+'.hlink',R)}}
|
|
87
87
|
function removeListener(B,Q,V,la){'undefined'!=typeof B.event&&B.event.isTouchSupported&&/^(click|mouseout|mouseover)/.test(V)&&-1!=B.event[V].indexOf(Q)&&B.event[V].splice(B.event[V].indexOf(Q),1);if('undefined'!=typeof Q&&null!=Q)if(Q.removeEventListener)if(Array.isArray(Q))for(i=0,len=Q.length;i<len;i++)B=/\.$/.test(V)?V+Q[i].id:V,Q.removeEventListener(B,la,!1),'undefined'!=typeof gina.events[B]&&delete gina.events[B];else V=/\.$/.test(V)?V+Q.id:V,Q.removeEventListener(V,la,!1);else{if(Q.attachEvent)if(Array.isArray(Q))for(i=
|
|
88
88
|
0,len=Q.length;i<len;i++)B=/\.$/.test(V)?V+Q[i].id:V,Q.detachEvent('on'+B,la),'undefined'!=typeof gina.events[B]&&delete gina.events[B];else V=/\.$/.test(V)?V+Q.id:V,Q.detachEvent('on'+V,la)}else if(Array.isArray(Q))for(i=0,len=Q.length;i<len;i++){let U=/\.$/.test(V)?V+Q[i].id:V;B.customEvent.removeListener(U,la);'undefined'!=typeof gina.events[U]&&delete gina.events[U]}else V=/\.$/.test(V)?V+Q.id:V,B.customEvent.removeListener(V,la);'undefined'!=typeof gina.events[V]&&delete gina.events[V];'undefined'!=
|
|
89
89
|
typeof la&&la()}
|
|
@@ -100,125 +100,125 @@ function DateFormatHelper(){var B='undefined'!==typeof module&&module.exports?!1
|
|
|
100
100
|
longTime2:'h:MM:ss TT',concatenatedDate:'yyyymmdd',isoDate:'yyyy-mm-dd',isoTime:'HH:MM:ss',shortIsoTime:'HH:MM',longIsoTime:'HH:MM:ss TT',isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",longIsoDateTime:"yyyy-mm-dd'T'HH:MM:ss.L",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};var N={en:{dayNames:'Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.split(' '),monthNames:'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December'.split(' '),
|
|
101
101
|
masks:{'default':'ddd mmm dd yyyy HH:MM:ss',shortDate:'m/d/yy',shortDate2:'mm/dd/yyyy',mediumDate:'mmm d, yyyy',longDate:'mmmm d, yyyy',fullDate:'dddd, mmmm d, yyyy'}},fr:{dayNames:'dim lun mar mer jeu ven sam dimanche lundi mardi mercredi jeudi vendredi samedi'.split(' '),monthNames:'Jan F\u00e9v Mar Avr Mai Jui Juil Ao\u00fb Sep Oct Nov D\u00e9c Janvier F\u00e9vrier Mars Avril Mai Juin Juillet Ao\u00fbt Septembre Octobre Novembre D\u00e9cembre'.split(' '),masks:{'default':'ddd mmm dd yyyy HH:MM:ss',
|
|
102
102
|
shortDate:'d/m/yy',shortDate2:'dd/mm/yyyy',mediumDate:'d mmm, yyyy',longDate:'d mmmm, yyyy',fullDate:'dddd, d mmmm, yyyy'}}};var ha=function(u,I){if(I instanceof Date)return u=u.getTime(),I=I.getTime(),Math.round(Math.abs(u-I)/864E5);throw Error('dateTo is not instance of Date() !');},R=['us','eu','corporate'],S=function(u){d=new Date(u.getFullYear(),u.getMonth(),u.getDate());u=d.getDay()||7;d.setDate(d.getDate()+4-u);u=new Date(Date.parse(d.getFullYear(),0,1));return Math.ceil(((d-u)/864E5+1)/7)};
|
|
103
|
-
return{setCulture:function(u,I){/\-/.test(I)?(V=I,la=I.split(/\-/)[0]):la=I;return this},format:function(u,I,
|
|
104
|
-
L=/[^-+\dA-Z]/g,A=function(T,
|
|
105
|
-
var G=
|
|
106
|
-
va%10]};return I.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(T){return T in M?M[T]:T.slice(1,T.length-1)})},countDaysTo:ha,getDaysTo:function(u,I,
|
|
107
|
-
u.getMonth();u=u.getFullYear();u=new Date(u,I,1);for(var
|
|
108
|
-
[1,2,3,4];break;default:
|
|
103
|
+
return{setCulture:function(u,I){/\-/.test(I)?(V=I,la=I.split(/\-/)[0]):la=I;return this},format:function(u,I,v){var za=N[la]||N.en,va=null;try{va=Q(za.masks,U)}catch(T){Q=(B='undefined'!==typeof module&&module.exports?!1:!0)?require('lib/merge'):require('./../lib/merge'),va=Q(za.masks,U)}'undefined'!=typeof N[V]&&(za=N[V],'undefined'!=typeof N[V].mask&&(va=Q(za.masks,U)));var P=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
|
|
104
|
+
L=/[^-+\dA-Z]/g,A=function(T,ra){T=String(T);for(ra=ra||2;T.length<ra;)T='0'+T;return T};1!=arguments.length||'[object String]'!=Object.prototype.toString.call(u)||/\d/.test(u)||(I=u,u=void 0);u=u?new Date(u):new Date;if(isNaN(u))throw SyntaxError('invalid date');I=String(va[I]||I||va['default']);'UTC:'==I.slice(0,4)&&(I=I.slice(4),v=!0);var E=v?'getUTC':'get';va=u[E+'Date']();var n=u[E+'Day'](),y=u[E+'Month'](),z=u[E+'FullYear'](),F=u[E+'Hours'](),w=u[E+'Minutes'](),x=u[E+'Seconds']();E=u[E+'Milliseconds']();
|
|
105
|
+
var G=v?0:u.getTimezoneOffset(),M={d:va,dd:A(va),ddd:za.dayNames[n],dddd:za.dayNames[n+7],m:y+1,mm:A(y+1),mmm:za.monthNames[y],mmmm:za.monthNames[y+12],yy:String(z).slice(2),yyyy:z,h:F%12||12,hh:A(F%12||12),H:F,HH:A(F),M:w,MM:A(w),s:x,ss:A(x),l:A(E,3),L:A(E),t:12>F?'a':'p',tt:12>F?'am':'pm',T:12>F?'A':'P',TT:12>F?'AM':'PM',Z:v?'UTC':(String(u).match(P)||['']).pop().replace(L,''),o:(0<G?'-':'+')+A(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:['th','st','nd','rd'][3<va%10?0:(10!=va%100-va%10)*
|
|
106
|
+
va%10]};return I.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(T){return T in M?M[T]:T.slice(1,T.length-1)})},countDaysTo:ha,getDaysTo:function(u,I,v){if(I instanceof Date){I=ha(u,I);var za=u.getMonth(),va=u.getFullYear();u=u.getDate()+1;u=new Date(va,za,u);za=[];for(va=0;va<I;++va)'undefined'!=typeof v?za.push((new Date(u)).format(v)):za.push(new Date(u)),u.setDate(u.getDate()+1);return za||[]}throw Error('dateTo is not instance of Date() !');},getDaysInMonth:function(u){var I=
|
|
107
|
+
u.getMonth();u=u.getFullYear();u=new Date(u,I,1);for(var v=[];u.getMonth()===I;)v.push(new Date(u)),u.setDate(u.getDate()+1);return v},getQuarter:function(u,I){if(1==arguments.length&&'string'==typeof arguments[0]){if(0>R.indexOf(arguments[0].toLowerCase()))throw Error('Quarter '+arguments[0]+' code not supported !');u=new Date;I=arguments[0]}'undefined'==typeof u&&(u=new Date);'undefined'==typeof I&&(I='corporate');I=I.toLowerCase();switch(I){case 'us':var v=[4,1,2,3];break;case 'corportate':case 'eu':v=
|
|
108
|
+
[1,2,3,4];break;default:v=[1,2,3,4]}return v[Math.floor(u.getMonth()/3)]},getHalfYear:function(u,I){if(1==arguments.length&&'string'==typeof arguments[0]){if(0>R.indexOf(arguments[0].toLowerCase()))throw Error('Quarter '+arguments[0]+' code not supported !');u=new Date;I=arguments[0]}'undefined'==typeof u&&(u=new Date);'undefined'==typeof I&&(I='corporate');I=I.toLowerCase();return 2>=u.getQuarter(I)?1:2},getWeek:function(u,I){'undefined'==typeof u&&(u=new Date);'undefined'==typeof I&&(I='ISO 8601');
|
|
109
109
|
I=I.replace(/\s+/g,'').toLowerCase();switch(I){case 'corporate':case 'eu':case 'iso8601':return S(u);default:return S(u)}},addHours:function(u,I){u=new Date(u.getTime());u.setHours(u.getHours()+I);return u},addDays:function(u,I){u=new Date(u.getTime());u.setHours(u.getHours()+24*I);return u},addYears:function(u,I){u=new Date(u.getTime());u.setFullYear(u.getFullYear()+I);return u}}}
|
|
110
110
|
'undefined'!==typeof module&&module.exports?module.exports=DateFormatHelper:'function'===typeof define&&define.amd&&define('helpers/dateFormat',[],function(){return DateFormatHelper});
|
|
111
111
|
!function(B,Q){'object'==typeof module&&'object'==typeof module.exports?module.exports=B.document?Q(B,!0):function(V){if(!V.document)throw Error('jQuery requires a window with a document');return Q(V)}:Q(B)}('undefined'!=typeof window?window:this,function(B,Q){function V(a){var c=!!a&&'length'in a&&a.length,g=b.type(a);return'function'===g||b.isWindow(a)?!1:'array'===g||0===c||'number'==typeof c&&0<c&&c-1 in a}function la(a,c,g){if(b.isFunction(c))return b.grep(a,function(k,r){return!!c.call(k,r,
|
|
112
|
-
k)!==g});if(c.nodeType)return b.grep(a,function(k){return k===c!==g});if('string'==typeof c){if(Ba.test(c))return b.filter(c,a,g);c=b.filter(c,a)}return b.grep(a,function(k){return-1<b.inArray(k,c)!==g})}function U(a,c){do a=a[c];while(a&&1!==a.nodeType);return a}function N(a){var c={};return b.each(a.match(
|
|
113
|
-
R))}function R(){(
|
|
114
|
-
c,g,k){if($a(a)){var r,C,J=b.expando,Z=a.nodeType,
|
|
115
|
-
r,C=a.nodeType,J=C?b.cache:a,Z=C?a[b.expando]:b.expando;if(J[Z]){if(c&&(k=g?J[Z]:J[Z].data)){b.isArray(c)?c=c.concat(b.map(c,b.camelCase)):c in k?c=[c]:(c=b.camelCase(c),c=c in k?[c]:c.split(' '));for(r=c.length;r--;)delete k[c[r]];if(g?!u(k):!b.isEmptyObject(k))return}(g||(delete J[Z].data,u(J[Z])))&&(C?b.cleanData([a],!0):e.deleteExpando||J!=J.window?delete J[Z]:J[Z]=void 0)}}}function
|
|
116
|
-
(b.cssNumber[c]?'':'px'),ua=(b.cssNumber[c]||'px'!==Ca&&+
|
|
112
|
+
k)!==g});if(c.nodeType)return b.grep(a,function(k){return k===c!==g});if('string'==typeof c){if(Ba.test(c))return b.filter(c,a,g);c=b.filter(c,a)}return b.grep(a,function(k){return-1<b.inArray(k,c)!==g})}function U(a,c){do a=a[c];while(a&&1!==a.nodeType);return a}function N(a){var c={};return b.each(a.match(pa)||[],function(g,k){c[k]=!0}),c}function ha(){La.addEventListener?(La.removeEventListener('DOMContentLoaded',R),B.removeEventListener('load',R)):(La.detachEvent('onreadystatechange',R),B.detachEvent('onload',
|
|
113
|
+
R))}function R(){(La.addEventListener||'load'===B.event.type||'complete'===La.readyState)&&(ha(),b.ready())}function S(a,c,g){if(void 0===g&&1===a.nodeType){var k='data-'+c.replace(Bb,'-$1').toLowerCase();if(g=a.getAttribute(k),'string'==typeof g){try{g='true'===g?!0:'false'===g?!1:'null'===g?null:+g+''===g?+g:Ab.test(g)?b.parseJSON(g):g}catch(r){}b.data(a,c,g)}else g=void 0}return g}function u(a){for(var c in a)if(('data'!==c||!b.isEmptyObject(a[c]))&&'toJSON'!==c)return!1;return!0}function I(a,
|
|
114
|
+
c,g,k){if($a(a)){var r,C,J=b.expando,Z=a.nodeType,qa=Z?b.cache:a,Ca=Z?a[J]:a[J]&&J;if(Ca&&qa[Ca]&&(k||qa[Ca].data)||void 0!==g||'string'!=typeof c)return Ca||=Z?a[J]=yb.pop()||b.guid++:J,qa[Ca]||(qa[Ca]=Z?{}:{toJSON:b.noop}),'object'!=typeof c&&'function'!=typeof c||(k?qa[Ca]=b.extend(qa[Ca],c):qa[Ca].data=b.extend(qa[Ca].data,c)),C=qa[Ca],k||(C.data||(C.data={}),C=C.data),void 0!==g&&(C[b.camelCase(c)]=g),'string'==typeof c?(r=C[c],null==r&&(r=C[b.camelCase(c)])):r=C,r}}function v(a,c,g){if($a(a)){var k,
|
|
115
|
+
r,C=a.nodeType,J=C?b.cache:a,Z=C?a[b.expando]:b.expando;if(J[Z]){if(c&&(k=g?J[Z]:J[Z].data)){b.isArray(c)?c=c.concat(b.map(c,b.camelCase)):c in k?c=[c]:(c=b.camelCase(c),c=c in k?[c]:c.split(' '));for(r=c.length;r--;)delete k[c[r]];if(g?!u(k):!b.isEmptyObject(k))return}(g||(delete J[Z].data,u(J[Z])))&&(C?b.cleanData([a],!0):e.deleteExpando||J!=J.window?delete J[Z]:J[Z]=void 0)}}}function za(a,c,g,k){var r,C=1,J=20,Z=k?function(){return k.cur()}:function(){return b.css(a,c,'')},qa=Z(),Ca=g&&g[3]||
|
|
116
|
+
(b.cssNumber[c]?'':'px'),ua=(b.cssNumber[c]||'px'!==Ca&&+qa)&&Hb.exec(b.css(a,c));if(ua&&ua[3]!==Ca){Ca=Ca||ua[3];g=g||[];ua=+qa||1;do C=C||'.5',ua/=C,b.style(a,c,ua+Ca);while(C!==(C=Z()/qa)&&1!==C&&--J)}return g&&(ua=+ua||+qa||0,r=g[1]?ua+(g[1]+1)*g[2]:+g[2],k&&(k.unit=Ca,k.start=ua,k.end=r)),r}function va(a){var c='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'.split(' ');
|
|
117
117
|
a=a.createDocumentFragment();if(a.createElement)for(;c.length;)a.createElement(c.pop());return a}function P(a,c){var g,k,r=0,C='undefined'!=typeof a.getElementsByTagName?a.getElementsByTagName(c||'*'):'undefined'!=typeof a.querySelectorAll?a.querySelectorAll(c||'*'):void 0;if(!C)for(C=[],g=a.childNodes||a;null!=(k=g[r]);r++)!c||b.nodeName(k,c)?C.push(k):b.merge(C,P(k,c));return void 0===c||c&&b.nodeName(a,c)?b.merge([a],C):C}function L(a,c){for(var g,k=0;null!=(g=a[k]);k++)b._data(g,'globalEval',
|
|
118
|
-
!c||b._data(c[k],'globalEval'))}function A(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function E(a,c,g,k,r){for(var C,J,Z,
|
|
119
|
-
!e.tbody)for(C=(J='table'!==Ca||Oa.test(J)?'<table>'!==Ra[1]||Oa.test(J)?0:
|
|
120
|
-
J),
|
|
121
|
-
J.apply(this,arguments)},r.guid=J.guid||(J.guid=b.guid++)),a.each(function(){b.event.add(this,c,r,k,g)})}function
|
|
122
|
-
k;var r=b._data(a);a=b._data(c,r);var C=r.events;if(C)for(g in delete a.handle,a.events={},C)for(r=0,k=C[g].length;k>r;r++)b.event.add(c,g,C[g][r]);a.data&&(a.data=b.extend({},a.data))}}function T(a,c,g,k){c=Gb.apply([],c);var r,C,J,Z=0,
|
|
123
|
-
J.childNodes.length&&(J=r),r||k)){var Ua=b.map(P(J,'script'),x);for(C=Ua.length;
|
|
124
|
-
1!==c.nodeType||b.cleanData(P(c)),c.parentNode&&(g&&b.contains(c.ownerDocument,c)&&L(P(c,'script')),c.parentNode.removeChild(c));return a}function Ea(a,c){a=b(c.createElement(a)).appendTo(c.body);c=b.css(a[0],'display');return a.detach(),c}function W(a){var c=
|
|
118
|
+
!c||b._data(c[k],'globalEval'))}function A(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function E(a,c,g,k,r){for(var C,J,Z,qa,Ca,ua,Ra,Ua=a.length,zb=va(c),ab=[],Jb=0;Ua>Jb;Jb++)if(J=a[Jb],J||0===J)if('object'===b.type(J))b.merge(ab,J.nodeType?[J]:J);else if(hb.test(J)){qa=qa||zb.appendChild(c.createElement('div'));Ca=(ja.exec(J)||['',''])[1].toLowerCase();Ra=Va[Ca]||Va._default;qa.innerHTML=Ra[1]+b.htmlPrefilter(J)+Ra[2];for(C=Ra[0];C--;)qa=qa.lastChild;if(!e.leadingWhitespace&&Na.test(J)&&ab.push(c.createTextNode(Na.exec(J)[0])),
|
|
119
|
+
!e.tbody)for(C=(J='table'!==Ca||Oa.test(J)?'<table>'!==Ra[1]||Oa.test(J)?0:qa:qa.firstChild)&&J.childNodes.length;C--;)b.nodeName(ua=J.childNodes[C],'tbody')&&!ua.childNodes.length&&J.removeChild(ua);b.merge(ab,qa.childNodes);for(qa.textContent='';qa.firstChild;)qa.removeChild(qa.firstChild);qa=zb.lastChild}else ab.push(c.createTextNode(J));qa&&zb.removeChild(qa);e.appendChecked||b.grep(P(ab,'input'),A);for(Jb=0;J=ab[Jb++];)if(k&&-1<b.inArray(J,k))r&&r.push(J);else if(Z=b.contains(J.ownerDocument,
|
|
120
|
+
J),qa=P(zb.appendChild(J),'script'),Z&&L(qa),g)for(C=0;J=qa[C++];)ta.test(J.type||'')&&g.push(J);return zb}function n(){return!0}function y(){return!1}function z(){try{return La.activeElement}catch(a){}}function F(a,c,g,k,r,C){var J,Z;if('object'==typeof c){'string'!=typeof g&&(k=k||g,g=void 0);for(Z in c)F(a,Z,g,k,c[Z],C);return a}if(null==k&&null==r?(r=g,k=g=void 0):null==r&&('string'==typeof g?(r=k,k=void 0):(r=k,k=g,g=void 0)),!1===r)r=y;else if(!r)return a;return 1===C&&(J=r,r=function(qa){return b().off(qa),
|
|
121
|
+
J.apply(this,arguments)},r.guid=J.guid||(J.guid=b.guid++)),a.each(function(){b.event.add(this,c,r,k,g)})}function w(a,c){return b.nodeName(a,'table')&&b.nodeName(11!==c.nodeType?c:c.firstChild,'tr')?a.getElementsByTagName('tbody')[0]||a.appendChild(a.ownerDocument.createElement('tbody')):a}function x(a){return a.type=(null!==b.find.attr(a,'type'))+'/'+a.type,a}function G(a){var c=Zb.exec(a.type);return c?a.type=c[1]:a.removeAttribute('type'),a}function M(a,c){if(1===c.nodeType&&b.hasData(a)){var g,
|
|
122
|
+
k;var r=b._data(a);a=b._data(c,r);var C=r.events;if(C)for(g in delete a.handle,a.events={},C)for(r=0,k=C[g].length;k>r;r++)b.event.add(c,g,C[g][r]);a.data&&(a.data=b.extend({},a.data))}}function T(a,c,g,k){c=Gb.apply([],c);var r,C,J,Z=0,qa=a.length,Ca=qa-1,ua=c[0],Ra=b.isFunction(ua);if(Ra||1<qa&&'string'==typeof ua&&!e.checkClone&&Kb.test(ua))return a.each(function(zb){var ab=a.eq(zb);Ra&&(c[0]=ua.call(this,zb,ab.html()));T(ab,c,g,k)});if(qa&&(J=E(c,a[0].ownerDocument,!1,a,k),r=J.firstChild,1===
|
|
123
|
+
J.childNodes.length&&(J=r),r||k)){var Ua=b.map(P(J,'script'),x);for(C=Ua.length;qa>Z;Z++)r=J,Z!==Ca&&(r=b.clone(r,!0,!0),C&&b.merge(Ua,P(r,'script'))),g.call(a[Z],r,Z);if(C)for(J=Ua[Ua.length-1].ownerDocument,b.map(Ua,G),Z=0;C>Z;Z++)r=Ua[Z],ta.test(r.type||'')&&!b._data(r,'globalEval')&&b.contains(J,r)&&(r.src?b._evalUrl&&b._evalUrl(r.src):b.globalEval((r.text||r.textContent||r.innerHTML||'').replace(Xb,'')));J=r=null}return a}function ra(a,c,g){for(var k=c?b.filter(c,a):a,r=0;null!=(c=k[r]);r++)g||
|
|
124
|
+
1!==c.nodeType||b.cleanData(P(c)),c.parentNode&&(g&&b.contains(c.ownerDocument,c)&&L(P(c,'script')),c.parentNode.removeChild(c));return a}function Ea(a,c){a=b(c.createElement(a)).appendTo(c.body);c=b.css(a[0],'display');return a.detach(),c}function W(a){var c=La,g=Nb[a];return g||(g=Ea(a,c),'none'!==g&&g||(fc=(fc||b("<iframe frameborder='0' width='0' height='0'/>")).appendTo(c.documentElement),c=(fc[0].contentWindow||fc[0].contentDocument).document,c.write(),c.close(),g=Ea(a,c),fc.detach()),Nb[a]=
|
|
125
125
|
g),g}function ia(a,c){return{get:function(){return a()?void delete this.get:(this.get=c).apply(this,arguments)}}}function ea(a){if(a in hd)return a;for(var c=a.charAt(0).toUpperCase()+a.slice(1),g=jd.length;g--;)if(a=jd[g]+c,a in hd)return a}function Aa(a,c){for(var g,k,r,C=[],J=0,Z=a.length;Z>J;J++)k=a[J],k.style&&(C[J]=b._data(k,'olddisplay'),g=k.style.display,c?(C[J]||'none'!==g||(k.style.display=''),''===k.style.display&&cb(k)&&(C[J]=b._data(k,'olddisplay',W(k.nodeName)))):(r=cb(k),(g&&'none'!==
|
|
126
126
|
g||!r)&&b._data(k,'olddisplay',r?g:b.css(k,'display'))));for(J=0;Z>J;J++)k=a[J],k.style&&(c&&'none'!==k.style.display&&''!==k.style.display||(k.style.display=c?C[J]||'':'none'));return a}function ma(a,c,g){return(a=vd.exec(c))?Math.max(0,a[1]-(g||0))+(a[2]||'px'):c}function sa(a,c,g,k,r){c=g===(k?'border':'content')?4:'width'===c?1:0;for(var C=0;4>c;c+=2)'margin'===g&&(C+=b.css(a,g+Wa[c],!0,r)),k?('content'===g&&(C-=b.css(a,'padding'+Wa[c],!0,r)),'margin'!==g&&(C-=b.css(a,'border'+Wa[c]+'Width',!0,
|
|
127
127
|
r))):(C+=b.css(a,'padding'+Wa[c],!0,r),'padding'!==g&&(C+=b.css(a,'border'+Wa[c]+'Width',!0,r)));return C}function Da(a,c,g){var k=!0,r='width'===c?a.offsetWidth:a.offsetHeight,C=rc(a),J=e.boxSizing&&'border-box'===b.css(a,'boxSizing',!1,C);if(0>=r||null==r){if(r=sc(a,c,C),(0>r||null==r)&&(r=a.style[c]),mc.test(r))return r;k=J&&(e.boxSizingReliable()||r===a.style[c]);r=parseFloat(r)||0}return r+sa(a,c,g||(J?'border':'content'),k,C)+'px'}function Qa(a,c,g,k,r){return new Qa.prototype.init(a,c,g,k,
|
|
128
128
|
r)}function Ja(){return B.setTimeout(function(){Fc=void 0}),Fc=b.now()}function Ia(a,c){var g={height:a},k=0;for(c=c?1:0;4>k;k+=2-c){var r=Wa[k];g['margin'+r]=g['padding'+r]=a}return c&&(g.opacity=g.width=a),g}function Ha(a,c,g){for(var k,r=(Fa.tweeners[c]||[]).concat(Fa.tweeners['*']),C=0,J=r.length;J>C;C++)if(k=r[C].call(g,c,a))return k}function mb(a,c){var g,k,r,C,J;for(g in a)if(k=b.camelCase(g),r=c[k],C=a[g],b.isArray(C)&&(r=C[1],C=a[g]=C[0]),g!==k&&(a[k]=C,delete a[g]),J=b.cssHooks[k],J&&'expand'in
|
|
129
|
-
J)for(g in C=J.expand(C),delete a[k],C)g in a||(a[g]=C[g],c[g]=r);else c[k]=r}function Fa(a,c,g){var k,r=0,C=Fa.prefilters.length,J=b.Deferred().always(function(){delete Z.elem}),Z=function(){if(k)return!1;var Ca=Fc||Ja();Ca=Math.max(0,
|
|
130
|
-
easing:b.easing._default},g),originalProperties:c,originalOptions:g,startTime:Fc||Ja(),duration:g.duration,tweens:[],createTween:function(Ca,ua){Ca=b.Tween(a,
|
|
131
|
-
Fa.prefilters[r].call(
|
|
132
|
-
[];if(b.isFunction(g))for(;c=r[k++];)'+'===c.charAt(0)?(c=c.slice(1)||'*',(a[c]=a[c]||[]).unshift(g)):(a[c]=a[c]||[]).push(g)}}function pb(a,c,g,k){function r(Z){var
|
|
133
|
-
b.extend(!0,a,g),a}function qb(a){if(!b.contains(a.ownerDocument||
|
|
134
|
-
function xb(a){return b.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var yb=[],
|
|
129
|
+
J)for(g in C=J.expand(C),delete a[k],C)g in a||(a[g]=C[g],c[g]=r);else c[k]=r}function Fa(a,c,g){var k,r=0,C=Fa.prefilters.length,J=b.Deferred().always(function(){delete Z.elem}),Z=function(){if(k)return!1;var Ca=Fc||Ja();Ca=Math.max(0,qa.startTime+qa.duration-Ca);for(var ua=1-(Ca/qa.duration||0),Ra=0,Ua=qa.tweens.length;Ua>Ra;Ra++)qa.tweens[Ra].run(ua);return J.notifyWith(a,[qa,ua,Ca]),1>ua&&Ua?Ca:(J.resolveWith(a,[qa]),!1)},qa=J.promise({elem:a,props:b.extend({},c),opts:b.extend(!0,{specialEasing:{},
|
|
130
|
+
easing:b.easing._default},g),originalProperties:c,originalOptions:g,startTime:Fc||Ja(),duration:g.duration,tweens:[],createTween:function(Ca,ua){Ca=b.Tween(a,qa.opts,Ca,ua,qa.opts.specialEasing[Ca]||qa.opts.easing);return qa.tweens.push(Ca),Ca},stop:function(Ca){var ua=0,Ra=Ca?qa.tweens.length:0;if(k)return this;for(k=!0;Ra>ua;ua++)qa.tweens[ua].run(1);return Ca?(J.notifyWith(a,[qa,1,0]),J.resolveWith(a,[qa,Ca])):J.rejectWith(a,[qa,Ca]),this}});g=qa.props;for(mb(g,qa.opts.specialEasing);C>r;r++)if(c=
|
|
131
|
+
Fa.prefilters[r].call(qa,a,g,qa.opts))return b.isFunction(c.stop)&&(b._queueHooks(qa.elem,qa.opts.queue).stop=b.proxy(c.stop,c)),c;return b.map(g,Ha,qa),b.isFunction(qa.opts.start)&&qa.opts.start.call(a,qa),b.fx.timer(b.extend(Z,{elem:a,anim:qa,queue:qa.opts.queue})),qa.progress(qa.opts.progress).done(qa.opts.done,qa.opts.complete).fail(qa.opts.fail).always(qa.opts.always)}function Pa(a){return b.attr(a,'class')||''}function Ya(a){return function(c,g){'string'!=typeof c&&(g=c,c='*');var k=0,r=c.toLowerCase().match(pa)||
|
|
132
|
+
[];if(b.isFunction(g))for(;c=r[k++];)'+'===c.charAt(0)?(c=c.slice(1)||'*',(a[c]=a[c]||[]).unshift(g)):(a[c]=a[c]||[]).push(g)}}function pb(a,c,g,k){function r(Z){var qa;return C[Z]=!0,b.each(a[Z]||[],function(Ca,ua){Ca=ua(c,g,k);return'string'!=typeof Ca||J||C[Ca]?J?!(qa=Ca):void 0:(c.dataTypes.unshift(Ca),r(Ca),!1)}),qa}var C={},J=a===Vc;return r(c.dataTypes[0])||!C['*']&&r('*')}function bb(a,c){var g,k,r=b.ajaxSettings.flatOptions||{};for(k in c)void 0!==c[k]&&((r[k]?a:g||={})[k]=c[k]);return g&&
|
|
133
|
+
b.extend(!0,a,g),a}function qb(a){if(!b.contains(a.ownerDocument||La,a))return!0;for(;a&&1===a.nodeType;){if('none'===(a.style&&a.style.display||b.css(a,'display'))||'hidden'===a.type)return!0;a=a.parentNode}return!1}function Vb(a,c,g,k){var r;if(b.isArray(c))b.each(c,function(C,J){g||wd.test(a)?k(a,J):Vb(a+'['+('object'==typeof J&&null!=J?C:'')+']',J,g,k)});else if(g||'object'!==b.type(c))k(a,c);else for(r in c)Vb(a+'['+r+']',c[r],g,k)}function wb(){try{return new B.XMLHttpRequest}catch(a){}}function nb(){try{return new B.ActiveXObject('Microsoft.XMLHTTP')}catch(a){}}
|
|
134
|
+
function xb(a){return b.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var yb=[],La=B.document,db=yb.slice,Gb=yb.concat,Ub=yb.push,pc=yb.indexOf,ca={},l=ca.toString,h=ca.hasOwnProperty,e={},b=function(a,c){return new b.fn.init(a,c)},q=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,m=/^-ms-/,p=/-([\da-z])/gi,O=function(a,c){return c.toUpperCase()};b.fn=b.prototype={jquery:'1.12.4',constructor:b,selector:'',length:0,toArray:function(){return db.call(this)},get:function(a){return null!=a?0>a?this[a+
|
|
135
135
|
this.length]:this[a]:db.call(this)},pushStack:function(a){a=b.merge(this.constructor(),a);return a.prevObject=this,a.context=this.context,a},each:function(a){return b.each(this,a)},map:function(a){return this.pushStack(b.map(this,function(c,g){return a.call(c,g,c)}))},slice:function(){return this.pushStack(db.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var c=this.length;a=+a+(0>a?c:0);return this.pushStack(0<=a&&c>a?[this[a]]:[])},
|
|
136
|
-
end:function(){return this.prevObject||this.constructor()},push:Ub,sort:yb.sort,splice:yb.splice};b.extend=b.fn.extend=function(){var a,c,g,k,r=arguments[0]||{},C=1,J=arguments.length,Z=!1;'boolean'==typeof r&&(Z=r,r=arguments[C]||{},C++);'object'==typeof r||b.isFunction(r)||(r={});for(C===J&&(r=this,C--);J>C;C++)if(null!=(g=arguments[C]))for(c in g){var
|
|
136
|
+
end:function(){return this.prevObject||this.constructor()},push:Ub,sort:yb.sort,splice:yb.splice};b.extend=b.fn.extend=function(){var a,c,g,k,r=arguments[0]||{},C=1,J=arguments.length,Z=!1;'boolean'==typeof r&&(Z=r,r=arguments[C]||{},C++);'object'==typeof r||b.isFunction(r)||(r={});for(C===J&&(r=this,C--);J>C;C++)if(null!=(g=arguments[C]))for(c in g){var qa=r[c];var Ca=g[c];r!==Ca&&(Z&&Ca&&(b.isPlainObject(Ca)||(a=b.isArray(Ca)))?(a?(a=!1,k=qa&&b.isArray(qa)?qa:[]):k=qa&&b.isPlainObject(qa)?qa:{},
|
|
137
137
|
r[c]=b.extend(Z,k,Ca)):void 0!==Ca&&(r[c]=Ca))}return r};b.extend({expando:'jQuery'+('1.12.4'+Math.random()).replace(/\D/g,''),isReady:!0,error:function(a){throw Error(a);},noop:function(){},isFunction:function(a){return'function'===b.type(a)},isArray:Array.isArray||function(a){return'array'===b.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var c=a&&a.toString();return!b.isArray(a)&&0<=c-parseFloat(c)+1},isEmptyObject:function(a){for(var c in a)return!1;return!0},
|
|
138
138
|
isPlainObject:function(a){var c;if(!a||'object'!==b.type(a)||a.nodeType||b.isWindow(a))return!1;try{if(a.constructor&&!h.call(a,'constructor')&&!h.call(a.constructor.prototype,'isPrototypeOf'))return!1}catch(g){return!1}if(!e.ownFirst)for(c in a)return h.call(a,c);for(c in a);return void 0===c||h.call(a,c)},type:function(a){return null==a?a+'':'object'==typeof a||'function'==typeof a?ca[l.call(a)]||'object':typeof a},globalEval:function(a){a&&b.trim(a)&&(B.execScript||function(c){B.eval.call(B,c)})(a)},
|
|
139
139
|
camelCase:function(a){return a.replace(m,'ms-').replace(p,O)},nodeName:function(a,c){return a.nodeName&&a.nodeName.toLowerCase()===c.toLowerCase()},each:function(a,c){var g,k=0;if(V(a))for(g=a.length;g>k&&!1!==c.call(a[k],k,a[k]);k++);else for(k in a)if(!1===c.call(a[k],k,a[k]))break;return a},trim:function(a){return null==a?'':(a+'').replace(q,'')},makeArray:function(a,c){c=c||[];return null!=a&&(V(Object(a))?b.merge(c,'string'==typeof a?[a]:a):Ub.call(c,a)),c},inArray:function(a,c,g){if(c){if(pc)return pc.call(c,
|
|
140
140
|
a,g);var k=c.length;for(g=g?0>g?Math.max(0,k+g):g:0;k>g;g++)if(g in c&&c[g]===a)return g}return-1},merge:function(a,c){for(var g=+c.length,k=0,r=a.length;g>k;)a[r++]=c[k++];if(g!==g)for(;void 0!==c[k];)a[r++]=c[k++];return a.length=r,a},grep:function(a,c,g){for(var k=[],r=0,C=a.length,J=!g;C>r;r++)g=!c(a[r],r),g!==J&&k.push(a[r]);return k},map:function(a,c,g){var k,r=0,C=[];if(V(a))for(k=a.length;k>r;r++){var J=c(a[r],r,g);null!=J&&C.push(J)}else for(r in a)J=c(a[r],r,g),null!=J&&C.push(J);return Gb.apply([],
|
|
141
141
|
C)},guid:1,proxy:function(a,c){var g,k,r;return'string'==typeof c&&(r=a[c],c=a,a=r),b.isFunction(a)?(g=db.call(arguments,2),k=function(){return a.apply(c||this,g.concat(db.call(arguments)))},k.guid=a.guid=a.guid||b.guid++,k):void 0},now:function(){return+new Date},support:e});'function'==typeof Symbol&&(b.fn[Symbol.iterator]=yb[Symbol.iterator]);b.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '),function(a,c){ca['[object '+c+']']=c.toLowerCase()});var D=function(a){function c(K,
|
|
142
|
-
da,na,
|
|
143
|
-
da.getElementsByClassName)return Ac.apply(na,da.getElementsByClassName(Ga)),na}if(!(!Pb.qsa||ac[K+' ']||Tb&&Tb.test(K))){if(1!==
|
|
144
|
-
Cb&&da.removeAttribute('id')}}}return gc(K.replace(Nc,'$1'),da,na,
|
|
145
|
-
(~da.sourceIndex||-2147483648)-(~K.sourceIndex||-2147483648);if(
|
|
146
|
-
na[Ga]))})})}function ua(K){return K&&'undefined'!=typeof K.getElementsByTagName&&K}function Ra(){}function Ua(K){for(var da=0,na=K.length,
|
|
147
|
-
Sa[Cb]||(Sa[Cb]={}),ob=
|
|
148
|
-
!Ga[Cb]&&(Ga=jc(Ga,Ma)),k(function(Sa,Za,Xa,
|
|
149
|
-
ub.length;Xa--;)(ob=ub[Xa])&&-1<(cc=Ga?Cc(Sa,ob):
|
|
150
|
-
[zb(ab(
|
|
151
|
-
tc?1:Math.random()||.1,cc=hc.length;for(
|
|
152
|
-
return na?k(Ga):Ga}var wc,vb,gc,Db,Ob,Rb,tb,ic,ec,Tb,dc,Sb,nc,Cb='sizzle'+1*new Date,$b=a.document,Wb=0,Qb=0,Hc=g(),oc=g(),ac=g(),uc=function(K,da){return K===da&&(Rb=!0),0},vc={}.hasOwnProperty,lc=[],Yc=lc.pop,zd=lc.push,Ac=lc.push,ld=lc.slice,Cc=function(K,da){for(var na=0,
|
|
142
|
+
da,na,ya){var Ga,Ma,Sa,Za,Xa=da&&da.ownerDocument,lb=da?da.nodeType:9;if(na=na||[],'string'!=typeof K||!K||1!==lb&&9!==lb&&11!==lb)return na;if(!ya&&((da?da.ownerDocument||da:$b)!==tb&&Bc(da),da=da||tb,ec)){if(11!==lb&&(Za=xd.exec(K)))if(Ga=Za[1])if(9===lb){if(!(Ma=da.getElementById(Ga)))return na;if(Ma.id===Ga)return na.push(Ma),na}else{if(Xa&&(Ma=Xa.getElementById(Ga))&&nc(da,Ma)&&Ma.id===Ga)return na.push(Ma),na}else{if(Za[2])return Ac.apply(na,da.getElementsByTagName(K)),na;if((Ga=Za[3])&&Pb.getElementsByClassName&&
|
|
143
|
+
da.getElementsByClassName)return Ac.apply(na,da.getElementsByClassName(Ga)),na}if(!(!Pb.qsa||ac[K+' ']||Tb&&Tb.test(K))){if(1!==lb){Xa=da;var ob=K}else if('object'!==da.nodeName.toLowerCase()){(Sa=da.getAttribute('id'))?Sa=Sa.replace(yd,'\\$&'):da.setAttribute('id',Sa=Cb);Za=Mc(K);Ga=Za.length;for(Ma=kd.test(Sa)?'#'+Sa:"[id='"+Sa+"']";Ga--;)Za[Ga]=Ma+' '+Ua(Za[Ga]);ob=Za.join(',');Xa=Wc.test(K)&&ua(da.parentNode)||da}if(ob)try{return Ac.apply(na,Xa.querySelectorAll(ob)),na}catch(ib){}finally{Sa===
|
|
144
|
+
Cb&&da.removeAttribute('id')}}}return gc(K.replace(Nc,'$1'),da,na,ya)}function g(){function K(na,ya){return da.push(na+' ')>Fb.cacheLength&&delete K[da.shift()],K[na+' ']=ya}var da=[];return K}function k(K){return K[Cb]=!0,K}function r(K){var da=tb.createElement('div');try{return!!K(da)}catch(na){return!1}finally{da.parentNode&&da.parentNode.removeChild(da)}}function C(K,da){K=K.split('|');for(var na=K.length;na--;)Fb.attrHandle[K[na]]=da}function J(K,da){var na=da&&K,ya=na&&1===K.nodeType&&1===da.nodeType&&
|
|
145
|
+
(~da.sourceIndex||-2147483648)-(~K.sourceIndex||-2147483648);if(ya)return ya;if(na)for(;na=na.nextSibling;)if(na===da)return-1;return K?1:-1}function Z(K){return function(da){return'input'===da.nodeName.toLowerCase()&&da.type===K}}function qa(K){return function(da){var na=da.nodeName.toLowerCase();return('input'===na||'button'===na)&&da.type===K}}function Ca(K){return k(function(da){return da=+da,k(function(na,ya){for(var Ga,Ma=K([],na.length,da),Sa=Ma.length;Sa--;)na[Ga=Ma[Sa]]&&(na[Ga]=!(ya[Ga]=
|
|
146
|
+
na[Ga]))})})}function ua(K){return K&&'undefined'!=typeof K.getElementsByTagName&&K}function Ra(){}function Ua(K){for(var da=0,na=K.length,ya='';na>da;da++)ya+=K[da].value;return ya}function zb(K,da,na){var ya=da.dir,Ga=na&&'parentNode'===ya,Ma=Qb++;return da.first?function(Sa,Za,Xa){for(;Sa=Sa[ya];)if(1===Sa.nodeType||Ga)return K(Sa,Za,Xa)}:function(Sa,Za,Xa){var lb,ob,ib,Lb=[Wb,Ma];if(Xa)for(;Sa=Sa[ya];){if((1===Sa.nodeType||Ga)&&K(Sa,Za,Xa))return!0}else for(;Sa=Sa[ya];)if(1===Sa.nodeType||Ga){if(ib=
|
|
147
|
+
Sa[Cb]||(Sa[Cb]={}),ob=ib[Sa.uniqueID]||(ib[Sa.uniqueID]={}),(lb=ob[ya])&&lb[0]===Wb&&lb[1]===Ma)return Lb[2]=lb[2];if(ob[ya]=Lb,Lb[2]=K(Sa,Za,Xa))return!0}}}function ab(K){return 1<K.length?function(da,na,ya){for(var Ga=K.length;Ga--;)if(!K[Ga](da,na,ya))return!1;return!0}:K[0]}function Jb(K,da,na,ya,Ga){for(var Ma,Sa=[],Za=0,Xa=K.length,lb=null!=da;Xa>Za;Za++)(Ma=K[Za])&&(na&&!na(Ma,ya,Ga)||(Sa.push(Ma),lb&&da.push(Za)));return Sa}function jc(K,da,na,ya,Ga,Ma){return ya&&!ya[Cb]&&(ya=jc(ya)),Ga&&
|
|
148
|
+
!Ga[Cb]&&(Ga=jc(Ga,Ma)),k(function(Sa,Za,Xa,lb){var ob,ib=[],Lb=[],bc=Za.length,Yb;if(!(Yb=Sa)){Yb=da||'*';for(var ub=Xa.nodeType?[Xa]:Xa,tc=[],hc=0,qc=ub.length;qc>hc;hc++)c(Yb,ub[hc],tc);Yb=tc}Yb=!K||!Sa&&da?Yb:Jb(Yb,ib,K,Xa,lb);ub=na?Ga||(Sa?K:bc||ya)?[]:Za:Yb;if(na&&na(Yb,ub,Xa,lb),ya){var cc=Jb(ub,Lb);ya(cc,[],Xa,lb);for(Xa=cc.length;Xa--;)(ob=cc[Xa])&&(ub[Lb[Xa]]=!(Yb[Lb[Xa]]=ob))}if(Sa){if(Ga||K){if(Ga){cc=[];for(Xa=ub.length;Xa--;)(ob=ub[Xa])&&cc.push(Yb[Xa]=ob);Ga(null,ub=[],cc,lb)}for(Xa=
|
|
149
|
+
ub.length;Xa--;)(ob=ub[Xa])&&-1<(cc=Ga?Cc(Sa,ob):ib[Xa])&&(Sa[cc]=!(Za[cc]=ob))}}else ub=Jb(ub===Za?ub.splice(bc,ub.length):ub),Ga?Ga(null,Za,ub,lb):Ac.apply(Za,ub)})}function Gc(K){var da,na,ya=K.length,Ga=Fb.relative[K[0].type];var Ma=Ga||Fb.relative[' '];for(var Sa=Ga?1:0,Za=zb(function(ob){return ob===da},Ma,!0),Xa=zb(function(ob){return-1<Cc(da,ob)},Ma,!0),lb=[function(ob,ib,Lb){ob=!Ga&&(Lb||ib!==Db)||((da=ib).nodeType?Za(ob,ib,Lb):Xa(ob,ib,Lb));return da=null,ob}];ya>Sa;Sa++)if(Ma=Fb.relative[K[Sa].type])lb=
|
|
150
|
+
[zb(ab(lb),Ma)];else{if(Ma=Fb.filter[K[Sa].type].apply(null,K[Sa].matches),Ma[Cb]){for(na=++Sa;ya>na&&!Fb.relative[K[na].type];na++);return jc(1<Sa&&ab(lb),1<Sa&&Ua(K.slice(0,Sa-1).concat({value:' '===K[Sa-2].type?'*':''})).replace(Nc,'$1'),Ma,na>Sa&&Gc(K.slice(Sa,na)),ya>na&&Gc(K=K.slice(na)),ya>na&&Ua(K))}lb.push(Ma)}return ab(lb)}function kc(K,da){var na=0<da.length,ya=0<K.length,Ga=function(Ma,Sa,Za,Xa,lb){var ob,ib,Lb=0,bc='0',Yb=Ma&&[],ub=[],tc=Db,hc=Ma||ya&&Fb.find.TAG('*',lb),qc=Wb+=null==
|
|
151
|
+
tc?1:Math.random()||.1,cc=hc.length;for(lb&&(Db=Sa===tb||Sa||lb);bc!==cc&&null!=(ob=hc[bc]);bc++){if(ya&&ob){var Xc=0;for(Sa||ob.ownerDocument===tb||(Bc(ob),Za=!ec);ib=K[Xc++];)if(ib(ob,Sa||tb,Za)){Xa.push(ob);break}lb&&(Wb=qc)}na&&((ob=!ib&&ob)&&Lb--,Ma&&Yb.push(ob))}if(Lb+=bc,na&&bc!==Lb){for(Xc=0;ib=da[Xc++];)ib(Yb,ub,Sa,Za);if(Ma){if(0<Lb)for(;bc--;)Yb[bc]||ub[bc]||(ub[bc]=Yc.call(Xa));ub=Jb(ub)}Ac.apply(Xa,ub);lb&&!Ma&&0<ub.length&&1<Lb+da.length&&c.uniqueSort(Xa)}return lb&&(Wb=qc,Db=tc),Yb};
|
|
152
|
+
return na?k(Ga):Ga}var wc,vb,gc,Db,Ob,Rb,tb,ic,ec,Tb,dc,Sb,nc,Cb='sizzle'+1*new Date,$b=a.document,Wb=0,Qb=0,Hc=g(),oc=g(),ac=g(),uc=function(K,da){return K===da&&(Rb=!0),0},vc={}.hasOwnProperty,lc=[],Yc=lc.pop,zd=lc.push,Ac=lc.push,ld=lc.slice,Cc=function(K,da){for(var na=0,ya=K.length;ya>na;na++)if(K[na]===da)return na;return-1},Ad=RegExp('[\\x20\\t\\r\\n\\f]+','g'),Nc=RegExp('^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$','g'),Bd=RegExp('^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*'),
|
|
153
153
|
Cd=RegExp('^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*'),Dd=RegExp('=[\\x20\\t\\r\\n\\f]*([^\\]\'"]*?)[\\x20\\t\\r\\n\\f]*\\]','g'),Ed=RegExp(':((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)'),
|
|
154
154
|
kd=RegExp('^(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+$'),Oc={ID:RegExp('^#((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)'),CLASS:RegExp('^\\.((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)'),TAG:RegExp('^((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+|[*])'),ATTR:RegExp('^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\]'),PSEUDO:RegExp('^:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)'),
|
|
155
155
|
CHILD:RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)','i'),bool:RegExp('^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$','i'),needsContext:RegExp('^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)',
|
|
156
156
|
'i')},Fd=/^(?:input|select|textarea|button)$/i,Gd=/^h\d$/i,Kc=/^[^{]+\{\s*\[native \w/,xd=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Wc=/[+~]/,yd=/'|\\/g,xc=RegExp('\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)','ig'),yc=function(K,da,na){K='0x'+da-65536;return K!==K||na?da:0>K?String.fromCharCode(K+65536):String.fromCharCode(K>>10|55296,1023&K|56320)},md=function(){Bc()};try{Ac.apply(lc=ld.call($b.childNodes),$b.childNodes),lc[$b.childNodes.length].nodeType}catch(K){Ac={apply:lc.length?
|
|
157
|
-
function(da,na){zd.apply(da,ld.call(na))}:function(da,na){for(var
|
|
158
|
-
na.attachEvent('onunload',md)),Pb.attributes=r(function(
|
|
159
|
-
Ga.getElementById(
|
|
160
|
-
Ga){var Ma=[],Sa=0;Ga=Ga.getElementsByTagName(
|
|
161
|
-
Tb.push('[*^$]=[\\x20\\t\\r\\n\\f]*(?:\'\'|"")');
|
|
162
|
-
'hidden');
|
|
163
|
-
Tb=Tb.length&&new RegExp(Tb.join('|')),dc=dc.length&&new RegExp(dc.join('|')),da=Kc.test(ic.compareDocumentPosition),nc=da||Kc.test(ic.contains)?function(
|
|
164
|
-
!Ga.compareDocumentPosition;return Ma?Ma:(Ma=(
|
|
165
|
-
Ga);for(;
|
|
166
|
-
c(da,tb,null,[K]).length};c.contains=function(K,da){return(K.ownerDocument||K)!==tb&&Bc(K),nc(K,da)};c.attr=function(K,da){(K.ownerDocument||K)!==tb&&Bc(K);var na=Fb.attrHandle[da.toLowerCase()];na=na&&vc.call(Fb.attrHandle,da.toLowerCase())?na(K,da,!ec):void 0;return void 0!==na?na:Pb.attributes||!ec?K.getAttribute(da):(na=K.getAttributeNode(da))&&na.specified?na.value:null};c.error=function(K){throw Error('Syntax error, unrecognized expression: '+K);};c.uniqueSort=function(K){var da,na=[],
|
|
167
|
-
Ga=0;if(Rb=!Pb.detectDuplicates,Ob=!Pb.sortStable&&K.slice(0),K.sort(uc),Rb){for(;da=K[Ga++];)da===K[Ga]&&(
|
|
157
|
+
function(da,na){zd.apply(da,ld.call(na))}:function(da,na){for(var ya=da.length,Ga=0;da[ya++]=na[Ga++];);da.length=ya-1}}}var Pb=c.support={};var Hd=c.isXML=function(K){return(K=K&&(K.ownerDocument||K).documentElement)?'HTML'!==K.nodeName:!1};var Bc=c.setDocument=function(K){var da,na;K=K?K.ownerDocument||K:$b;return K!==tb&&9===K.nodeType&&K.documentElement?(tb=K,ic=tb.documentElement,ec=!Hd(tb),(na=tb.defaultView)&&na.top!==na&&(na.addEventListener?na.addEventListener('unload',md,!1):na.attachEvent&&
|
|
158
|
+
na.attachEvent('onunload',md)),Pb.attributes=r(function(ya){return ya.className='i',!ya.getAttribute('className')}),Pb.getElementsByTagName=r(function(ya){return ya.appendChild(tb.createComment('')),!ya.getElementsByTagName('*').length}),Pb.getElementsByClassName=Kc.test(tb.getElementsByClassName),Pb.getById=r(function(ya){return ic.appendChild(ya).id=Cb,!tb.getElementsByName||!tb.getElementsByName(Cb).length}),Pb.getById?(Fb.find.ID=function(ya,Ga){if('undefined'!=typeof Ga.getElementById&&ec)return(ya=
|
|
159
|
+
Ga.getElementById(ya))?[ya]:[]},Fb.filter.ID=function(ya){var Ga=ya.replace(xc,yc);return function(Ma){return Ma.getAttribute('id')===Ga}}):(delete Fb.find.ID,Fb.filter.ID=function(ya){var Ga=ya.replace(xc,yc);return function(Ma){return(Ma='undefined'!=typeof Ma.getAttributeNode&&Ma.getAttributeNode('id'))&&Ma.value===Ga}}),Fb.find.TAG=Pb.getElementsByTagName?function(ya,Ga){return'undefined'!=typeof Ga.getElementsByTagName?Ga.getElementsByTagName(ya):Pb.qsa?Ga.querySelectorAll(ya):void 0}:function(ya,
|
|
160
|
+
Ga){var Ma=[],Sa=0;Ga=Ga.getElementsByTagName(ya);if('*'===ya){for(;ya=Ga[Sa++];)1===ya.nodeType&&Ma.push(ya);return Ma}return Ga},Fb.find.CLASS=Pb.getElementsByClassName&&function(ya,Ga){return'undefined'!=typeof Ga.getElementsByClassName&&ec?Ga.getElementsByClassName(ya):void 0},dc=[],Tb=[],(Pb.qsa=Kc.test(tb.querySelectorAll))&&(r(function(ya){ic.appendChild(ya).innerHTML="<a id='"+Cb+"'></a><select id='"+Cb+"-\r\\' msallowcapture=''><option selected=''></option></select>";ya.querySelectorAll("[msallowcapture^='']").length&&
|
|
161
|
+
Tb.push('[*^$]=[\\x20\\t\\r\\n\\f]*(?:\'\'|"")');ya.querySelectorAll('[selected]').length||Tb.push('\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)');ya.querySelectorAll('[id~='+Cb+'-]').length||Tb.push('~=');ya.querySelectorAll(':checked').length||Tb.push(':checked');ya.querySelectorAll('a#'+Cb+'+*').length||Tb.push('.#.+[+~]')}),r(function(ya){var Ga=tb.createElement('input');Ga.setAttribute('type',
|
|
162
|
+
'hidden');ya.appendChild(Ga).setAttribute('name','D');ya.querySelectorAll('[name=d]').length&&Tb.push('name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=');ya.querySelectorAll(':enabled').length||Tb.push(':enabled',':disabled');ya.querySelectorAll('*,:x');Tb.push(',.*:')})),(Pb.matchesSelector=Kc.test(Sb=ic.matches||ic.webkitMatchesSelector||ic.mozMatchesSelector||ic.oMatchesSelector||ic.msMatchesSelector))&&r(function(ya){Pb.disconnectedMatch=Sb.call(ya,'div');Sb.call(ya,"[s!='']:x");dc.push('!=',':((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)')}),
|
|
163
|
+
Tb=Tb.length&&new RegExp(Tb.join('|')),dc=dc.length&&new RegExp(dc.join('|')),da=Kc.test(ic.compareDocumentPosition),nc=da||Kc.test(ic.contains)?function(ya,Ga){var Ma=9===ya.nodeType?ya.documentElement:ya;Ga=Ga&&Ga.parentNode;return ya===Ga||!(!Ga||1!==Ga.nodeType||!(Ma.contains?Ma.contains(Ga):ya.compareDocumentPosition&&16&ya.compareDocumentPosition(Ga)))}:function(ya,Ga){if(Ga)for(;Ga=Ga.parentNode;)if(Ga===ya)return!0;return!1},uc=da?function(ya,Ga){if(ya===Ga)return Rb=!0,0;var Ma=!ya.compareDocumentPosition-
|
|
164
|
+
!Ga.compareDocumentPosition;return Ma?Ma:(Ma=(ya.ownerDocument||ya)===(Ga.ownerDocument||Ga)?ya.compareDocumentPosition(Ga):1,1&Ma||!Pb.sortDetached&&Ga.compareDocumentPosition(ya)===Ma?ya===tb||ya.ownerDocument===$b&&nc($b,ya)?-1:Ga===tb||Ga.ownerDocument===$b&&nc($b,Ga)?1:Ob?Cc(Ob,ya)-Cc(Ob,Ga):0:4&Ma?-1:1)}:function(ya,Ga){if(ya===Ga)return Rb=!0,0;var Ma=0,Sa=ya.parentNode,Za=Ga.parentNode,Xa=[ya],lb=[Ga];if(!Sa||!Za)return ya===tb?-1:Ga===tb?1:Sa?-1:Za?1:Ob?Cc(Ob,ya)-Cc(Ob,Ga):0;if(Sa===Za)return J(ya,
|
|
165
|
+
Ga);for(;ya=ya.parentNode;)Xa.unshift(ya);for(ya=Ga;ya=ya.parentNode;)lb.unshift(ya);for(;Xa[Ma]===lb[Ma];)Ma++;return Ma?J(Xa[Ma],lb[Ma]):Xa[Ma]===$b?-1:lb[Ma]===$b?1:0},tb):tb};c.matches=function(K,da){return c(K,null,null,da)};c.matchesSelector=function(K,da){if((K.ownerDocument||K)!==tb&&Bc(K),da=da.replace(Dd,"='$1']"),!(!Pb.matchesSelector||!ec||ac[da+' ']||dc&&dc.test(da)||Tb&&Tb.test(da)))try{var na=Sb.call(K,da);if(na||Pb.disconnectedMatch||K.document&&11!==K.document.nodeType)return na}catch(ya){}return 0<
|
|
166
|
+
c(da,tb,null,[K]).length};c.contains=function(K,da){return(K.ownerDocument||K)!==tb&&Bc(K),nc(K,da)};c.attr=function(K,da){(K.ownerDocument||K)!==tb&&Bc(K);var na=Fb.attrHandle[da.toLowerCase()];na=na&&vc.call(Fb.attrHandle,da.toLowerCase())?na(K,da,!ec):void 0;return void 0!==na?na:Pb.attributes||!ec?K.getAttribute(da):(na=K.getAttributeNode(da))&&na.specified?na.value:null};c.error=function(K){throw Error('Syntax error, unrecognized expression: '+K);};c.uniqueSort=function(K){var da,na=[],ya=0,
|
|
167
|
+
Ga=0;if(Rb=!Pb.detectDuplicates,Ob=!Pb.sortStable&&K.slice(0),K.sort(uc),Rb){for(;da=K[Ga++];)da===K[Ga]&&(ya=na.push(Ga));for(;ya--;)K.splice(na[ya],1)}return Ob=null,K};var Zc=c.getText=function(K){var da,na='',ya=0;if(da=K.nodeType)if(1===da||9===da||11===da){if('string'==typeof K.textContent)return K.textContent;for(K=K.firstChild;K;K=K.nextSibling)na+=Zc(K)}else{if(3===da||4===da)return K.nodeValue}else for(;da=K[ya++];)na+=Zc(da);return na};var Fb=c.selectors={cacheLength:50,createPseudo:k,
|
|
168
168
|
match:Oc,attrHandle:{},find:{},relative:{'>':{dir:'parentNode',first:!0},' ':{dir:'parentNode'},'+':{dir:'previousSibling',first:!0},'~':{dir:'previousSibling'}},preFilter:{ATTR:function(K){return K[1]=K[1].replace(xc,yc),K[3]=(K[3]||K[4]||K[5]||'').replace(xc,yc),'~='===K[2]&&(K[3]=' '+K[3]+' '),K.slice(0,4)},CHILD:function(K){return K[1]=K[1].toLowerCase(),'nth'===K[1].slice(0,3)?(K[3]||c.error(K[0]),K[4]=+(K[4]?K[5]+(K[6]||1):2*('even'===K[3]||'odd'===K[3])),K[5]=+(K[7]+K[8]||'odd'===K[3])):K[3]&&
|
|
169
169
|
c.error(K[0]),K},PSEUDO:function(K){var da,na=!K[6]&&K[2];return Oc.CHILD.test(K[0])?null:(K[3]?K[2]=K[4]||K[5]||'':na&&Ed.test(na)&&(da=Mc(na,!0))&&(da=na.indexOf(')',na.length-da)-na.length)&&(K[0]=K[0].slice(0,da),K[2]=na.slice(0,da)),K.slice(0,3))}},filter:{TAG:function(K){var da=K.replace(xc,yc).toLowerCase();return'*'===K?function(){return!0}:function(na){return na.nodeName&&na.nodeName.toLowerCase()===da}},CLASS:function(K){var da=Hc[K+' '];return da||(da=new RegExp('(^|[\\x20\\t\\r\\n\\f])'+
|
|
170
|
-
K+'([\\x20\\t\\r\\n\\f]|$)'),Hc(K,function(na){return da.test('string'==typeof na.className&&na.className||'undefined'!=typeof na.getAttribute&&na.getAttribute('class')||'')}))},ATTR:function(K,da,na){return function(
|
|
171
|
-
1)===na+'-':!1):!0}},CHILD:function(K,da,na,
|
|
172
|
-
bc.lastChild],Sa&&ob){
|
|
173
|
-
|
|
174
|
-
0,na)}):
|
|
170
|
+
K+'([\\x20\\t\\r\\n\\f]|$)'),Hc(K,function(na){return da.test('string'==typeof na.className&&na.className||'undefined'!=typeof na.getAttribute&&na.getAttribute('class')||'')}))},ATTR:function(K,da,na){return function(ya){ya=c.attr(ya,K);return null==ya?'!='===da:da?(ya+='','='===da?ya===na:'!='===da?ya!==na:'^='===da?na&&0===ya.indexOf(na):'*='===da?na&&-1<ya.indexOf(na):'$='===da?na&&ya.slice(-na.length)===na:'~='===da?-1<(' '+ya.replace(Ad,' ')+' ').indexOf(na):'|='===da?ya===na||ya.slice(0,na.length+
|
|
171
|
+
1)===na+'-':!1):!0}},CHILD:function(K,da,na,ya,Ga){var Ma='nth'!==K.slice(0,3),Sa='last'!==K.slice(-4),Za='of-type'===da;return 1===ya&&0===Ga?function(Xa){return!!Xa.parentNode}:function(Xa,lb,ob){var ib,Lb;lb=Ma!==Sa?'nextSibling':'previousSibling';var bc=Xa.parentNode,Yb=Za&&Xa.nodeName.toLowerCase();ob=!ob&&!Za;var ub=!1;if(bc){if(Ma){for(;lb;){for(ib=Xa;ib=ib[lb];)if(Za?ib.nodeName.toLowerCase()===Yb:1===ib.nodeType)return!1;var tc=lb='only'===K&&!tc&&'nextSibling'}return!0}if(tc=[Sa?bc.firstChild:
|
|
172
|
+
bc.lastChild],Sa&&ob){ib=bc;var hc=ib[Cb]||(ib[Cb]={});var qc=hc[ib.uniqueID]||(hc[ib.uniqueID]={});var cc=qc[K]||[];ub=(Lb=cc[0]===Wb&&cc[1])&&cc[2];for(ib=Lb&&bc.childNodes[Lb];ib=++Lb&&ib&&ib[lb]||(ub=Lb=0)||tc.pop();)if(1===ib.nodeType&&++ub&&ib===Xa){qc[K]=[Wb,Lb,ub];break}}else if(ob&&(ib=Xa,hc=ib[Cb]||(ib[Cb]={}),qc=hc[ib.uniqueID]||(hc[ib.uniqueID]={}),cc=qc[K]||[],Lb=cc[0]===Wb&&cc[1],ub=Lb),!1===ub)for(;(ib=++Lb&&ib&&ib[lb]||(ub=Lb=0)||tc.pop())&&((Za?ib.nodeName.toLowerCase()!==Yb:1!==
|
|
173
|
+
ib.nodeType)||!++ub||(ob&&(hc=ib[Cb]||(ib[Cb]={}),qc=hc[ib.uniqueID]||(hc[ib.uniqueID]={}),qc[K]=[Wb,ub]),ib!==Xa)););return ub-=Ga,ub===ya||0===ub%ya&&0<=ub/ya}}},PSEUDO:function(K,da){var na,ya=Fb.pseudos[K]||Fb.setFilters[K.toLowerCase()]||c.error('unsupported pseudo: '+K);return ya[Cb]?ya(da):1<ya.length?(na=[K,K,'',da],Fb.setFilters.hasOwnProperty(K.toLowerCase())?k(function(Ga,Ma){for(var Sa,Za=ya(Ga,da),Xa=Za.length;Xa--;)Sa=Cc(Ga,Za[Xa]),Ga[Sa]=!(Ma[Sa]=Za[Xa])}):function(Ga){return ya(Ga,
|
|
174
|
+
0,na)}):ya}},pseudos:{not:k(function(K){var da=[],na=[],ya=vb(K.replace(Nc,'$1'));return ya[Cb]?k(function(Ga,Ma,Sa,Za){var Xa;Sa=ya(Ga,null,Za,[]);for(Za=Ga.length;Za--;)(Xa=Sa[Za])&&(Ga[Za]=!(Ma[Za]=Xa))}):function(Ga,Ma,Sa){return da[0]=Ga,ya(da,null,Sa,na),da[0]=null,!na.pop()}}),has:k(function(K){return function(da){return 0<c(K,da).length}}),contains:k(function(K){return K=K.replace(xc,yc),function(da){return-1<(da.textContent||da.innerText||Zc(da)).indexOf(K)}}),lang:k(function(K){return kd.test(K||
|
|
175
175
|
'')||c.error('unsupported lang: '+K),K=K.replace(xc,yc).toLowerCase(),function(da){var na;do if(na=ec?da.lang:da.getAttribute('xml:lang')||da.getAttribute('lang'))return na=na.toLowerCase(),na===K||0===na.indexOf(K+'-');while((da=da.parentNode)&&1===da.nodeType);return!1}}),target:function(K){var da=a.location&&a.location.hash;return da&&da.slice(1)===K.id},root:function(K){return K===ic},focus:function(K){return K===tb.activeElement&&(!tb.hasFocus||tb.hasFocus())&&!!(K.type||K.href||~K.tabIndex)},
|
|
176
176
|
enabled:function(K){return!1===K.disabled},disabled:function(K){return!0===K.disabled},checked:function(K){var da=K.nodeName.toLowerCase();return'input'===da&&!!K.checked||'option'===da&&!!K.selected},selected:function(K){return K.parentNode&&K.parentNode.selectedIndex,!0===K.selected},empty:function(K){for(K=K.firstChild;K;K=K.nextSibling)if(6>K.nodeType)return!1;return!0},parent:function(K){return!Fb.pseudos.empty(K)},header:function(K){return Gd.test(K.nodeName)},input:function(K){return Fd.test(K.nodeName)},
|
|
177
177
|
button:function(K){var da=K.nodeName.toLowerCase();return'input'===da&&'button'===K.type||'button'===da},text:function(K){var da;return'input'===K.nodeName.toLowerCase()&&'text'===K.type&&(null==(da=K.getAttribute('type'))||'text'===da.toLowerCase())},first:Ca(function(){return[0]}),last:Ca(function(K,da){return[da-1]}),eq:Ca(function(K,da,na){return[0>na?na+da:na]}),even:Ca(function(K,da){for(var na=0;da>na;na+=2)K.push(na);return K}),odd:Ca(function(K,da){for(var na=1;da>na;na+=2)K.push(na);return K}),
|
|
178
|
-
lt:Ca(function(K,da,na){for(da=0>na?na+da:na;0<=--da;)K.push(da);return K}),gt:Ca(function(K,da,na){for(na=0>na?na+da:na;++na<da;)K.push(na);return K})}};Fb.pseudos.nth=Fb.pseudos.eq;for(wc in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Fb.pseudos[wc]=Z(wc);for(wc in{submit:!0,reset:!0})Fb.pseudos[wc]=
|
|
179
|
-
!(na=Bd.exec(Ma))||(na&&(Ma=Ma.slice(na[0].length)||Ma),Za.push(
|
|
180
|
-
Gc(da[na]),Ma[Cb]?
|
|
181
|
-
0:Ma.length;Ga--&&(Sa=Ma[Ga],!Fb.relative[Za=Sa.type]);)if((Xa=Fb.find[Za])&&(
|
|
178
|
+
lt:Ca(function(K,da,na){for(da=0>na?na+da:na;0<=--da;)K.push(da);return K}),gt:Ca(function(K,da,na){for(na=0>na?na+da:na;++na<da;)K.push(na);return K})}};Fb.pseudos.nth=Fb.pseudos.eq;for(wc in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Fb.pseudos[wc]=Z(wc);for(wc in{submit:!0,reset:!0})Fb.pseudos[wc]=qa(wc);Ra.prototype=Fb.filters=Fb.pseudos;Fb.setFilters=new Ra;var Mc=c.tokenize=function(K,da){var na,ya,Ga,Ma,Sa;if(Ma=oc[K+' '])return da?0:Ma.slice(0);Ma=K;var Za=[];for(Sa=Fb.preFilter;Ma;){Xa&&
|
|
179
|
+
!(na=Bd.exec(Ma))||(na&&(Ma=Ma.slice(na[0].length)||Ma),Za.push(ya=[]));var Xa=!1;(na=Cd.exec(Ma))&&(Xa=na.shift(),ya.push({value:Xa,type:na[0].replace(Nc,' ')}),Ma=Ma.slice(Xa.length));for(Ga in Fb.filter)!(na=Oc[Ga].exec(Ma))||Sa[Ga]&&!(na=Sa[Ga](na))||(Xa=na.shift(),ya.push({value:Xa,type:Ga,matches:na}),Ma=Ma.slice(Xa.length));if(!Xa)break}return da?Ma.length:Ma?c.error(K):oc(K,Za).slice(0)};return vb=c.compile=function(K,da){var na,ya=[],Ga=[],Ma=ac[K+' '];if(!Ma){da||=Mc(K);for(na=da.length;na--;)Ma=
|
|
180
|
+
Gc(da[na]),Ma[Cb]?ya.push(Ma):Ga.push(Ma);Ma=ac(K,kc(Ga,ya));Ma.selector=K}return Ma},gc=c.select=function(K,da,na,ya){var Ga,Ma,Sa,Za,Xa,lb='function'==typeof K&&K,ob=!ya&&Mc(K=lb.selector||K);if(na=na||[],1===ob.length){if(Ma=ob[0]=ob[0].slice(0),2<Ma.length&&'ID'===(Sa=Ma[0]).type&&Pb.getById&&9===da.nodeType&&ec&&Fb.relative[Ma[1].type]){if(da=(Fb.find.ID(Sa.matches[0].replace(xc,yc),da)||[])[0],!da)return na;lb&&(da=da.parentNode);K=K.slice(Ma.shift().value.length)}for(Ga=Oc.needsContext.test(K)?
|
|
181
|
+
0:Ma.length;Ga--&&(Sa=Ma[Ga],!Fb.relative[Za=Sa.type]);)if((Xa=Fb.find[Za])&&(ya=Xa(Sa.matches[0].replace(xc,yc),Wc.test(Ma[0].type)&&ua(da.parentNode)||da))){if(Ma.splice(Ga,1),K=ya.length&&Ua(Ma),!K)return Ac.apply(na,ya),na;break}}return(lb||vb(K,ob))(ya,da,!ec,na,!da||Wc.test(K)&&ua(da.parentNode)||da),na},Pb.sortStable=Cb.split('').sort(uc).join('')===Cb,Pb.detectDuplicates=!!Rb,Bc(),Pb.sortDetached=r(function(K){return 1&K.compareDocumentPosition(tb.createElement('div'))}),r(function(K){return K.innerHTML=
|
|
182
182
|
"<a href='#'></a>",'#'===K.firstChild.getAttribute('href')})||C('type|href|height|width',function(K,da,na){return na?void 0:K.getAttribute(da,'type'===da.toLowerCase()?1:2)}),Pb.attributes&&r(function(K){return K.innerHTML='<input/>',K.firstChild.setAttribute('value',''),''===K.firstChild.getAttribute('value')})||C('value',function(K,da,na){return na||'input'!==K.nodeName.toLowerCase()?void 0:K.defaultValue}),r(function(K){return null==K.getAttribute('disabled')})||C('checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
|
|
183
|
-
function(K,da,na){var
|
|
183
|
+
function(K,da,na){var ya;return na?void 0:!0===K[da]?da.toLowerCase():(ya=K.getAttributeNode(da))&&ya.specified?ya.value:null}),c}(B);b.find=D;b.expr=D.selectors;b.expr[':']=b.expr.pseudos;b.uniqueSort=b.unique=D.uniqueSort;b.text=D.getText;b.isXMLDoc=D.isXML;b.contains=D.contains;var aa=function(a,c,g){for(var k=[],r=void 0!==g;(a=a[c])&&9!==a.nodeType;)if(1===a.nodeType){if(r&&b(a).is(g))break;k.push(a)}return k},xa=function(a,c){for(var g=[];a;a=a.nextSibling)1===a.nodeType&&a!==c&&g.push(a);return g},
|
|
184
184
|
ba=b.expr.match.needsContext,oa=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ba=/^.[^:#\[\.,]*$/;b.filter=function(a,c,g){var k=c[0];return g&&(a=':not('+a+')'),1===c.length&&1===k.nodeType?b.find.matchesSelector(k,a)?[k]:[]:b.find.matches(a,b.grep(c,function(r){return 1===r.nodeType}))};b.fn.extend({find:function(a){var c,g=[],k=this,r=k.length;if('string'!=typeof a)return this.pushStack(b(a).filter(function(){for(c=0;r>c;c++)if(b.contains(k[c],this))return!0}));for(c=0;r>c;c++)b.find(a,k[c],g);return g=this.pushStack(1<
|
|
185
185
|
r?b.unique(g):g),g.selector=this.selector?this.selector+' '+a:a,g},filter:function(a){return this.pushStack(la(this,a||[],!1))},not:function(a){return this.pushStack(la(this,a||[],!0))},is:function(a){return!!la(this,'string'==typeof a&&ba.test(a)?b(a):a||[],!1).length}});var H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(b.fn.init=function(a,c,g){var k,r;if(!a)return this;if(g=g||ka,'string'==typeof a){if(k='<'===a.charAt(0)&&'>'===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:H.exec(a),!k||!k[1]&&c)return!c||
|
|
186
|
-
c.jquery?(c||g).find(a):this.constructor(c).find(a);if(k[1]){if(c=c instanceof b?c[0]:c,b.merge(this,b.parseHTML(k[1],c&&c.nodeType?c.ownerDocument||c:
|
|
187
|
-
typeof g.ready?g.ready(a):a(b):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),b.makeArray(a,this))}).prototype=b.fn;var ka=b(
|
|
186
|
+
c.jquery?(c||g).find(a):this.constructor(c).find(a);if(k[1]){if(c=c instanceof b?c[0]:c,b.merge(this,b.parseHTML(k[1],c&&c.nodeType?c.ownerDocument||c:La,!0)),oa.test(k[1])&&b.isPlainObject(c))for(k in c)b.isFunction(this[k])?this[k](c[k]):this.attr(k,c[k]);return this}if(r=La.getElementById(k[2]),r&&r.parentNode){if(r.id!==k[2])return ka.find(a);this.length=1;this[0]=r}return this.context=La,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):b.isFunction(a)?'undefined'!=
|
|
187
|
+
typeof g.ready?g.ready(a):a(b):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),b.makeArray(a,this))}).prototype=b.fn;var ka=b(La);var wa=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({has:function(a){var c,g=b(a,this),k=g.length;return this.filter(function(){for(c=0;k>c;c++)if(b.contains(this,g[c]))return!0})},closest:function(a,c){for(var g,k=0,r=this.length,C=[],J=ba.test(a)||'string'!=typeof a?b(a,c||this.context):0;r>k;k++)for(g=
|
|
188
188
|
this[k];g&&g!==c;g=g.parentNode)if(11>g.nodeType&&(J?-1<J.index(g):1===g.nodeType&&b.find.matchesSelector(g,a))){C.push(g);break}return this.pushStack(1<C.length?b.uniqueSort(C):C)},index:function(a){return a?'string'==typeof a?b.inArray(this[0],b(a)):b.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,c){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(a,c))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});
|
|
189
|
-
b.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return aa(a,'parentNode')},parentsUntil:function(a,c,g){return aa(a,'parentNode',g)},next:function(a){return U(a,'nextSibling')},prev:function(a){return U(a,'previousSibling')},nextAll:function(a){return aa(a,'nextSibling')},prevAll:function(a){return aa(a,'previousSibling')},nextUntil:function(a,c,g){return aa(a,'nextSibling',g)},prevUntil:function(a,c,g){return aa(a,'previousSibling',g)},siblings:function(a){return
|
|
190
|
-
{}).firstChild,a)},children:function(a){return
|
|
191
|
-
r,C=[],J=[],Z=-1,
|
|
192
|
-
b.inArray(Ra,C,Ua));)C.splice(Ua,1),Z>=Ua&&Z--}),this},has:function(ua){return ua?-1<b.inArray(ua,C):0<C.length},empty:function(){return C&&=[],this},disable:function(){return r=J=[],C=g='',this},disabled:function(){return!C},lock:function(){return r=!0,g||Ca.disable(),this},locked:function(){return!!r},fireWith:function(ua,Ra){return r||(Ra=Ra||[],Ra=[ua,Ra.slice?Ra.slice():Ra],J.push(Ra),c||
|
|
193
|
-
b.extend({Deferred:function(a){var c=[['resolve','done',b.Callbacks('once memory'),'resolved'],['reject','fail',b.Callbacks('once memory'),'rejected'],['notify','progress',b.Callbacks('memory')]],g='pending',k={state:function(){return g},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var C=arguments;return b.Deferred(function(J){b.each(c,function(Z,
|
|
194
|
-
ua.promise().progress(J.notify).done(J.resolve).fail(J.reject):J[
|
|
195
|
-
db.call(arguments),k=g.length,r=1!==k||a&&b.isFunction(a.promise)?k:0,C=1===r?a:b.Deferred(),J=function(ua,Ra,Ua){return function(zb){Ra[ua]=this;Ua[ua]=1<arguments.length?db.call(arguments):zb;Ua===
|
|
196
|
-
this};b.extend({isReady:!1,readyWait:1,holdReady:function(a){a?b.readyWait++:b.ready(!0)},ready:function(a){(!0===a?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==a&&0<--b.readyWait||(
|
|
197
|
-
R),B.addEventListener('load',R);else{
|
|
198
|
-
k=
|
|
199
|
-
g=+a.nodeType||1;return 1!==g&&9!==g?!1:!c||!0!==c&&a.getAttribute('classid')===c},Ab=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Bb=/([A-Z])/g;b.extend({cache:{},noData:{'applet ':!0,'embed ':!0,'object ':'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'},hasData:function(a){return a=a.nodeType?b.cache[a[b.expando]]:a[b.expando],!!a&&!u(a)},data:function(a,c,g){return I(a,c,g)},removeData:function(a,c){return
|
|
189
|
+
b.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return aa(a,'parentNode')},parentsUntil:function(a,c,g){return aa(a,'parentNode',g)},next:function(a){return U(a,'nextSibling')},prev:function(a){return U(a,'previousSibling')},nextAll:function(a){return aa(a,'nextSibling')},prevAll:function(a){return aa(a,'previousSibling')},nextUntil:function(a,c,g){return aa(a,'nextSibling',g)},prevUntil:function(a,c,g){return aa(a,'previousSibling',g)},siblings:function(a){return xa((a.parentNode||
|
|
190
|
+
{}).firstChild,a)},children:function(a){return xa(a.firstChild)},contents:function(a){return b.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:b.merge([],a.childNodes)}},function(a,c){b.fn[a]=function(g,k){var r=b.map(this,c,g);return'Until'!==a.slice(-5)&&(k=g),k&&'string'==typeof k&&(r=b.filter(k,r)),1<this.length&&(Y[a]||(r=b.uniqueSort(r)),wa.test(a)&&(r=r.reverse())),this.pushStack(r)}});var pa=/\S+/g;b.Callbacks=function(a){a='string'==typeof a?N(a):b.extend({},a);var c,g,k,
|
|
191
|
+
r,C=[],J=[],Z=-1,qa=function(){r=a.once;for(k=c=!0;J.length;Z=-1)for(g=J.shift();++Z<C.length;)!1===C[Z].apply(g[0],g[1])&&a.stopOnFalse&&(Z=C.length,g=!1);a.memory||(g=!1);c=!1;r&&(C=g?[]:'')},Ca={add:function(){return C&&(g&&!c&&(Z=C.length-1,J.push(g)),function Ua(Ra){b.each(Ra,function(zb,ab){b.isFunction(ab)?a.unique&&Ca.has(ab)||C.push(ab):ab&&ab.length&&'string'!==b.type(ab)&&Ua(ab)})}(arguments),g&&!c&&qa()),this},remove:function(){return b.each(arguments,function(ua,Ra){for(var Ua;-1<(Ua=
|
|
192
|
+
b.inArray(Ra,C,Ua));)C.splice(Ua,1),Z>=Ua&&Z--}),this},has:function(ua){return ua?-1<b.inArray(ua,C):0<C.length},empty:function(){return C&&=[],this},disable:function(){return r=J=[],C=g='',this},disabled:function(){return!C},lock:function(){return r=!0,g||Ca.disable(),this},locked:function(){return!!r},fireWith:function(ua,Ra){return r||(Ra=Ra||[],Ra=[ua,Ra.slice?Ra.slice():Ra],J.push(Ra),c||qa()),this},fire:function(){return Ca.fireWith(this,arguments),this},fired:function(){return!!k}};return Ca};
|
|
193
|
+
b.extend({Deferred:function(a){var c=[['resolve','done',b.Callbacks('once memory'),'resolved'],['reject','fail',b.Callbacks('once memory'),'rejected'],['notify','progress',b.Callbacks('memory')]],g='pending',k={state:function(){return g},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var C=arguments;return b.Deferred(function(J){b.each(c,function(Z,qa){var Ca=b.isFunction(C[Z])&&C[Z];r[qa[1]](function(){var ua=Ca&&Ca.apply(this,arguments);ua&&b.isFunction(ua.promise)?
|
|
194
|
+
ua.promise().progress(J.notify).done(J.resolve).fail(J.reject):J[qa[0]+'With'](this===k?J.promise():this,Ca?[ua]:arguments)})});C=null}).promise()},promise:function(C){return null!=C?b.extend(C,k):k}},r={};return k.pipe=k.then,b.each(c,function(C,J){var Z=J[2],qa=J[3];k[J[1]]=Z.add;qa&&Z.add(function(){g=qa},c[1^C][2].disable,c[2][2].lock);r[J[0]]=function(){return r[J[0]+'With'](this===r?k:this,arguments),this};r[J[0]+'With']=Z.fireWith}),k.promise(r),a&&a.call(r,r),r},when:function(a){var c=0,g=
|
|
195
|
+
db.call(arguments),k=g.length,r=1!==k||a&&b.isFunction(a.promise)?k:0,C=1===r?a:b.Deferred(),J=function(ua,Ra,Ua){return function(zb){Ra[ua]=this;Ua[ua]=1<arguments.length?db.call(arguments):zb;Ua===qa?C.notifyWith(Ra,Ua):--r||C.resolveWith(Ra,Ua)}},Z;if(1<k){var qa=Array(k);var Ca=Array(k);for(Z=Array(k);k>c;c++)g[c]&&b.isFunction(g[c].promise)?g[c].promise().progress(J(c,Ca,qa)).done(J(c,Z,g)).fail(C.reject):--r}return r||C.resolveWith(Z,g),C.promise()}});var Ka;b.fn.ready=function(a){return b.ready.promise().done(a),
|
|
196
|
+
this};b.extend({isReady:!1,readyWait:1,holdReady:function(a){a?b.readyWait++:b.ready(!0)},ready:function(a){(!0===a?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==a&&0<--b.readyWait||(Ka.resolveWith(La,[b]),b.fn.triggerHandler&&(b(La).triggerHandler('ready'),b(La).off('ready'))))}});b.ready.promise=function(a){if(!Ka)if(Ka=b.Deferred(),'complete'===La.readyState||'loading'!==La.readyState&&!La.documentElement.doScroll)B.setTimeout(b.ready);else if(La.addEventListener)La.addEventListener('DOMContentLoaded',
|
|
197
|
+
R),B.addEventListener('load',R);else{La.attachEvent('onreadystatechange',R);B.attachEvent('onload',R);var c=!1;try{c=null==B.frameElement&&La.documentElement}catch(g){}c&&c.doScroll&&!function k(){if(!b.isReady){try{c.doScroll('left')}catch(r){return B.setTimeout(k,50)}ha();b.ready()}}()}return Ka.promise(a)};b.ready.promise();for(var Ta in b(e))break;e.ownFirst='0'===Ta;e.inlineBlockNeedsLayout=!1;b(function(){var a,c,g,k;(g=La.getElementsByTagName('body')[0])&&g.style&&(c=La.createElement('div'),
|
|
198
|
+
k=La.createElement('div'),k.style.cssText='position:absolute;border:0;width:0;height:0;top:0;left:-9999px',g.appendChild(k).appendChild(c),'undefined'!=typeof c.style.zoom&&(c.style.cssText='display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1',e.inlineBlockNeedsLayout=a=3===c.offsetWidth,a&&(g.style.zoom=1)),g.removeChild(k))});(function(){var a=La.createElement('div');e.deleteExpando=!0;try{delete a.test}catch(c){e.deleteExpando=!1}})();var $a=function(a){var c=b.noData[(a.nodeName+' ').toLowerCase()],
|
|
199
|
+
g=+a.nodeType||1;return 1!==g&&9!==g?!1:!c||!0!==c&&a.getAttribute('classid')===c},Ab=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Bb=/([A-Z])/g;b.extend({cache:{},noData:{'applet ':!0,'embed ':!0,'object ':'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'},hasData:function(a){return a=a.nodeType?b.cache[a[b.expando]]:a[b.expando],!!a&&!u(a)},data:function(a,c,g){return I(a,c,g)},removeData:function(a,c){return v(a,c)},_data:function(a,c,g){return I(a,c,g,!0)},_removeData:function(a,c){return v(a,c,!0)}});b.fn.extend({data:function(a,
|
|
200
200
|
c){var g,k,r,C=this[0],J=C&&C.attributes;if(void 0===a){if(this.length&&(r=b.data(C),1===C.nodeType&&!b._data(C,'parsedAttrs'))){for(g=J.length;g--;)J[g]&&(k=J[g].name,0===k.indexOf('data-')&&(k=b.camelCase(k.slice(5)),S(C,k,r[k])));b._data(C,'parsedAttrs',!0)}return r}return'object'==typeof a?this.each(function(){b.data(this,a)}):1<arguments.length?this.each(function(){b.data(this,a,c)}):C?S(C,a,b.data(C,a)):void 0},removeData:function(a){return this.each(function(){b.removeData(this,a)})}});b.extend({queue:function(a,
|
|
201
201
|
c,g){var k;return a?(c=(c||'fx')+'queue',k=b._data(a,c),g&&(!k||b.isArray(g)?k=b._data(a,c,b.makeArray(g)):k.push(g)),k||[]):void 0},dequeue:function(a,c){c=c||'fx';var g=b.queue(a,c),k=g.length,r=g.shift(),C=b._queueHooks(a,c),J=function(){b.dequeue(a,c)};'inprogress'===r&&(r=g.shift(),k--);r&&('fx'===c&&g.unshift('inprogress'),delete C.stop,r.call(a,J,C));!k&&C&&C.empty.fire()},_queueHooks:function(a,c){var g=c+'queueHooks';return b._data(a,g)||b._data(a,g,{empty:b.Callbacks('once memory').add(function(){b._removeData(a,
|
|
202
202
|
c+'queue');b._removeData(a,g)})})}});b.fn.extend({queue:function(a,c){var g=2;return'string'!=typeof a&&(c=a,a='fx',g--),arguments.length<g?b.queue(this[0],a):void 0===c?this:this.each(function(){var k=b.queue(this,a,c);b._queueHooks(this,a);'fx'===a&&'inprogress'!==k[0]&&b.dequeue(this,a)})},dequeue:function(a){return this.each(function(){b.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||'fx',[])},promise:function(a,c){var g,k=1,r=b.Deferred(),C=this,J=this.length,Z=function(){--k||
|
|
203
|
-
r.resolveWith(C,[C])};'string'!=typeof a&&(c=a,a=void 0);for(a=a||'fx';J--;)(g=b._data(C[J],a+'queueHooks'))&&g.empty&&(k++,g.empty.add(Z));return Z(),r.promise(c)}});(function(){var a;e.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var c,g,k;return g=
|
|
204
|
-
(c.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',c.appendChild(
|
|
205
|
-
fa=function(a,c,g,k,r,C,J){var Z=0,
|
|
206
|
-
g=
|
|
207
|
-
c.appendChild(a);g=
|
|
208
|
-
tr:[2,'<table><tbody>','</tbody></table>'],col:[2,'<table><tbody></tbody><colgroup>','</colgroup></table>'],td:[3,'<table><tbody><tr>','</tr></tbody></table>'],_default:e.htmlSerialize?[0,'','']:[1,'X<div>','</div>']};Va.optgroup=Va.option;Va.tbody=Va.tfoot=Va.colgroup=Va.caption=Va.thead;Va.th=Va.td;var
|
|
209
|
-
var sb=/^(?:input|select|textarea)$/i,
|
|
210
|
-
a);c=(c||'').match(
|
|
211
|
-
!1):a.attachEvent&&a.attachEvent('on'+ab,Ca))),
|
|
212
|
-
[];J=J[2]&&new RegExp('(^|\\.)'+Ra.join('\\.(?:.*\\.|)')+'(\\.|$)');for(Z=C=Jb.length;C--;){var jc=Jb[C];!r&&Ua!==jc.origType||g&&g.guid!==jc.guid||J&&!J.test(jc.namespace)||k&&k!==jc.selector&&('**'!==k||!jc.selector)||(Jb.splice(C,1),jc.selector&&Jb.delegateCount--,ab.remove&&ab.remove.call(a,jc))}Z&&!Jb.length&&(ab.teardown&&!1!==ab.teardown.call(a,Ra,zb.handle)||b.removeEvent(a,ua,zb.handle),delete Ca[ua])}else for(ua in Ca)b.event.remove(a,ua+c[
|
|
213
|
-
b._removeData(a,'events'))}},trigger:function(a,c,g,k){var r,C,J,Z,
|
|
214
|
-
'(\\.|$)'):null,a.result=void 0,a.target||(a.target=g),c=null==c?[a]:b.makeArray(c,[a]),Z=b.event.special[Ca]||{},k||!Z.trigger||!1!==Z.trigger.apply(g,c))){if(!k&&!Z.noBubble&&!b.isWindow(g)){var Ra=Z.delegateType||Ca;for(
|
|
215
|
-
c),(r=C&&J[C])&&r.apply&&$a(J)&&(a.result=r.apply(J,c),!1===a.result&&a.preventDefault());if(a.type=Ca,!(k||a.isDefaultPrevented()||Z._default&&!1!==Z._default.apply(
|
|
216
|
-
this,!Z.preDispatch||!1!==Z.preDispatch.call(this,a)){var
|
|
217
|
-
a.result}},handlers:function(a,c){var g,k=[],r=c.delegateCount,C=a.target;if(r&&C.nodeType&&('click'!==a.type||isNaN(a.button)||1>a.button))for(;C!=this;C=C.parentNode||this)if(1===C.nodeType&&(!0!==C.disabled||'click'!==a.type)){var J=[];for(g=0;r>g;g++){var Z=c[g];var
|
|
218
|
-
var c=a.type;var g=a,k=this.fixHooks[c];k||(this.fixHooks[c]=k=eb.test(c)?this.mouseHooks:
|
|
219
|
-
fixHooks:{},keyHooks:{props:['char','charCode','key','keyCode'],filter:function(a,c){return null==a.which&&(a.which=null!=c.charCode?c.charCode:c.keyCode),a}},mouseHooks:{props:'button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' '),filter:function(a,c){var g,k,r,C=c.button,J=c.fromElement;return null==a.pageX&&null!=c.clientX&&(k=a.target.ownerDocument||
|
|
203
|
+
r.resolveWith(C,[C])};'string'!=typeof a&&(c=a,a=void 0);for(a=a||'fx';J--;)(g=b._data(C[J],a+'queueHooks'))&&g.empty&&(k++,g.empty.add(Z));return Z(),r.promise(c)}});(function(){var a;e.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var c,g,k;return g=La.getElementsByTagName('body')[0],g&&g.style?(c=La.createElement('div'),k=La.createElement('div'),k.style.cssText='position:absolute;border:0;width:0;height:0;top:0;left:-9999px',g.appendChild(k).appendChild(c),'undefined'!=typeof c.style.zoom&&
|
|
204
|
+
(c.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',c.appendChild(La.createElement('div')).style.width='5px',a=3!==c.offsetWidth),g.removeChild(k),a):void 0}})();var gb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Hb=new RegExp('^(?:([+-])=|)('+gb+')([a-z%]*)$','i'),Wa=['Top','Right','Bottom','Left'],cb=function(a,c){return a=c||a,'none'===b.css(a,'display')||!b.contains(a.ownerDocument,a)},
|
|
205
|
+
fa=function(a,c,g,k,r,C,J){var Z=0,qa=a.length,Ca=null==g;if('object'===b.type(g))for(Z in r=!0,g)fa(a,c,Z,g[Z],!0,C,J);else if(void 0!==k&&(r=!0,b.isFunction(k)||(J=!0),Ca&&(J?(c.call(a,k),c=null):(Ca=c,c=function(ua,Ra,Ua){return Ca.call(b(ua),Ua)})),c))for(;qa>Z;Z++)c(a[Z],g,J?k:k.call(a[Z],Z,c(a[Z],g)));return r?a:Ca?c.call(a):qa?c(a[0],g):C},X=/^(?:checkbox|radio)$/i,ja=/<([\w:-]+)/,ta=/^$|\/(?:java|ecma)script/i,Na=/^\s+/;!function(){var a=La.createElement('div'),c=La.createDocumentFragment(),
|
|
206
|
+
g=La.createElement('input');a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";e.leadingWhitespace=3===a.firstChild.nodeType;e.tbody=!a.getElementsByTagName('tbody').length;e.htmlSerialize=!!a.getElementsByTagName('link').length;e.html5Clone='<:nav></:nav>'!==La.createElement('nav').cloneNode(!0).outerHTML;g.type='checkbox';g.checked=!0;c.appendChild(g);e.appendChecked=g.checked;a.innerHTML='<textarea>x</textarea>';e.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue;
|
|
207
|
+
c.appendChild(a);g=La.createElement('input');g.setAttribute('type','radio');g.setAttribute('checked','checked');g.setAttribute('name','t');a.appendChild(g);e.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;e.noCloneEvent=!!a.addEventListener;a[b.expando]=1;e.attributes=!a.getAttribute(b.expando)}();var Va={option:[1,"<select multiple='multiple'>",'</select>'],legend:[1,'<fieldset>','</fieldset>'],area:[1,'<map>','</map>'],param:[1,'<object>','</object>'],thead:[1,'<table>','</table>'],
|
|
208
|
+
tr:[2,'<table><tbody>','</tbody></table>'],col:[2,'<table><tbody></tbody><colgroup>','</colgroup></table>'],td:[3,'<table><tbody><tr>','</tr></tbody></table>'],_default:e.htmlSerialize?[0,'','']:[1,'X<div>','</div>']};Va.optgroup=Va.option;Va.tbody=Va.tfoot=Va.colgroup=Va.caption=Va.thead;Va.th=Va.td;var hb=/<|&#?\w+;/,Oa=/<tbody/i;!function(){var a,c=La.createElement('div');for(a in{submit:!0,change:!0,focusin:!0}){var g='on'+a;(e[a]=g in B)||(c.setAttribute(g,'t'),e[a]=!1===c.attributes[g].expando)}}();
|
|
209
|
+
var sb=/^(?:input|select|textarea)$/i,jb=/^key/,eb=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fb=/^(?:focusinfocus|focusoutblur)$/,rb=/^([^.]*)(?:\.(.+)|)/;b.event={global:{},add:function(a,c,g,k,r){var C,J,Z,qa,Ca,ua,Ra,Ua;if(J=b._data(a)){g.handler&&(Z=g,g=Z.handler,r=Z.selector);g.guid||(g.guid=b.guid++);(C=J.events)||(C=J.events={});(Ca=J.handle)||(Ca=J.handle=function(Jb){return'undefined'==typeof b||Jb&&b.event.triggered===Jb.type?void 0:b.event.dispatch.apply(Ca.elem,arguments)},Ca.elem=
|
|
210
|
+
a);c=(c||'').match(pa)||[''];for(J=c.length;J--;){var zb=rb.exec(c[J])||[];var ab=Ua=zb[1];zb=(zb[2]||'').split('.').sort();ab&&(qa=b.event.special[ab]||{},ab=(r?qa.delegateType:qa.bindType)||ab,qa=b.event.special[ab]||{},ua=b.extend({type:ab,origType:Ua,data:k,handler:g,guid:g.guid,selector:r,needsContext:r&&b.expr.match.needsContext.test(r),namespace:zb.join('.')},Z),(Ra=C[ab])||(Ra=C[ab]=[],Ra.delegateCount=0,qa.setup&&!1!==qa.setup.call(a,k,zb,Ca)||(a.addEventListener?a.addEventListener(ab,Ca,
|
|
211
|
+
!1):a.attachEvent&&a.attachEvent('on'+ab,Ca))),qa.add&&(qa.add.call(a,ua),ua.handler.guid||(ua.handler.guid=g.guid)),r?Ra.splice(Ra.delegateCount++,0,ua):Ra.push(ua),b.event.global[ab]=!0)}a=null}},remove:function(a,c,g,k,r){var C,J,Z,qa,Ca,ua,Ra,Ua,zb=b.hasData(a)&&b._data(a);if(zb&&(Ca=zb.events)){c=(c||'').match(pa)||[''];for(qa=c.length;qa--;)if(J=rb.exec(c[qa])||[],ua=Ua=J[1],Ra=(J[2]||'').split('.').sort(),ua){var ab=b.event.special[ua]||{};ua=(k?ab.delegateType:ab.bindType)||ua;var Jb=Ca[ua]||
|
|
212
|
+
[];J=J[2]&&new RegExp('(^|\\.)'+Ra.join('\\.(?:.*\\.|)')+'(\\.|$)');for(Z=C=Jb.length;C--;){var jc=Jb[C];!r&&Ua!==jc.origType||g&&g.guid!==jc.guid||J&&!J.test(jc.namespace)||k&&k!==jc.selector&&('**'!==k||!jc.selector)||(Jb.splice(C,1),jc.selector&&Jb.delegateCount--,ab.remove&&ab.remove.call(a,jc))}Z&&!Jb.length&&(ab.teardown&&!1!==ab.teardown.call(a,Ra,zb.handle)||b.removeEvent(a,ua,zb.handle),delete Ca[ua])}else for(ua in Ca)b.event.remove(a,ua+c[qa],g,k,!0);b.isEmptyObject(Ca)&&(delete zb.handle,
|
|
213
|
+
b._removeData(a,'events'))}},trigger:function(a,c,g,k){var r,C,J,Z,qa=[g||La],Ca=h.call(a,'type')?a.type:a;var ua=h.call(a,'namespace')?a.namespace.split('.'):[];if(J=r=g=g||La,3!==g.nodeType&&8!==g.nodeType&&!fb.test(Ca+b.event.triggered)&&(-1<Ca.indexOf('.')&&(ua=Ca.split('.'),Ca=ua.shift(),ua.sort()),C=0>Ca.indexOf(':')&&'on'+Ca,a=a[b.expando]?a:new b.Event(Ca,'object'==typeof a&&a),a.isTrigger=k?2:3,a.namespace=ua.join('.'),a.rnamespace=a.namespace?new RegExp('(^|\\.)'+ua.join('\\.(?:.*\\.|)')+
|
|
214
|
+
'(\\.|$)'):null,a.result=void 0,a.target||(a.target=g),c=null==c?[a]:b.makeArray(c,[a]),Z=b.event.special[Ca]||{},k||!Z.trigger||!1!==Z.trigger.apply(g,c))){if(!k&&!Z.noBubble&&!b.isWindow(g)){var Ra=Z.delegateType||Ca;for(fb.test(Ra+Ca)||(J=J.parentNode);J;J=J.parentNode)qa.push(J),r=J;r===(g.ownerDocument||La)&&qa.push(r.defaultView||r.parentWindow||B)}for(ua=0;(J=qa[ua++])&&!a.isPropagationStopped();)a.type=1<ua?Ra:Z.bindType||Ca,(r=(b._data(J,'events')||{})[a.type]&&b._data(J,'handle'))&&r.apply(J,
|
|
215
|
+
c),(r=C&&J[C])&&r.apply&&$a(J)&&(a.result=r.apply(J,c),!1===a.result&&a.preventDefault());if(a.type=Ca,!(k||a.isDefaultPrevented()||Z._default&&!1!==Z._default.apply(qa.pop(),c))&&$a(g)&&C&&g[Ca]&&!b.isWindow(g)){(r=g[C])&&(g[C]=null);b.event.triggered=Ca;try{g[Ca]()}catch(Ua){}b.event.triggered=void 0;r&&(g[C]=r)}return a.result}},dispatch:function(a){a=b.event.fix(a);var c,g,k,r,C=db.call(arguments);var J=(b._data(this,'events')||{})[a.type]||[];var Z=b.event.special[a.type]||{};if(C[0]=a,a.delegateTarget=
|
|
216
|
+
this,!Z.preDispatch||!1!==Z.preDispatch.call(this,a)){var qa=b.event.handlers.call(this,a,J);for(J=0;(k=qa[J++])&&!a.isPropagationStopped();)for(a.currentTarget=k.elem,c=0;(r=k.handlers[c++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,g=((b.event.special[r.origType]||{}).handle||r.handler).apply(k.elem,C),void 0!==g&&!1===(a.result=g)&&(a.preventDefault(),a.stopPropagation()));return Z.postDispatch&&Z.postDispatch.call(this,a),
|
|
217
|
+
a.result}},handlers:function(a,c){var g,k=[],r=c.delegateCount,C=a.target;if(r&&C.nodeType&&('click'!==a.type||isNaN(a.button)||1>a.button))for(;C!=this;C=C.parentNode||this)if(1===C.nodeType&&(!0!==C.disabled||'click'!==a.type)){var J=[];for(g=0;r>g;g++){var Z=c[g];var qa=Z.selector+' ';void 0===J[qa]&&(J[qa]=Z.needsContext?-1<b(qa,this).index(C):b.find(qa,this,null,[C]).length);J[qa]&&J.push(Z)}J.length&&k.push({elem:C,handlers:J})}return r<c.length&&k.push({elem:this,handlers:c.slice(r)}),k},fix:function(a){if(a[b.expando])return a;
|
|
218
|
+
var c=a.type;var g=a,k=this.fixHooks[c];k||(this.fixHooks[c]=k=eb.test(c)?this.mouseHooks:jb.test(c)?this.keyHooks:{});var r=k.props?this.props.concat(k.props):this.props;a=new b.Event(g);for(c=r.length;c--;){var C=r[c];a[C]=g[C]}return a.target||(a.target=g.srcElement||La),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,k.filter?k.filter(a,g):a},props:'altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(' '),
|
|
219
|
+
fixHooks:{},keyHooks:{props:['char','charCode','key','keyCode'],filter:function(a,c){return null==a.which&&(a.which=null!=c.charCode?c.charCode:c.keyCode),a}},mouseHooks:{props:'button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' '),filter:function(a,c){var g,k,r,C=c.button,J=c.fromElement;return null==a.pageX&&null!=c.clientX&&(k=a.target.ownerDocument||La,r=k.documentElement,g=k.body,a.pageX=c.clientX+(r&&r.scrollLeft||g&&g.scrollLeft||0)-(r&&
|
|
220
220
|
r.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(r&&r.scrollTop||g&&g.scrollTop||0)-(r&&r.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&J&&(a.relatedTarget=J===a.target?c.toElement:J),a.which||void 0===C||(a.which=1&C?1:2&C?3:4&C?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==z()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:'focusin'},blur:{trigger:function(){return this===z()&&this.blur?(this.blur(),!1):void 0},delegateType:'focusout'},click:{trigger:function(){return b.nodeName(this,
|
|
221
|
-
'input')&&'checkbox'===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return b.nodeName(a.target,'a')}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,c,g){a=b.extend(new b.Event,g,{type:a,isSimulated:!0});b.event.trigger(a,null,c);a.isDefaultPrevented()&&g.preventDefault()}};b.removeEvent=
|
|
221
|
+
'input')&&'checkbox'===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return b.nodeName(a.target,'a')}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,c,g){a=b.extend(new b.Event,g,{type:a,isSimulated:!0});b.event.trigger(a,null,c);a.isDefaultPrevented()&&g.preventDefault()}};b.removeEvent=La.removeEventListener?function(a,c,g){a.removeEventListener&&a.removeEventListener(c,g)}:function(a,
|
|
222
222
|
c,g){c='on'+c;a.detachEvent&&('undefined'==typeof a[c]&&(a[c]=null),a.detachEvent(c,g))};b.Event=function(a,c){return this instanceof b.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?n:y):this.type=a,c&&b.extend(this,c),this.timeStamp=a&&a.timeStamp||b.now(),void(this[b.expando]=!0)):new b.Event(a,c)};b.Event.prototype={constructor:b.Event,isDefaultPrevented:y,isPropagationStopped:y,isImmediatePropagationStopped:y,
|
|
223
223
|
preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=n;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=n;a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=n;a&&a.stopImmediatePropagation&&a.stopImmediatePropagation();this.stopPropagation()}};b.each({mouseenter:'mouseover',
|
|
224
224
|
mouseleave:'mouseout',pointerenter:'pointerover',pointerleave:'pointerout'},function(a,c){b.event.special[a]={delegateType:c,bindType:c,handle:function(g){var k,r=g.relatedTarget,C=g.handleObj;return r&&(r===this||b.contains(this,r))||(g.type=C.origType,k=C.handler.apply(this,arguments),g.type=c),k}}});e.submit||(b.event.special.submit={setup:function(){return b.nodeName(this,'form')?!1:void b.event.add(this,'click._submit keypress._submit',function(a){a=a.target;(a=b.nodeName(a,'input')||b.nodeName(a,
|
|
@@ -226,23 +226,23 @@ mouseleave:'mouseout',pointerenter:'pointerover',pointerleave:'pointerout'},func
|
|
|
226
226
|
this.type||(b.event.add(this,'propertychange._change',function(a){'checked'===a.originalEvent.propertyName&&(this._justChanged=!0)}),b.event.add(this,'click._change',function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1);b.event.simulate('change',this,a)})),!1):void b.event.add(this,'beforeactivate._change',function(a){a=a.target;sb.test(a.nodeName)&&!b._data(a,'change')&&(b.event.add(a,'change._change',function(c){!this.parentNode||c.isSimulated||c.isTrigger||b.event.simulate('change',
|
|
227
227
|
this.parentNode,c)}),b._data(a,'change',!0))})},handle:function(a){var c=a.target;return this!==c||a.isSimulated||a.isTrigger||'radio'!==c.type&&'checkbox'!==c.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return b.event.remove(this,'._change'),!sb.test(this.nodeName)}});e.focusin||b.each({focus:'focusin',blur:'focusout'},function(a,c){var g=function(k){b.event.simulate(c,k.target,b.event.fix(k))};b.event.special[c]={setup:function(){var k=this.ownerDocument||this,r=b._data(k,
|
|
228
228
|
c);r||k.addEventListener(a,g,!0);b._data(k,c,(r||0)+1)},teardown:function(){var k=this.ownerDocument||this,r=b._data(k,c)-1;r?b._data(k,c,r):(k.removeEventListener(a,g,!0),b._removeData(k,c))}}});b.fn.extend({on:function(a,c,g,k){return F(this,a,c,g,k)},one:function(a,c,g,k){return F(this,a,c,g,k,1)},off:function(a,c,g){var k,r;if(a&&a.preventDefault&&a.handleObj)return k=a.handleObj,b(a.delegateTarget).off(k.namespace?k.origType+'.'+k.namespace:k.origType,k.selector,k.handler),this;if('object'==
|
|
229
|
-
typeof a){for(r in a)this.off(r,c,a[r]);return this}return!1!==c&&'function'!=typeof c||(g=c,c=void 0),!1===g&&(g=y),this.each(function(){b.event.remove(this,a,g,c)})},trigger:function(a,c){return this.each(function(){b.event.trigger(a,c,this)})},triggerHandler:function(a,c){var g=this[0];return g?b.event.trigger(a,c,g,!0):void 0}});var
|
|
230
|
-
'i'),Eb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ib=/<script|<style|<link/i,Kb=/checked\s*(?:[^=]|=\s*.checked.)/i,Zb=/^true\/(.*)/,Xb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Dc=va(
|
|
231
|
-
Dc.firstChild)),!(e.noCloneEvent&&e.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||b.isXMLDoc(a))){var Z=P(r);var
|
|
232
|
-
!b.trim(Ua.innerHTML)&&(Ua.innerHTML=Ra.innerHTML)):'input'===ua&&X.test(Ra.type)?(Ua.defaultChecked=Ua.checked=Ra.checked,Ua.value!==Ra.value&&(Ua.value=Ra.value)):'option'===ua?Ua.defaultSelected=Ua.selected=Ra.defaultSelected:'input'!==ua&&'textarea'!==ua||(Ua.defaultValue=Ra.defaultValue)}}}if(c)if(g)for(
|
|
233
|
-
Ca=e.attributes,ua=b.event.special;null!=(g=a[J]);J++)if((c||$a(g))&&(r=g[Z],C=r&&
|
|
234
|
-
|
|
229
|
+
typeof a){for(r in a)this.off(r,c,a[r]);return this}return!1!==c&&'function'!=typeof c||(g=c,c=void 0),!1===g&&(g=y),this.each(function(){b.event.remove(this,a,g,c)})},trigger:function(a,c){return this.each(function(){b.event.trigger(a,c,this)})},triggerHandler:function(a,c){var g=this[0];return g?b.event.trigger(a,c,g,!0):void 0}});var kb=/ jQuery\d+="(?:null|\d+)"/g,Mb=RegExp('<(?: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)[\\s/>]',
|
|
230
|
+
'i'),Eb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ib=/<script|<style|<link/i,Kb=/checked\s*(?:[^=]|=\s*.checked.)/i,Zb=/^true\/(.*)/,Xb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Dc=va(La).appendChild(La.createElement('div'));b.extend({htmlPrefilter:function(a){return a.replace(Eb,'<$1></$2>')},clone:function(a,c,g){var k,r,C,J=b.contains(a.ownerDocument,a);if(e.html5Clone||b.isXMLDoc(a)||!Mb.test('<'+a.nodeName+'>')?r=a.cloneNode(!0):(Dc.innerHTML=a.outerHTML,Dc.removeChild(r=
|
|
231
|
+
Dc.firstChild)),!(e.noCloneEvent&&e.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||b.isXMLDoc(a))){var Z=P(r);var qa=P(a);for(C=0;null!=(k=qa[C]);++C)if(Z[C]){var Ca=void 0,ua,Ra=k,Ua=Z[C];if(1===Ua.nodeType){if(ua=Ua.nodeName.toLowerCase(),!e.noCloneEvent&&Ua[b.expando]){k=b._data(Ua);for(Ca in k.events)b.removeEvent(Ua,Ca,k.handle);Ua.removeAttribute(b.expando)}'script'===ua&&Ua.text!==Ra.text?(x(Ua).text=Ra.text,G(Ua)):'object'===ua?(Ua.parentNode&&(Ua.outerHTML=Ra.outerHTML),e.html5Clone&&Ra.innerHTML&&
|
|
232
|
+
!b.trim(Ua.innerHTML)&&(Ua.innerHTML=Ra.innerHTML)):'input'===ua&&X.test(Ra.type)?(Ua.defaultChecked=Ua.checked=Ra.checked,Ua.value!==Ra.value&&(Ua.value=Ra.value)):'option'===ua?Ua.defaultSelected=Ua.selected=Ra.defaultSelected:'input'!==ua&&'textarea'!==ua||(Ua.defaultValue=Ra.defaultValue)}}}if(c)if(g)for(qa=qa||P(a),Z=Z||P(r),C=0;null!=(k=qa[C]);C++)M(k,Z[C]);else M(a,r);return Z=P(r,'script'),0<Z.length&&L(Z,!J&&P(a,'script')),r},cleanData:function(a,c){for(var g,k,r,C,J=0,Z=b.expando,qa=b.cache,
|
|
233
|
+
Ca=e.attributes,ua=b.event.special;null!=(g=a[J]);J++)if((c||$a(g))&&(r=g[Z],C=r&&qa[r])){if(C.events)for(k in C.events)ua[k]?b.event.remove(g,k):b.removeEvent(g,k,C.handle);qa[r]&&(delete qa[r],Ca||'undefined'==typeof g.removeAttribute?g[Z]=void 0:g.removeAttribute(Z),yb.push(r))}}});b.fn.extend({domManip:T,detach:function(a){return ra(this,a,!0)},remove:function(a){return ra(this,a)},text:function(a){return fa(this,function(c){return void 0===c?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||
|
|
234
|
+
La).createTextNode(c))},null,a,arguments.length)},append:function(){return T(this,arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||w(this,a).appendChild(a)})},prepend:function(){return T(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var c=w(this,a);c.insertBefore(a,c.firstChild)}})},before:function(){return T(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return T(this,arguments,
|
|
235
235
|
function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,c=0;null!=(a=this[c]);c++){for(1===a.nodeType&&b.cleanData(P(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&b.nodeName(a,'select')&&(a.options.length=0)}return this},clone:function(a,c){return a=null==a?!1:a,c=null==c?a:c,this.map(function(){return b.clone(this,a,c)})},html:function(a){return fa(this,function(c){var g=this[0]||{},k=0,r=this.length;if(void 0===c)return 1===g.nodeType?
|
|
236
|
-
g.innerHTML.replace(
|
|
237
|
-
this))},a)}});b.each({appendTo:'append',prependTo:'prepend',insertBefore:'before',insertAfter:'after',replaceAll:'replaceWith'},function(a,c){b.fn[a]=function(g){for(var k=0,r=[],C=b(g),J=C.length-1;J>=k;k++)g=k===J?this:this.clone(!0),b(C[k])[c](g),Ub.apply(r,g.get());return this.pushStack(r)}});var fc,Nb={HTML:'block',BODY:'block'},Pc=/^margin/,mc=new RegExp('^('+
|
|
238
|
-
C[r];return g},Qc=
|
|
239
|
-
Z.innerHTML='';J.appendChild(Z);e.boxSizing=''===Z.style.boxSizing||''===Z.style.MozBoxSizing||''===Z.style.WebkitBoxSizing;b.extend(e,{reliableHiddenOffsets:function(){return null==a&&
|
|
240
|
-
Ra.appendChild(J);Z.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%';a=g=C=!1;c=r=!0;B.getComputedStyle&&(ua=B.getComputedStyle(Z),a='1%'!==(ua||{}).top,C='2px'===(ua||{}).marginLeft,g='4px'===(ua||{width:'4px'}).width,Z.style.marginRight='50%',c='4px'===(ua||{marginRight:'4px'}).marginRight,Ca=Z.appendChild(
|
|
236
|
+
g.innerHTML.replace(kb,''):void 0;if(!('string'!=typeof c||Ib.test(c)||!e.htmlSerialize&&Mb.test(c)||!e.leadingWhitespace&&Na.test(c)||Va[(ja.exec(c)||['',''])[1].toLowerCase()])){c=b.htmlPrefilter(c);try{for(;r>k;k++)g=this[k]||{},1===g.nodeType&&(b.cleanData(P(g,!1)),g.innerHTML=c);g=0}catch(C){}}g&&this.empty().append(c)},null,a,arguments.length)},replaceWith:function(){var a=[];return T(this,arguments,function(c){var g=this.parentNode;0>b.inArray(this,a)&&(b.cleanData(P(this)),g&&g.replaceChild(c,
|
|
237
|
+
this))},a)}});b.each({appendTo:'append',prependTo:'prepend',insertBefore:'before',insertAfter:'after',replaceAll:'replaceWith'},function(a,c){b.fn[a]=function(g){for(var k=0,r=[],C=b(g),J=C.length-1;J>=k;k++)g=k===J?this:this.clone(!0),b(C[k])[c](g),Ub.apply(r,g.get());return this.pushStack(r)}});var fc,Nb={HTML:'block',BODY:'block'},Pc=/^margin/,mc=new RegExp('^('+gb+')(?!px)[a-z%]+$','i'),Lc=function(a,c,g,k){var r,C={};for(r in c)C[r]=a.style[r],a.style[r]=c[r];g=g.apply(a,k||[]);for(r in c)a.style[r]=
|
|
238
|
+
C[r];return g},Qc=La.documentElement;!function(){var a,c,g,k,r,C,J=La.createElement('div'),Z=La.createElement('div');if(Z.style){Z.style.cssText='float:left;opacity:.5';e.opacity='0.5'===Z.style.opacity;e.cssFloat=!!Z.style.cssFloat;Z.style.backgroundClip='content-box';Z.cloneNode(!0).style.backgroundClip='';e.clearCloneStyle='content-box'===Z.style.backgroundClip;J=La.createElement('div');J.style.cssText='border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute';
|
|
239
|
+
Z.innerHTML='';J.appendChild(Z);e.boxSizing=''===Z.style.boxSizing||''===Z.style.MozBoxSizing||''===Z.style.WebkitBoxSizing;b.extend(e,{reliableHiddenOffsets:function(){return null==a&&qa(),k},boxSizingReliable:function(){return null==a&&qa(),g},pixelMarginRight:function(){return null==a&&qa(),c},pixelPosition:function(){return null==a&&qa(),a},reliableMarginRight:function(){return null==a&&qa(),r},reliableMarginLeft:function(){return null==a&&qa(),C}});function qa(){var Ca,ua,Ra=La.documentElement;
|
|
240
|
+
Ra.appendChild(J);Z.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%';a=g=C=!1;c=r=!0;B.getComputedStyle&&(ua=B.getComputedStyle(Z),a='1%'!==(ua||{}).top,C='2px'===(ua||{}).marginLeft,g='4px'===(ua||{width:'4px'}).width,Z.style.marginRight='50%',c='4px'===(ua||{marginRight:'4px'}).marginRight,Ca=Z.appendChild(La.createElement('div')),Ca.style.cssText=Z.style.cssText='-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0',
|
|
241
241
|
Ca.style.marginRight=Ca.style.width='0',Z.style.width='1px',r=!parseFloat((B.getComputedStyle(Ca)||{}).marginRight),Z.removeChild(Ca));Z.style.display='none';(k=0===Z.getClientRects().length)&&(Z.style.display='',Z.innerHTML='<table><tr><td></td><td>t</td></tr></table>',Z.childNodes[0].style.borderCollapse='separate',Ca=Z.getElementsByTagName('td'),Ca[0].style.cssText='margin:0;border:0;padding:0;display:none',k=0===Ca[0].offsetHeight,k&&(Ca[0].style.display='',Ca[1].style.display='none',k=0===Ca[0].offsetHeight));
|
|
242
242
|
Ra.removeChild(J)}}}();var rc,sc,Rc=/^(top|right|bottom|left)$/;B.getComputedStyle?(rc=function(a){var c=a.ownerDocument.defaultView;return c&&c.opener||(c=B),c.getComputedStyle(a)},sc=function(a,c,g){var k,r,C,J,Z=a.style;return g=g||rc(a),J=g?g.getPropertyValue(c)||g[c]:void 0,''!==J&&void 0!==J||b.contains(a.ownerDocument,a)||(J=b.style(a,c)),g&&!e.pixelMarginRight()&&mc.test(J)&&Pc.test(c)&&(k=Z.width,r=Z.minWidth,C=Z.maxWidth,Z.minWidth=Z.maxWidth=Z.width=J,J=g.width,Z.width=k,Z.minWidth=r,Z.maxWidth=
|
|
243
|
-
C),void 0===J?J:J+''}):Qc.currentStyle&&(rc=function(a){return a.currentStyle},sc=function(a,c,g){var k,r,C,J,Z=a.style;return g=g||rc(a),J=g?g[c]:void 0,null==J&&Z&&Z[c]&&(J=Z[c]),mc.test(J)&&!Rc.test(c)&&(k=Z.left,r=a.runtimeStyle,C=r&&r.left,C&&(r.left=a.currentStyle.left),Z.left='fontSize'===c?'1em':J,J=Z.pixelLeft+'px',Z.left=k,C&&(r.left=C)),void 0===J?J:J+''||'auto'});var $c=/alpha\([^)]*\)/i,Id=/opacity\s*=\s*([^)]*)/i,Jd=/^(none|table(?!-c[ea]).+)/,vd=new RegExp('^('+
|
|
244
|
-
{position:'absolute',visibility:'hidden',display:'block'},nd={letterSpacing:'0',fontWeight:'400'},jd=['Webkit','O','Moz','ms'],hd=
|
|
245
|
-
c,g,k){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var r,C,J,Z=b.camelCase(c),
|
|
243
|
+
C),void 0===J?J:J+''}):Qc.currentStyle&&(rc=function(a){return a.currentStyle},sc=function(a,c,g){var k,r,C,J,Z=a.style;return g=g||rc(a),J=g?g[c]:void 0,null==J&&Z&&Z[c]&&(J=Z[c]),mc.test(J)&&!Rc.test(c)&&(k=Z.left,r=a.runtimeStyle,C=r&&r.left,C&&(r.left=a.currentStyle.left),Z.left='fontSize'===c?'1em':J,J=Z.pixelLeft+'px',Z.left=k,C&&(r.left=C)),void 0===J?J:J+''||'auto'});var $c=/alpha\([^)]*\)/i,Id=/opacity\s*=\s*([^)]*)/i,Jd=/^(none|table(?!-c[ea]).+)/,vd=new RegExp('^('+gb+')(.*)$','i'),Kd=
|
|
244
|
+
{position:'absolute',visibility:'hidden',display:'block'},nd={letterSpacing:'0',fontWeight:'400'},jd=['Webkit','O','Moz','ms'],hd=La.createElement('div').style;b.extend({cssHooks:{opacity:{get:function(a,c){if(c)return a=sc(a,'opacity'),''===a?'1':a}}},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':e.cssFloat?'cssFloat':'styleFloat'},style:function(a,
|
|
245
|
+
c,g,k){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var r,C,J,Z=b.camelCase(c),qa=a.style;if(c=b.cssProps[Z]||(b.cssProps[Z]=ea(Z)||Z),J=b.cssHooks[c]||b.cssHooks[Z],void 0===g)return J&&'get'in J&&void 0!==(r=J.get(a,!1,k))?r:qa[c];if(C=typeof g,'string'===C&&(r=Hb.exec(g))&&r[1]&&(g=za(a,c,r),C='number'),null!=g&&g===g&&('number'===C&&(g+=r&&r[3]||(b.cssNumber[Z]?'':'px')),e.clearCloneStyle||''!==g||0!==c.indexOf('background')||(qa[c]='inherit'),!(J&&'set'in J&&void 0===(g=J.set(a,g,k)))))try{qa[c]=
|
|
246
246
|
g}catch(Ca){}}},css:function(a,c,g,k){var r,C,J,Z=b.camelCase(c);return c=b.cssProps[Z]||(b.cssProps[Z]=ea(Z)||Z),J=b.cssHooks[c]||b.cssHooks[Z],J&&'get'in J&&(C=J.get(a,!0,g)),void 0===C&&(C=sc(a,c,k)),'normal'===C&&c in nd&&(C=nd[c]),''===g||g?(r=parseFloat(C),!0===g||isFinite(r)?r||0:C):C}});b.each(['height','width'],function(a,c){b.cssHooks[c]={get:function(g,k,r){return k?Jd.test(b.css(g,'display'))&&0===g.offsetWidth?Lc(g,Kd,function(){return Da(g,c,r)}):Da(g,c,r):void 0},set:function(g,k,r){var C=
|
|
247
247
|
r&&rc(g);return ma(g,k,r?sa(g,c,r,e.boxSizing&&'border-box'===b.css(g,'boxSizing',!1,C),C):0)}}});e.opacity||(b.cssHooks.opacity={get:function(a,c){return Id.test((c&&a.currentStyle?a.currentStyle.filter:a.style.filter)||'')?.01*parseFloat(RegExp.$1)+'':c?'1':''},set:function(a,c){var g=a.style;a=a.currentStyle;var k=b.isNumeric(c)?'alpha(opacity='+100*c+')':'',r=a&&a.filter||g.filter||'';g.zoom=1;(1<=c||''===c)&&''===b.trim(r.replace($c,''))&&g.removeAttribute&&(g.removeAttribute('filter'),''===
|
|
248
248
|
c||a&&!a.filter)||(g.filter=$c.test(r)?r.replace($c,k):r+' '+k)}});b.cssHooks.marginRight=ia(e.reliableMarginRight,function(a,c){return c?Lc(a,{display:'inline-block'},sc,[a,'marginRight']):void 0});b.cssHooks.marginLeft=ia(e.reliableMarginLeft,function(a,c){return c?(parseFloat(sc(a,'marginLeft'))||(b.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Lc(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+'px':void 0});b.each({margin:'',padding:'',border:'Width'},function(a,
|
|
@@ -250,176 +250,176 @@ c){b.cssHooks[a+c]={expand:function(g){var k=0,r={};for(g='string'==typeof g?g.s
|
|
|
250
250
|
typeof a?a?this.show():this.hide():this.each(function(){cb(this)?b(this).show():b(this).hide()})}});b.Tween=Qa;Qa.prototype={constructor:Qa,init:function(a,c,g,k,r,C){this.elem=a;this.prop=g;this.easing=r||b.easing._default;this.options=c;this.start=this.now=this.cur();this.end=k;this.unit=C||(b.cssNumber[g]?'':'px')},cur:function(){var a=Qa.propHooks[this.prop];return a&&a.get?a.get(this):Qa.propHooks._default.get(this)},run:function(a){var c,g=Qa.propHooks[this.prop];return this.options.duration?
|
|
251
251
|
this.pos=c=b.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=c=a,this.now=(this.end-this.start)*c+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),g&&g.set?g.set(this):Qa.propHooks._default.set(this),this}};Qa.prototype.init.prototype=Qa.prototype;Qa.propHooks={_default:{get:function(a){var c;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(c=b.css(a.elem,a.prop,''),c&&'auto'!==c?c:0)},set:function(a){b.fx.step[a.prop]?
|
|
252
252
|
b.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[b.cssProps[a.prop]]&&!b.cssHooks[a.prop]?a.elem[a.prop]=a.now:b.style(a.elem,a.prop,a.now+a.unit)}}};Qa.propHooks.scrollTop=Qa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};b.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:'swing'};b.fx=Qa.prototype.init;b.fx.step={};var Fc,ad,Ld=/^(?:toggle|show|hide)$/,Md=/queueHooks$/;b.Animation=b.extend(Fa,
|
|
253
|
-
{tweeners:{'*':[function(a,c){var g=this.createTween(a,c);return
|
|
254
|
-
J.unqueued++,ua.always(function(){ua.always(function(){J.unqueued--;b.queue(a,'fx').length||J.empty.fire()})}));1===a.nodeType&&('height'in c||'width'in c)&&(g.overflow=[Ua.overflow,Ua.overflowX,Ua.overflowY],
|
|
255
|
-
g.overflow[0];Ua.overflowX=g.overflow[1];Ua.overflowY=g.overflow[2]}));for(k in c)if(r=c[k],Ld.exec(r)){if(delete c[k],C=C||'toggle'===r,r===(zb?'hide':'show')){if('show'!==r||!ab||void 0===ab[k])continue;zb=!0}Ra[k]=ab&&ab[k]||b.style(a,k)}else
|
|
253
|
+
{tweeners:{'*':[function(a,c){var g=this.createTween(a,c);return za(g.elem,a,Hb.exec(c),g),g}]},tweener:function(a,c){b.isFunction(a)?(c=a,a=['*']):a=a.match(pa);for(var g,k=0,r=a.length;r>k;k++)g=a[k],Fa.tweeners[g]=Fa.tweeners[g]||[],Fa.tweeners[g].unshift(c)},prefilters:[function(a,c,g){var k,r,C,J,Z,qa,Ca,ua=this,Ra={},Ua=a.style,zb=a.nodeType&&cb(a),ab=b._data(a,'fxshow');g.queue||(J=b._queueHooks(a,'fx'),null==J.unqueued&&(J.unqueued=0,Z=J.empty.fire,J.empty.fire=function(){J.unqueued||Z()}),
|
|
254
|
+
J.unqueued++,ua.always(function(){ua.always(function(){J.unqueued--;b.queue(a,'fx').length||J.empty.fire()})}));1===a.nodeType&&('height'in c||'width'in c)&&(g.overflow=[Ua.overflow,Ua.overflowX,Ua.overflowY],qa=b.css(a,'display'),Ca='none'===qa?b._data(a,'olddisplay')||W(a.nodeName):qa,'inline'===Ca&&'none'===b.css(a,'float')&&(e.inlineBlockNeedsLayout&&'inline'!==W(a.nodeName)?Ua.zoom=1:Ua.display='inline-block'));g.overflow&&(Ua.overflow='hidden',e.shrinkWrapBlocks()||ua.always(function(){Ua.overflow=
|
|
255
|
+
g.overflow[0];Ua.overflowX=g.overflow[1];Ua.overflowY=g.overflow[2]}));for(k in c)if(r=c[k],Ld.exec(r)){if(delete c[k],C=C||'toggle'===r,r===(zb?'hide':'show')){if('show'!==r||!ab||void 0===ab[k])continue;zb=!0}Ra[k]=ab&&ab[k]||b.style(a,k)}else qa=void 0;if(b.isEmptyObject(Ra))'inline'===('none'===qa?W(a.nodeName):qa)&&(Ua.display=qa);else for(k in ab?'hidden'in ab&&(zb=ab.hidden):ab=b._data(a,'fxshow',{}),C&&(ab.hidden=!zb),zb?b(a).show():ua.done(function(){b(a).hide()}),ua.done(function(){var Jb;
|
|
256
256
|
b._removeData(a,'fxshow');for(Jb in Ra)b.style(a,Jb,Ra[Jb])}),Ra)c=Ha(zb?ab[k]:0,k,ua),k in ab||(ab[k]=c.start,zb&&(c.end=c.start,c.start='width'===k||'height'===k?1:0))}],prefilter:function(a,c){c?Fa.prefilters.unshift(a):Fa.prefilters.push(a)}});b.speed=function(a,c,g){var k=a&&'object'==typeof a?b.extend({},a):{complete:g||!g&&c||b.isFunction(a)&&a,duration:a,easing:g&&c||c&&!b.isFunction(c)&&c};return k.duration=b.fx.off?0:'number'==typeof k.duration?k.duration:k.duration in b.fx.speeds?b.fx.speeds[k.duration]:
|
|
257
257
|
b.fx.speeds._default,null!=k.queue&&!0!==k.queue||(k.queue='fx'),k.old=k.complete,k.complete=function(){b.isFunction(k.old)&&k.old.call(this);k.queue&&b.dequeue(this,k.queue)},k};b.fn.extend({fadeTo:function(a,c,g,k){return this.filter(cb).css('opacity',0).show().end().animate({opacity:c},a,g,k)},animate:function(a,c,g,k){var r=b.isEmptyObject(a),C=b.speed(c,g,k);c=function(){var J=Fa(this,b.extend({},a),C);(r||b._data(this,'finish'))&&J.stop(!0)};return c.finish=c,r||!1===C.queue?this.each(c):this.queue(C.queue,
|
|
258
258
|
c)},stop:function(a,c,g){var k=function(r){var C=r.stop;delete r.stop;C(g)};return'string'!=typeof a&&(g=c,c=a,a=void 0),c&&!1!==a&&this.queue(a||'fx',[]),this.each(function(){var r=!0,C=null!=a&&a+'queueHooks',J=b.timers,Z=b._data(this);if(C)Z[C]&&Z[C].stop&&k(Z[C]);else for(C in Z)Z[C]&&Z[C].stop&&Md.test(C)&&k(Z[C]);for(C=J.length;C--;)J[C].elem!==this||null!=a&&J[C].queue!==a||(J[C].anim.stop(g),r=!1,J.splice(C,1));!r&&g||b.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||'fx'),this.each(function(){var c=
|
|
259
259
|
b._data(this),g=c[a+'queue'];var k=c[a+'queueHooks'];var r=b.timers,C=g?g.length:0;c.finish=!0;b.queue(this,a,[]);k&&k.stop&&k.stop.call(this,!0);for(k=r.length;k--;)r[k].elem===this&&r[k].queue===a&&(r[k].anim.stop(!0),r.splice(k,1));for(k=0;C>k;k++)g[k]&&g[k].finish&&g[k].finish.call(this);delete c.finish})}});b.each(['toggle','show','hide'],function(a,c){var g=b.fn[c];b.fn[c]=function(k,r,C){return null==k||'boolean'==typeof k?g.apply(this,arguments):this.animate(Ia(c,!0),k,r,C)}});b.each({slideDown:Ia('show'),
|
|
260
260
|
slideUp:Ia('hide'),slideToggle:Ia('toggle'),fadeIn:{opacity:'show'},fadeOut:{opacity:'hide'},fadeToggle:{opacity:'toggle'}},function(a,c){b.fn[a]=function(g,k,r){return this.animate(c,g,k,r)}});b.timers=[];b.fx.tick=function(){var a=b.timers,c=0;for(Fc=b.now();c<a.length;c++){var g=a[c];g()||a[c]!==g||a.splice(c--,1)}a.length||b.fx.stop();Fc=void 0};b.fx.timer=function(a){b.timers.push(a);a()?b.fx.start():b.timers.pop()};b.fx.interval=13;b.fx.start=function(){ad||=B.setInterval(b.fx.tick,b.fx.interval)};
|
|
261
|
-
b.fx.stop=function(){B.clearInterval(ad);ad=null};b.fx.speeds={slow:600,fast:200,_default:400};b.fn.delay=function(a,c){return a=b.fx?b.fx.speeds[a]||a:a,c=c||'fx',this.queue(c,function(g,k){var r=B.setTimeout(g,a);k.stop=function(){B.clearTimeout(r)}})};(function(){var a=
|
|
262
|
-
k.getElementsByTagName('a');a.setAttribute('type','checkbox');k.appendChild(a);var r=k.getElementsByTagName('a')[0];r.style.cssText='top:1px';e.getSetAttribute='t'!==k.className;e.style=/top/.test(r.getAttribute('style'));e.hrefNormalized='/a'===r.getAttribute('href');e.checkOn=!!a.value;e.optSelected=g.selected;e.enctype=!!
|
|
261
|
+
b.fx.stop=function(){B.clearInterval(ad);ad=null};b.fx.speeds={slow:600,fast:200,_default:400};b.fn.delay=function(a,c){return a=b.fx?b.fx.speeds[a]||a:a,c=c||'fx',this.queue(c,function(g,k){var r=B.setTimeout(g,a);k.stop=function(){B.clearTimeout(r)}})};(function(){var a=La.createElement('input');La.createElement('div');var c=La.createElement('select'),g=c.appendChild(La.createElement('option'));var k=La.createElement('div');k.setAttribute('className','t');k.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
|
262
|
+
k.getElementsByTagName('a');a.setAttribute('type','checkbox');k.appendChild(a);var r=k.getElementsByTagName('a')[0];r.style.cssText='top:1px';e.getSetAttribute='t'!==k.className;e.style=/top/.test(r.getAttribute('style'));e.hrefNormalized='/a'===r.getAttribute('href');e.checkOn=!!a.value;e.optSelected=g.selected;e.enctype=!!La.createElement('form').enctype;c.disabled=!0;e.optDisabled=!g.disabled;a=La.createElement('input');a.setAttribute('value','');e.input=''===a.getAttribute('value');a.value='t';
|
|
263
263
|
a.setAttribute('type','radio');e.radioValue='t'===a.value})();var Nd=/\r/g,Od=/[\x20\t\r\n\f]+/g;b.fn.extend({val:function(a){var c,g,k,r=this[0];if(arguments.length)return k=b.isFunction(a),this.each(function(C){var J;1===this.nodeType&&(J=k?a.call(this,C,b(this).val()):a,null==J?J='':'number'==typeof J?J+='':b.isArray(J)&&(J=b.map(J,function(Z){return null==Z?'':Z+''})),c=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],c&&'set'in c&&void 0!==c.set(this,J,'value')||(this.value=J))});
|
|
264
264
|
if(r)return c=b.valHooks[r.type]||b.valHooks[r.nodeName.toLowerCase()],c&&'get'in c&&void 0!==(g=c.get(r,'value'))?g:(g=r.value,'string'==typeof g?g.replace(Nd,''):null==g?'':g)}});b.extend({valHooks:{option:{get:function(a){var c=b.find.attr(a,'value');return null!=c?c:b.trim(b.text(a)).replace(Od,' ')}},select:{get:function(a){for(var c,g=a.options,k=a.selectedIndex,r='select-one'===a.type||0>k,C=r?null:[],J=r?k+1:g.length,Z=0>k?J:r?k:0;J>Z;Z++)if(c=g[Z],!(!c.selected&&Z!==k||(e.optDisabled?c.disabled:
|
|
265
265
|
null!==c.getAttribute('disabled'))||c.parentNode.disabled&&b.nodeName(c.parentNode,'optgroup'))){if(a=b(c).val(),r)return a;C.push(a)}return C},set:function(a,c){var g,k,r=a.options;c=b.makeArray(c);for(var C=r.length;C--;)if(k=r[C],-1<b.inArray(b.valHooks.option.get(k),c))try{k.selected=g=!0}catch(J){k.scrollHeight}else k.selected=!1;return g||(a.selectedIndex=-1),r}}}});b.each(['radio','checkbox'],function(){b.valHooks[this]={set:function(a,c){return b.isArray(c)?a.checked=-1<b.inArray(b(a).val(),
|
|
266
266
|
c):void 0}};e.checkOn||(b.valHooks[this].get=function(a){return null===a.getAttribute('value')?'on':a.value})});var Ic,zc=b.expr.attrHandle,bd=/^(?:checked|selected)$/i,Ec=e.getSetAttribute,Sc=e.input;b.fn.extend({attr:function(a,c){return fa(this,b.attr,a,c,1<arguments.length)},removeAttr:function(a){return this.each(function(){b.removeAttr(this,a)})}});b.extend({attr:function(a,c,g){var k,r,C=a.nodeType;if(3!==C&&8!==C&&2!==C)return'undefined'==typeof a.getAttribute?b.prop(a,c,g):(1===C&&b.isXMLDoc(a)||
|
|
267
|
-
(c=c.toLowerCase(),r=b.attrHooks[c]||(b.expr.match.bool.test(c)?Pd:Ic)),void 0!==g?null===g?void b.removeAttr(a,c):r&&'set'in r&&void 0!==(k=r.set(a,g,c))?k:(a.setAttribute(c,g+''),g):r&&'get'in r&&null!==(k=r.get(a,c))?k:(k=b.find.attr(a,c),null==k?void 0:k))},attrHooks:{type:{set:function(a,c){if(!e.radioValue&&'radio'===c&&b.nodeName(a,'input')){var g=a.value;return a.setAttribute('type',c),g&&(a.value=g),c}}}},removeAttr:function(a,c){var g=0,k=c&&c.match(
|
|
267
|
+
(c=c.toLowerCase(),r=b.attrHooks[c]||(b.expr.match.bool.test(c)?Pd:Ic)),void 0!==g?null===g?void b.removeAttr(a,c):r&&'set'in r&&void 0!==(k=r.set(a,g,c))?k:(a.setAttribute(c,g+''),g):r&&'get'in r&&null!==(k=r.get(a,c))?k:(k=b.find.attr(a,c),null==k?void 0:k))},attrHooks:{type:{set:function(a,c){if(!e.radioValue&&'radio'===c&&b.nodeName(a,'input')){var g=a.value;return a.setAttribute('type',c),g&&(a.value=g),c}}}},removeAttr:function(a,c){var g=0,k=c&&c.match(pa);if(k&&1===a.nodeType)for(;c=k[g++];){var r=
|
|
268
268
|
b.propFix[c]||c;b.expr.match.bool.test(c)?Sc&&Ec||!bd.test(c)?a[r]=!1:a[b.camelCase('default-'+c)]=a[r]=!1:b.attr(a,c,'');a.removeAttribute(Ec?c:r)}}});var Pd={set:function(a,c,g){return!1===c?b.removeAttr(a,g):Sc&&Ec||!bd.test(g)?a.setAttribute(!Ec&&b.propFix[g]||g,g):a[b.camelCase('default-'+g)]=a[g]=!0,g}};b.each(b.expr.match.bool.source.match(/\w+/g),function(a,c){var g=zc[c]||b.find.attr;Sc&&Ec||!bd.test(c)?zc[c]=function(k,r,C){var J,Z;return C||(Z=zc[r],zc[r]=J,J=null!=g(k,r,C)?r.toLowerCase():
|
|
269
269
|
null,zc[r]=Z),J}:zc[c]=function(k,r,C){return C?void 0:k[b.camelCase('default-'+r)]?r.toLowerCase():null}});Sc&&Ec||(b.attrHooks.value={set:function(a,c,g){return b.nodeName(a,'input')?void(a.defaultValue=c):Ic&&Ic.set(a,c,g)}});Ec||(Ic={set:function(a,c,g){var k=a.getAttributeNode(g);return k||a.setAttributeNode(k=a.ownerDocument.createAttribute(g)),k.value=c+='','value'===g||c===a.getAttribute(g)?c:void 0}},zc.id=zc.name=zc.coords=function(a,c,g){var k;return g?void 0:(k=a.getAttributeNode(c))&&
|
|
270
270
|
''!==k.value?k.value:null},b.valHooks.button={get:function(a,c){return(a=a.getAttributeNode(c))&&a.specified?a.value:void 0},set:Ic.set},b.attrHooks.contenteditable={set:function(a,c,g){Ic.set(a,''===c?!1:c,g)}},b.each(['width','height'],function(a,c){b.attrHooks[c]={set:function(g,k){return''===k?(g.setAttribute(c,'auto'),k):void 0}}}));e.style||(b.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,c){return a.style.cssText=c+''}});var Qd=/^(?:input|select|textarea|button|object)$/i,
|
|
271
271
|
Rd=/^(?:a|area)$/i;b.fn.extend({prop:function(a,c){return fa(this,b.prop,a,c,1<arguments.length)},removeProp:function(a){return a=b.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(c){}})}});b.extend({prop:function(a,c,g){var k,r,C=a.nodeType;if(3!==C&&8!==C&&2!==C)return 1===C&&b.isXMLDoc(a)||(c=b.propFix[c]||c,r=b.propHooks[c]),void 0!==g?r&&'set'in r&&void 0!==(k=r.set(a,g,c))?k:a[c]=g:r&&'get'in r&&null!==(k=r.get(a,c))?k:a[c]},propHooks:{tabIndex:{get:function(a){var c=
|
|
272
272
|
b.find.attr(a,'tabindex');return c?parseInt(c,10):Qd.test(a.nodeName)||Rd.test(a.nodeName)&&a.href?0:-1}}},propFix:{'for':'htmlFor','class':'className'}});e.hrefNormalized||b.each(['href','src'],function(a,c){b.propHooks[c]={get:function(g){return g.getAttribute(c,4)}}});e.optSelected||(b.propHooks.selected={get:function(a){a=a.parentNode;return a&&(a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex),null},set:function(a){a=a.parentNode;a&&(a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex)}});
|
|
273
|
-
b.each('tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable'.split(' '),function(){b.propFix[this.toLowerCase()]=this});e.enctype||(b.propFix.enctype='encoding');var cd=/[\t\r\n\f]/g;b.fn.extend({addClass:function(a){var c,g,k,r,C,J,Z=0;if(b.isFunction(a))return this.each(function(
|
|
274
|
-
0;C=c[J++];)0>k.indexOf(' '+C+' ')&&(k+=C+' ');k=b.trim(k);r!==k&&b.attr(g,'class',k)}return this},removeClass:function(a){var c,g,k,r,C,J,Z=0;if(b.isFunction(a))return this.each(function(
|
|
275
|
-
b.attr(g,'class',k)}return this},toggleClass:function(a,c){var g=typeof a;return'boolean'==typeof c&&'string'===g?c?this.addClass(a):this.removeClass(a):b.isFunction(a)?this.each(function(k){b(this).toggleClass(a.call(this,k,Pa(this),c),c)}):this.each(function(){var k,r;if('string'===g){var C=0;var J=b(this);for(r=a.match(
|
|
273
|
+
b.each('tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable'.split(' '),function(){b.propFix[this.toLowerCase()]=this});e.enctype||(b.propFix.enctype='encoding');var cd=/[\t\r\n\f]/g;b.fn.extend({addClass:function(a){var c,g,k,r,C,J,Z=0;if(b.isFunction(a))return this.each(function(qa){b(this).addClass(a.call(this,qa,Pa(this)))});if('string'==typeof a&&a)for(c=a.match(pa)||[];g=this[Z++];)if(r=Pa(g),k=1===g.nodeType&&(' '+r+' ').replace(cd,' ')){for(J=
|
|
274
|
+
0;C=c[J++];)0>k.indexOf(' '+C+' ')&&(k+=C+' ');k=b.trim(k);r!==k&&b.attr(g,'class',k)}return this},removeClass:function(a){var c,g,k,r,C,J,Z=0;if(b.isFunction(a))return this.each(function(qa){b(this).removeClass(a.call(this,qa,Pa(this)))});if(!arguments.length)return this.attr('class','');if('string'==typeof a&&a)for(c=a.match(pa)||[];g=this[Z++];)if(r=Pa(g),k=1===g.nodeType&&(' '+r+' ').replace(cd,' ')){for(J=0;C=c[J++];)for(;-1<k.indexOf(' '+C+' ');)k=k.replace(' '+C+' ',' ');k=b.trim(k);r!==k&&
|
|
275
|
+
b.attr(g,'class',k)}return this},toggleClass:function(a,c){var g=typeof a;return'boolean'==typeof c&&'string'===g?c?this.addClass(a):this.removeClass(a):b.isFunction(a)?this.each(function(k){b(this).toggleClass(a.call(this,k,Pa(this),c),c)}):this.each(function(){var k,r;if('string'===g){var C=0;var J=b(this);for(r=a.match(pa)||[];k=r[C++];)J.hasClass(k)?J.removeClass(k):J.addClass(k)}else void 0!==a&&'boolean'!==g||(k=Pa(this),k&&b._data(this,'__className__',k),b.attr(this,'class',k||!1===a?'':b._data(this,
|
|
276
276
|
'__className__')||''))})},hasClass:function(a){var c,g=0;for(a=' '+a+' ';c=this[g++];)if(1===c.nodeType&&-1<(' '+Pa(c)+' ').replace(cd,' ').indexOf(a))return!0;return!1}});b.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,c){b.fn[c]=function(g,k){return 0<arguments.length?this.on(c,null,g,k):this.trigger(c)}});b.fn.extend({hover:function(a,
|
|
277
277
|
c){return this.mouseenter(a).mouseleave(c||a)}});var Sd=B.location,dd=b.now(),ed=/\?/,Td=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;b.parseJSON=function(a){if(B.JSON&&B.JSON.parse)return B.JSON.parse(a+'');var c,g=null,k=b.trim(a+'');return k&&!b.trim(k.replace(Td,function(r,C,J,Z){return c&&C&&(g=0),0===g?r:(c=J||C,g+=!Z-!J,'')}))?Function('return '+k)():b.error('Invalid JSON: '+a)};b.parseXML=function(a){var c,
|
|
278
278
|
g;if(!a||'string'!=typeof a)return null;try{B.DOMParser?(g=new B.DOMParser,c=g.parseFromString(a,'text/xml')):(c=new B.ActiveXObject('Microsoft.XMLDOM'),c.async='false',c.loadXML(a))}catch(k){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName('parsererror').length||b.error('Invalid XML: '+a),c};var Ud=/#.*$/,od=/([?&])_=[^&]*/,Vd=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Wd=/^(?:GET|HEAD)$/,Xd=/^\/\//,pd=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,qd={},Vc={},rd='*/'.concat('*'),
|
|
279
279
|
fd=Sd.href,Jc=pd.exec(fd.toLowerCase())||[];b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fd,type:'GET',isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Jc[1]),global:!0,processData:!0,async:!0,contentType:'application/x-www-form-urlencoded; charset=UTF-8',accepts:{'*':rd,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',
|
|
280
|
-
text:'responseText',json:'responseJSON'},converters:{'* text':String,'text html':!0,'text json':b.parseJSON,'text xml':b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,c){return c?bb(bb(a,b.ajaxSettings),c):bb(b.ajaxSettings,a)},ajaxPrefilter:Ya(qd),ajaxTransport:Ya(Vc),ajax:function(a,c){function g(Db,Ob,Rb,tb){var ic,ec,Tb,dc=Ob;if(2!==kc){kc=2;J&&B.clearTimeout(J);
|
|
280
|
+
text:'responseText',json:'responseJSON'},converters:{'* text':String,'text html':!0,'text json':b.parseJSON,'text xml':b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,c){return c?bb(bb(a,b.ajaxSettings),c):bb(b.ajaxSettings,a)},ajaxPrefilter:Ya(qd),ajaxTransport:Ya(Vc),ajax:function(a,c){function g(Db,Ob,Rb,tb){var ic,ec,Tb,dc=Ob;if(2!==kc){kc=2;J&&B.clearTimeout(J);qa=void 0;C=tb||'';vb.readyState=0<Db?4:0;tb=200<=Db&&300>Db||304===Db;if(Rb){var Sb=ua;for(var nc=vb,Cb,$b,Wb,Qb,
|
|
281
281
|
Hc=Sb.contents,oc=Sb.dataTypes;'*'===oc[0];)oc.shift(),void 0===$b&&($b=Sb.mimeType||nc.getResponseHeader('Content-Type'));if($b)for(Qb in Hc)if(Hc[Qb]&&Hc[Qb].test($b)){oc.unshift(Qb);break}if(oc[0]in Rb)Wb=oc[0];else{for(Qb in Rb){if(!oc[0]||Sb.converters[Qb+' '+oc[0]]){Wb=Qb;break}Cb||=Qb}Wb=Wb||Cb}Sb=Wb?(Wb!==oc[0]&&oc.unshift(Wb),Rb[Wb]):void 0}a:{Rb=ua;Cb=Sb;$b=vb;Wb=tb;var ac,uc,vc;Sb={};nc=Rb.dataTypes.slice();if(nc[1])for(ac in Rb.converters)Sb[ac.toLowerCase()]=Rb.converters[ac];for(Qb=
|
|
282
282
|
nc.shift();Qb;)if(Rb.responseFields[Qb]&&($b[Rb.responseFields[Qb]]=Cb),!vc&&Wb&&Rb.dataFilter&&(Cb=Rb.dataFilter(Cb,Rb.dataType)),vc=Qb,Qb=nc.shift())if('*'===Qb)Qb=vc;else if('*'!==vc&&vc!==Qb){if(ac=Sb[vc+' '+Qb]||Sb['* '+Qb],!ac)for(lc in Sb)if(uc=lc.split(' '),uc[1]===Qb&&(ac=Sb[vc+' '+uc[0]]||Sb['* '+uc[0]])){!0===ac?ac=Sb[lc]:!0!==Sb[lc]&&(Qb=uc[0],nc.unshift(uc[1]));break}if(!0!==ac)if(ac&&Rb['throws'])Cb=ac(Cb);else try{Cb=ac(Cb)}catch(Yc){var lc={state:'parsererror',error:ac?Yc:'No conversion from '+
|
|
283
283
|
vc+' to '+Qb};break a}}lc={state:'success',data:Cb}}Sb=lc;tb?(ua.ifModified&&(Tb=vb.getResponseHeader('Last-Modified'),Tb&&(b.lastModified[gc]=Tb),Tb=vb.getResponseHeader('etag'),Tb&&(b.etag[gc]=Tb)),204===Db||'HEAD'===ua.type?dc='nocontent':304===Db?dc='notmodified':(dc=Sb.state,ic=Sb.data,ec=Sb.error,tb=!ec)):(ec=dc,!Db&&dc||(dc='error',0>Db&&(Db=0)));vb.status=Db;vb.statusText=(Ob||dc)+'';tb?zb.resolveWith(Ra,[ic,dc,vb]):zb.rejectWith(Ra,[vb,dc,ec]);vb.statusCode(Jb);Jb=void 0;Z&&Ua.trigger(tb?
|
|
284
|
-
'ajaxSuccess':'ajaxError',[vb,ua,tb?ic:ec]);ab.fireWith(Ra,[vb,dc]);Z&&(Ua.trigger('ajaxComplete',[vb,ua]),--b.active||b.event.trigger('ajaxStop'))}}'object'==typeof a&&(c=a,a=void 0);c=c||{};var k,r,C,J,Z,
|
|
285
|
-
Ob[2];Ob=Ca[Db.toLowerCase()]}return null==Ob?null:Ob},getAllResponseHeaders:function(){return 2===kc?C:null},setRequestHeader:function(Db,Ob){var Rb=Db.toLowerCase();return kc||(Db=Gc[Rb]=Gc[Rb]||Db,jc[Db]=Ob),this},overrideMimeType:function(Db){return kc||(ua.mimeType=Db),this},statusCode:function(Db){var Ob;if(Db)if(2>kc)for(Ob in Db)Jb[Ob]=[Jb[Ob],Db[Ob]];else vb.always(Db[vb.status]);return this},abort:function(Db){Db=Db||wc;return
|
|
286
|
-
vb.success=vb.done,vb.error=vb.fail,ua.url=((a||ua.url||fd)+'').replace(Ud,'').replace(Xd,Jc[1]+'//'),ua.type=c.method||c.type||ua.method||ua.type,ua.dataTypes=b.trim(ua.dataType||'*').toLowerCase().match(
|
|
284
|
+
'ajaxSuccess':'ajaxError',[vb,ua,tb?ic:ec]);ab.fireWith(Ra,[vb,dc]);Z&&(Ua.trigger('ajaxComplete',[vb,ua]),--b.active||b.event.trigger('ajaxStop'))}}'object'==typeof a&&(c=a,a=void 0);c=c||{};var k,r,C,J,Z,qa,Ca,ua=b.ajaxSetup({},c),Ra=ua.context||ua,Ua=ua.context&&(Ra.nodeType||Ra.jquery)?b(Ra):b.event,zb=b.Deferred(),ab=b.Callbacks('once memory'),Jb=ua.statusCode||{},jc={},Gc={},kc=0,wc='canceled',vb={readyState:0,getResponseHeader:function(Db){var Ob;if(2===kc){if(!Ca)for(Ca={};Ob=Vd.exec(C);)Ca[Ob[1].toLowerCase()]=
|
|
285
|
+
Ob[2];Ob=Ca[Db.toLowerCase()]}return null==Ob?null:Ob},getAllResponseHeaders:function(){return 2===kc?C:null},setRequestHeader:function(Db,Ob){var Rb=Db.toLowerCase();return kc||(Db=Gc[Rb]=Gc[Rb]||Db,jc[Db]=Ob),this},overrideMimeType:function(Db){return kc||(ua.mimeType=Db),this},statusCode:function(Db){var Ob;if(Db)if(2>kc)for(Ob in Db)Jb[Ob]=[Jb[Ob],Db[Ob]];else vb.always(Db[vb.status]);return this},abort:function(Db){Db=Db||wc;return qa&&qa.abort(Db),g(0,Db),this}};if(zb.promise(vb).complete=ab.add,
|
|
286
|
+
vb.success=vb.done,vb.error=vb.fail,ua.url=((a||ua.url||fd)+'').replace(Ud,'').replace(Xd,Jc[1]+'//'),ua.type=c.method||c.type||ua.method||ua.type,ua.dataTypes=b.trim(ua.dataType||'*').toLowerCase().match(pa)||[''],null==ua.crossDomain&&(k=pd.exec(ua.url.toLowerCase()),ua.crossDomain=!(!k||k[1]===Jc[1]&&k[2]===Jc[2]&&(k[3]||('http:'===k[1]?'80':'443'))===(Jc[3]||('http:'===Jc[1]?'80':'443')))),ua.data&&ua.processData&&'string'!=typeof ua.data&&(ua.data=b.param(ua.data,ua.traditional)),pb(qd,ua,c,
|
|
287
287
|
vb),2===kc)return vb;(Z=b.event&&ua.global)&&0===b.active++&&b.event.trigger('ajaxStart');ua.type=ua.type.toUpperCase();ua.hasContent=!Wd.test(ua.type);var gc=ua.url;ua.hasContent||(ua.data&&(gc=ua.url+=(ed.test(gc)?'&':'?')+ua.data,delete ua.data),!1===ua.cache&&(ua.url=od.test(gc)?gc.replace(od,'$1_='+dd++):gc+(ed.test(gc)?'&':'?')+'_='+dd++));ua.ifModified&&(b.lastModified[gc]&&vb.setRequestHeader('If-Modified-Since',b.lastModified[gc]),b.etag[gc]&&vb.setRequestHeader('If-None-Match',b.etag[gc]));
|
|
288
|
-
(ua.data&&ua.hasContent&&!1!==ua.contentType||c.contentType)&&vb.setRequestHeader('Content-Type',ua.contentType);vb.setRequestHeader('Accept',ua.dataTypes[0]&&ua.accepts[ua.dataTypes[0]]?ua.accepts[ua.dataTypes[0]]+('*'!==ua.dataTypes[0]?', '+rd+'; q=0.01':''):ua.accepts['*']);for(r in ua.headers)vb.setRequestHeader(r,ua.headers[r]);if(ua.beforeSend&&(!1===ua.beforeSend.call(Ra,vb,ua)||2===kc))return vb.abort();wc='abort';for(r in{success:1,error:1,complete:1})vb[r](ua[r]);if(
|
|
289
|
-
1,Z&&Ua.trigger('ajaxSend',[vb,ua]),2===kc)return vb;ua.async&&0<ua.timeout&&(J=B.setTimeout(function(){vb.abort('timeout')},ua.timeout));try{kc=1,
|
|
288
|
+
(ua.data&&ua.hasContent&&!1!==ua.contentType||c.contentType)&&vb.setRequestHeader('Content-Type',ua.contentType);vb.setRequestHeader('Accept',ua.dataTypes[0]&&ua.accepts[ua.dataTypes[0]]?ua.accepts[ua.dataTypes[0]]+('*'!==ua.dataTypes[0]?', '+rd+'; q=0.01':''):ua.accepts['*']);for(r in ua.headers)vb.setRequestHeader(r,ua.headers[r]);if(ua.beforeSend&&(!1===ua.beforeSend.call(Ra,vb,ua)||2===kc))return vb.abort();wc='abort';for(r in{success:1,error:1,complete:1})vb[r](ua[r]);if(qa=pb(Vc,ua,c,vb)){if(vb.readyState=
|
|
289
|
+
1,Z&&Ua.trigger('ajaxSend',[vb,ua]),2===kc)return vb;ua.async&&0<ua.timeout&&(J=B.setTimeout(function(){vb.abort('timeout')},ua.timeout));try{kc=1,qa.send(jc,g)}catch(Db){if(!(2>kc))throw Db;g(-1,Db)}}else g(-1,'No Transport');return vb},getJSON:function(a,c,g){return b.get(a,c,g,'json')},getScript:function(a,c){return b.get(a,void 0,c,'script')}});b.each(['get','post'],function(a,c){b[c]=function(g,k,r,C){return b.isFunction(k)&&(C=C||r,r=k,k=void 0),b.ajax(b.extend({url:g,type:c,dataType:C,data:k,
|
|
290
290
|
success:r},b.isPlainObject(g)&&g))}});b._evalUrl=function(a){return b.ajax({url:a,type:'GET',dataType:'script',cache:!0,async:!1,global:!1,'throws':!0})};b.fn.extend({wrapAll:function(a){if(b.isFunction(a))return this.each(function(g){b(this).wrapAll(a.call(this,g))});if(this[0]){var c=b(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&c.insertBefore(this[0]);c.map(function(){for(var g=this;g.firstChild&&1===g.firstChild.nodeType;)g=g.firstChild;return g}).append(this)}return this},wrapInner:function(a){return b.isFunction(a)?
|
|
291
291
|
this.each(function(c){b(this).wrapInner(a.call(this,c))}):this.each(function(){var c=b(this),g=c.contents();g.length?g.wrapAll(a):c.append(a)})},wrap:function(a){var c=b.isFunction(a);return this.each(function(g){b(this).wrapAll(c?a.call(this,g):a)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,'body')||b(this).replaceWith(this.childNodes)}).end()}});b.expr.filters.hidden=function(a){return e.reliableHiddenOffsets()?0>=a.offsetWidth&&0>=a.offsetHeight&&!a.getClientRects().length:
|
|
292
292
|
qb(a)};b.expr.filters.visible=function(a){return!b.expr.filters.hidden(a)};var Yd=/%20/g,wd=/\[\]$/,sd=/\r?\n/g,Zd=/^(?:submit|button|image|reset|file)$/i,$d=/^(?:input|select|textarea|keygen)/i;b.param=function(a,c){var g,k=[],r=function(C,J){J=b.isFunction(J)?J():null==J?'':J;k[k.length]=encodeURIComponent(C)+'='+encodeURIComponent(J)};if(void 0===c&&(c=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(a)||a.jquery&&!b.isPlainObject(a))b.each(a,function(){r(this.name,this.value)});else for(g in a)Vb(g,
|
|
293
293
|
a[g],c,r);return k.join('&').replace(Yd,'+')};b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=b.prop(this,'elements');return a?b.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!b(this).is(':disabled')&&$d.test(this.nodeName)&&!Zd.test(a)&&(this.checked||!X.test(a))}).map(function(a,c){a=b(this).val();return null==a?null:b.isArray(a)?b.map(a,function(g){return{name:c.name,value:g.replace(sd,
|
|
294
|
-
'\r\n')}}):{name:c.name,value:a.replace(sd,'\r\n')}}).get()}});b.ajaxSettings.xhr=void 0!==B.ActiveXObject?function(){return this.isLocal?nb():8<
|
|
295
|
-
k){var r,C=a.xhr(),J=++ae;if(C.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(r in a.xhrFields)C[r]=a.xhrFields[r];a.mimeType&&C.overrideMimeType&&C.overrideMimeType(a.mimeType);a.crossDomain||g['X-Requested-With']||(g['X-Requested-With']='XMLHttpRequest');for(r in g)void 0!==g[r]&&C.setRequestHeader(r,g[r]+'');C.send(a.hasContent&&a.data||null);c=function(Z,
|
|
294
|
+
'\r\n')}}):{name:c.name,value:a.replace(sd,'\r\n')}}).get()}});b.ajaxSettings.xhr=void 0!==B.ActiveXObject?function(){return this.isLocal?nb():8<La.documentMode?wb():/^(get|post|head|put|delete|options)$/i.test(this.type)&&wb()||nb()}:wb;var ae=0,Tc={},Uc=b.ajaxSettings.xhr();B.attachEvent&&B.attachEvent('onunload',function(){for(var a in Tc)Tc[a](void 0,!0)});e.cors=!!Uc&&'withCredentials'in Uc;(Uc=e.ajax=!!Uc)&&b.ajaxTransport(function(a){if(!a.crossDomain||e.cors){var c;return{send:function(g,
|
|
295
|
+
k){var r,C=a.xhr(),J=++ae;if(C.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(r in a.xhrFields)C[r]=a.xhrFields[r];a.mimeType&&C.overrideMimeType&&C.overrideMimeType(a.mimeType);a.crossDomain||g['X-Requested-With']||(g['X-Requested-With']='XMLHttpRequest');for(r in g)void 0!==g[r]&&C.setRequestHeader(r,g[r]+'');C.send(a.hasContent&&a.data||null);c=function(Z,qa){if(c&&(qa||4===C.readyState))if(delete Tc[J],c=void 0,C.onreadystatechange=b.noop,qa)4!==C.readyState&&C.abort();else{var Ca=
|
|
296
296
|
{};var ua=C.status;'string'==typeof C.responseText&&(Ca.text=C.responseText);try{var Ra=C.statusText}catch(Ua){Ra=''}ua||!a.isLocal||a.crossDomain?1223===ua&&(ua=204):ua=Ca.text?200:404}Ca&&k(ua,Ra,Ca,C.getAllResponseHeaders())};a.async?4===C.readyState?B.setTimeout(c):C.onreadystatechange=Tc[J]=c:c()},abort:function(){c&&c(void 0,!0)}}}});b.ajaxSetup({accepts:{script:'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'},contents:{script:/\b(?:java|ecma)script\b/},
|
|
297
|
-
converters:{'text script':function(a){return b.globalEval(a),a}}});b.ajaxPrefilter('script',function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type='GET',a.global=!1)});b.ajaxTransport('script',function(a){if(a.crossDomain){var c,g=
|
|
297
|
+
converters:{'text script':function(a){return b.globalEval(a),a}}});b.ajaxPrefilter('script',function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type='GET',a.global=!1)});b.ajaxTransport('script',function(a){if(a.crossDomain){var c,g=La.head||b('head')[0]||La.documentElement;return{send:function(k,r){c=La.createElement('script');c.async=!0;a.scriptCharset&&(c.charset=a.scriptCharset);c.src=a.url;c.onload=c.onreadystatechange=function(C,J){(J||!c.readyState||/loaded|complete/.test(c.readyState))&&
|
|
298
298
|
(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,J||r(200,'success'))};g.insertBefore(c,g.firstChild)},abort:function(){c&&c.onload(void 0,!0)}}}});var td=[],gd=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:'callback',jsonpCallback:function(){var a=td.pop()||b.expando+'_'+dd++;return this[a]=!0,a}});b.ajaxPrefilter('json jsonp',function(a,c,g){var k,r,C,J=!1!==a.jsonp&&(gd.test(a.url)?'url':'string'==typeof a.data&&0===(a.contentType||'').indexOf('application/x-www-form-urlencoded')&&
|
|
299
299
|
gd.test(a.data)&&'data');return J||'jsonp'===a.dataTypes[0]?(k=a.jsonpCallback=b.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,J?a[J]=a[J].replace(gd,'$1'+k):!1!==a.jsonp&&(a.url+=(ed.test(a.url)?'&':'?')+a.jsonp+'='+k),a.converters['script json']=function(){return C||b.error(k+' was not called'),C[0]},a.dataTypes[0]='json',r=B[k],B[k]=function(){C=arguments},g.always(function(){void 0===r?b(B).removeProp(k):B[k]=r;a[k]&&(a.jsonpCallback=c.jsonpCallback,td.push(k));C&&b.isFunction(r)&&
|
|
300
|
-
r(C[0]);C=r=void 0}),'script'):void 0});b.parseHTML=function(a,c,g){if(!a||'string'!=typeof a)return null;'boolean'==typeof c&&(g=c,c=!1);c=c||
|
|
301
|
-
'object'==typeof c&&(r='POST'),0<J.length&&b.ajax({url:a,type:r||'GET',dataType:'html',data:c}).done(function(
|
|
302
|
-
c.elem}).length};b.offset={setOffset:function(a,c,g){var k,r,C,J=b.css(a,'position'),Z=b(a),
|
|
300
|
+
r(C[0]);C=r=void 0}),'script'):void 0});b.parseHTML=function(a,c,g){if(!a||'string'!=typeof a)return null;'boolean'==typeof c&&(g=c,c=!1);c=c||La;var k=oa.exec(a);g=!g&&[];return k?[c.createElement(k[1])]:(k=E([a],c,g),g&&g.length&&b(g).remove(),b.merge([],k.childNodes))};var ud=b.fn.load;b.fn.load=function(a,c,g){if('string'!=typeof a&&ud)return ud.apply(this,arguments);var k,r,C,J=this,Z=a.indexOf(' ');return-1<Z&&(k=b.trim(a.slice(Z,a.length)),a=a.slice(0,Z)),b.isFunction(c)?(g=c,c=void 0):c&&
|
|
301
|
+
'object'==typeof c&&(r='POST'),0<J.length&&b.ajax({url:a,type:r||'GET',dataType:'html',data:c}).done(function(qa){C=arguments;J.html(k?b('<div>').append(b.parseHTML(qa)).find(k):qa)}).always(g&&function(qa,Ca){J.each(function(){g.apply(this,C||[qa.responseText,Ca,qa])})}),this};b.each('ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend'.split(' '),function(a,c){b.fn[c]=function(g){return this.on(c,g)}});b.expr.filters.animated=function(a){return b.grep(b.timers,function(c){return a===
|
|
302
|
+
c.elem}).length};b.offset={setOffset:function(a,c,g){var k,r,C,J=b.css(a,'position'),Z=b(a),qa={};'static'===J&&(a.style.position='relative');var Ca=Z.offset();var ua=b.css(a,'top');var Ra=b.css(a,'left');('absolute'===J||'fixed'===J)&&-1<b.inArray('auto',[ua,Ra])?(k=Z.position(),C=k.top,r=k.left):(C=parseFloat(ua)||0,r=parseFloat(Ra)||0);b.isFunction(c)&&(c=c.call(a,g,b.extend({},Ca)));null!=c.top&&(qa.top=c.top-Ca.top+C);null!=c.left&&(qa.left=c.left-Ca.left+r);'using'in c?c.using.call(a,qa):Z.css(qa)}};
|
|
303
303
|
b.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(J){b.offset.setOffset(this,a,J)});var c,g,k={top:0,left:0},r=this[0],C=r&&r.ownerDocument;if(C)return c=C.documentElement,b.contains(c,r)?('undefined'!=typeof r.getBoundingClientRect&&(k=r.getBoundingClientRect()),g=xb(C),{top:k.top+(g.pageYOffset||c.scrollTop)-(c.clientTop||0),left:k.left+(g.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):k},position:function(){if(this[0]){var a,c,g={top:0,left:0},k=this[0];
|
|
304
304
|
return'fixed'===b.css(k,'position')?c=k.getBoundingClientRect():(a=this.offsetParent(),c=this.offset(),b.nodeName(a[0],'html')||(g=a.offset()),g.top+=b.css(a[0],'borderTopWidth',!0),g.left+=b.css(a[0],'borderLeftWidth',!0)),{top:c.top-g.top-b.css(k,'marginTop',!0),left:c.left-g.left-b.css(k,'marginLeft',!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent;a&&!b.nodeName(a,'html')&&'static'===b.css(a,'position');)a=a.offsetParent;return a||Qc})}});b.each({scrollLeft:'pageXOffset',
|
|
305
305
|
scrollTop:'pageYOffset'},function(a,c){var g=/Y/.test(c);b.fn[a]=function(k){return fa(this,function(r,C,J){var Z=xb(r);return void 0===J?Z?c in Z?Z[c]:Z.document.documentElement[C]:r[C]:void(Z?Z.scrollTo(g?b(Z).scrollLeft():J,g?J:b(Z).scrollTop()):r[C]=J)},a,k,arguments.length,null)}});b.each(['top','left'],function(a,c){b.cssHooks[c]=ia(e.pixelPosition,function(g,k){return k?(k=sc(g,c),mc.test(k)?b(g).position()[c]+'px':k):void 0})});b.each({Height:'height',Width:'width'},function(a,c){b.each({padding:'inner'+
|
|
306
|
-
a,content:c,'':'outer'+a},function(g,k){b.fn[k]=function(r,C){var J=arguments.length&&(g||'boolean'!=typeof r),Z=g||(!0===r||!0===C?'margin':'border');return fa(this,function(
|
|
306
|
+
a,content:c,'':'outer'+a},function(g,k){b.fn[k]=function(r,C){var J=arguments.length&&(g||'boolean'!=typeof r),Z=g||(!0===r||!0===C?'margin':'border');return fa(this,function(qa,Ca,ua){var Ra;return b.isWindow(qa)?qa.document.documentElement['client'+a]:9===qa.nodeType?(Ra=qa.documentElement,Math.max(qa.body['scroll'+a],Ra['scroll'+a],qa.body['offset'+a],Ra['offset'+a],Ra['client'+a])):void 0===ua?b.css(qa,Ca,Z):b.style(qa,Ca,ua,Z)},c,J?r:void 0,J,null)}})});b.fn.extend({bind:function(a,c,g){return this.on(a,
|
|
307
307
|
null,c,g)},unbind:function(a,c){return this.off(a,null,c)},delegate:function(a,c,g,k){return this.on(c,a,g,k)},undelegate:function(a,c,g){return 1===arguments.length?this.off(a,'**'):this.off(c,a||'**',g)}});b.fn.size=function(){return this.length};b.fn.andSelf=b.fn.addBack;'function'==typeof define&&define.amd&&define('jquery',[],function(){return b});var be=B.jQuery,ce=B.$;return b.noConflict=function(a){return B.$===b&&(B.$=ce),a&&B.jQuery===b&&(B.jQuery=be),b},Q||(B.jQuery=B.$=b),b});
|
|
308
308
|
if('undefined'!==typeof module&&module.exports)var lib=require('../../index');
|
|
309
309
|
function Collection(B,Q){var V='undefined'!==typeof module&&module.exports?!1:!0,la=V?require('vendor/uuid'):require('uuid'),U=V?require('lib/merge'):require('../../../lib/merge'),N={isCaseSensitive:{false:{re:'^%s$',modifiers:'i'},true:{re:'^%s$'}}},ha=!1,R=!1,S=null;V={useLocalStorage:!1,locale:'en',searchOptionRules:N};Q='object'==typeof Q?U(Q,V):V;var u=['not null'],I=function(A){try{return eval(A)}catch(E){throw Error('Could not evaluate condition `'+A+'`.\n'+E.stack);}};if('undefined'==typeof B||
|
|
310
|
-
''==B||null==B)B=[];if(!Array.isArray(B))throw Error('`new Collection([content] [, options] )`: `content` argument must be an Array !');B=B?JSON.clone(B):[];for(var
|
|
310
|
+
''==B||null==B)B=[];if(!Array.isArray(B))throw Error('`new Collection([content] [, options] )`: `content` argument must be an Array !');B=B?JSON.clone(B):[];for(var v=[],za=V=0,va=B.length;za<va;++za)B[za]||(B[za]={}),B[za]._uuid=la.v4(),v[V]=B[za]._uuid,++V;var P=B;P.setSearchOption=function(){if(!arguments.length)throw Error('searchOption cannot be left blank');if(3<arguments.length||3>arguments.length&&1<arguments.length)throw Error('argument length mismatch');var A=0,E=arguments.length;if(1==
|
|
311
311
|
arguments.length){if('object'!=typeof arguments[0])throw Error('searchOption must be an object');for(var n in arguments[0])if('undefined'==typeof N[n])throw Error(arguments[1]+' is not an allowed searchOption !');S=arguments[0]}else for(S||={};A<E;++A){if('undefined'==typeof N[arguments[1]])throw Error(arguments[1]+' is not an allowed searchOption !');'undefined'==typeof S[arguments[0]]&&(S[arguments[0]]={});/true|false/i.test(arguments[2])?S[arguments[0]][arguments[1]]=/true/i.test(arguments[2])?
|
|
312
|
-
!0:!1:S[arguments[0]][arguments[1]]=arguments[2]}return P};P.find=function(){ha=!1;'boolean'==typeof arguments[arguments.length-1]&&(ha=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);var A=null,E=null,n=null;try{A=JSON.stringify(arguments),E=JSON.parse(A),n=E.count()}catch(ma){throw Error('filter must be an object\n'+ma.stack);}if('undefined'!=typeof E&&0<n){1<n&&(ha=!0);n=A=null;var y=0,z=Array.isArray(this)?this:JSON.clone(B),F=[],
|
|
313
|
-
T=null,
|
|
312
|
+
!0:!1:S[arguments[0]][arguments[1]]=arguments[2]}return P};P.find=function(){ha=!1;'boolean'==typeof arguments[arguments.length-1]&&(ha=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);var A=null,E=null,n=null;try{A=JSON.stringify(arguments),E=JSON.parse(A),n=E.count()}catch(ma){throw Error('filter must be an object\n'+ma.stack);}if('undefined'!=typeof E&&0<n){1<n&&(ha=!0);n=A=null;var y=0,z=Array.isArray(this)?this:JSON.clone(B),F=[],w='',x=null,G=S,M=Q.searchOptionRules,
|
|
313
|
+
T=null,ra=[],Ea=function(ma,sa,Da,Qa,Ja){if(null===ma&&null===Da)++Qa;else if(ma&&-1<u.indexOf(w)&&'not null'==w&&'undefined'!=typeof Da&&'object'!==typeof Da&&'null'!=Da&&'undefined'!=Da)0>F.indexOf(Da)&&++Qa;else if('undefined'!=typeof Da&&'object'!==typeof Da&&/(<|>|=)/.test(ma)&&!/undefined|function/.test(typeof Da))sa=ma,Ja=Da+ma,'string'==typeof ma&&'string'==typeof Da&&(Ja=ma.replace(/^(<=|>=|!==|!=|===|!==)/g,''),'string'!=typeof Da||/^"(.*)"$/.test(Ja)||(ma=ma.replace(Ja,'"'+Ja+'"')),Ja=
|
|
314
314
|
'"'+Da+'"'+ma,ma=sa),/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/.test(Da)&&/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/.test(ma)?I(Da.replace(/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/,'new Date("$&")')+ma.replace(/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/,'new Date("$&")'))&&++Qa:I(Ja)&&++Qa;else if('undefined'!=typeof Da&&'object'!==typeof Da&&Da===ma&&!G||'undefined'!=typeof Da&&'object'!==typeof Da&&Da===ma&&'undefined'==typeof G[sa])++Qa;
|
|
315
315
|
else if('undefined'!=typeof Da&&'object'!==typeof Da&&G&&'undefined'!=typeof G[sa]){var Ia=0;var Ha=G[sa].count();for(var mb in G[sa])Ja[mb][G[sa][mb]].re=Ja[mb][G[sa][mb]].re.replace(/%s/,ma),x=Ja[mb][G[sa][mb]].modifiers?new RegExp(Ja[mb][G[sa][mb]].re,Ja[mb][G[sa][mb]].modifiers):new RegExp(Ja[mb][G[sa][mb]].re),x.test(Da)&&++Ia;Ia==Ha&&++Qa}return{matched:Qa}},W=function(ma,sa,Da,Qa){var Ja=sa.split(/\./g);Ja=Ja[Ja.length-1];x=new RegExp('("'+Ja+'":\\w+)');Ja=null;try{Da&&(Ja=eval('_content.'+
|
|
316
316
|
sa))}catch(Ia){}Ja&&(Array.isArray(Ja)?Ja=Ja[1].split(/:/)[1]:'string'==typeof Ja&&/:/.test(Ja)&&(Ja=Ja.split(/:/)[1]),/(<|>|=)/.test(ma)?/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/.test(Ja)&&/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/.test(ma)?I(Ja.replace(/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/,'new Date("$&")')+ma.replace(/(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/,'new Date("$&")'))&&++Qa:I(Ja+ma)&&++Qa:Ja==ma&&++Qa);return{matched:Qa}},
|
|
317
|
-
ia=function(ma,sa,Da,Qa,Ja){sa=sa.split(/\[\*\]/g);Ja=sa[0].replace(/\[\*\]/,'');Da=Da[Ja];sa=sa[1];/^\./.test(sa)&&(sa=sa.substr(1));Ja=0;if(Da)for(var Ia=0,Ha=Da.length;Ia<Ha&&!(
|
|
318
|
-
|
|
317
|
+
ia=function(ma,sa,Da,Qa,Ja){sa=sa.split(/\[\*\]/g);Ja=sa[0].replace(/\[\*\]/,'');Da=Da[Ja];sa=sa[1];/^\./.test(sa)&&(sa=sa.substr(1));Ja=0;if(Da)for(var Ia=0,Ha=Da.length;Ia<Ha&&!(ra=/\./.test(sa)?W(ma,sa,Da[Ia],Ja):Ea(ma,sa,Da[Ia],Ja,M),Ja=ra.matched,0<Ja);++Ia);return{matched:Qa+Ja}},ea;for(ea in z)if(z[ea]||(z[ea]={}),!/undefined|function/.test(typeof z[ea]))for(let ma=0,sa=E.count();ma<sa;++ma){A=E[ma];n=A.count();T=0;for(var Aa in A){if('undefined'==typeof A[Aa])throw Error('filter `'+Aa+'` cannot be left undefined');
|
|
318
|
+
w=null===A[Aa]||/(boolean|number)/.test(typeof A[Aa])?A[Aa]:A[Aa].toLocaleLowerCase();ra=/\./.test(Aa)?/\[\*\]/.test(Aa)?ia(A[Aa],Aa,z[ea],T,0):W(A[Aa],Aa,z[ea],T):Ea(A[Aa],Aa,z[ea][Aa],T,M);T=ra.matched}if(T==n)if(ha&&R&&0>v.indexOf(z[ea]._uuid)||R||!ha){if(!ha||ha&&0>F.indexOf(z[ea]._uuid)||R)F[y]=z[ea],++y}else ha&&!R&&0>F.indexOf(z[ea]._uuid)&&(F[y]=z[ea],++y)}}else F=B;S=null;F.insert=P.insert;F.notIn=P.notIn;F.find=this.find;F.update=P.update;F.replace=P.replace;F.or=P.or;F.findOne=P.findOne;
|
|
319
319
|
F.limit=P.limit;F.orderBy=P.orderBy;F.delete=P.delete;F.toRaw=P.toRaw;F.filter=P.filter;return F};P.findOne=function(){var A=null;'string'==typeof arguments[arguments.length-1]&&(delete arguments[arguments.length-1],--arguments.length);0<arguments.length&&(A=arguments);if('undefined'==typeof A||!A||'object'!=typeof A)throw Error('[ Collection ][ findOne ] `filters` argument must be defined: Array or Filter Object(s) expected');A=null;var E=Array.isArray(arguments[0])?arguments[0]:P.find.apply(this,
|
|
320
320
|
arguments)||[];0<E.length&&(A=E.limit(1).toRaw()[0]);return A};P.or=function(){arguments[arguments.length]=!0;++arguments.length;return P.find.apply(this,arguments)};P.limit=function(A){if('undefined'==typeof A||'number'!=typeof A)throw Error('[Collection::result->limit(resultLimit)] : `resultLimit` parametter must by a `number`');var E=Array.isArray(this)?this:JSON.clone(B);E=E.splice(0,A);E.insert=P.insert;E.update=P.update;E.replace=P.replace;E.notIn=P.notIn;E.findOne=P.findOne;E.orderBy=P.orderBy;
|
|
321
321
|
E.max=P.max;E.delete=P.delete;E.toRaw=P.toRaw;E.filter=P.filter;return E};P.notIn=function(){var A=null,E=null,n=!0;'string'==typeof arguments[arguments.length-1]&&(A=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);'boolean'==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);0<arguments.length&&(E=arguments);if('undefined'==typeof E||!E||'object'!=typeof E)throw Error('[ Collection ][ notIn ] `filters` argument must be defined: Array or Filter Object(s) expected');
|
|
322
|
-
var y=JSON.clone(Array.isArray(this)?this:B);if(Array.isArray(arguments[0]))var z=arguments[0];else R=!0,z=P.find.apply(this,arguments)||[],R=!1;if(0<z.length){if(n&&A&&'undefined'==typeof z[0]&&'undefined'==typeof z[0][A])throw Error('[ Collection ][ notIn ] `key` not valid');n&&!A&&'undefined'!=typeof z[0]._uuid?A='_uuid':'undefined'!=typeof z[0].id&&(A='id');if(!A||'undefined'==typeof z[0][A])throw Error('No comparison key defined !');var F=0,
|
|
323
|
-
y[x].hasOwnProperty(A))for(;F<
|
|
322
|
+
var y=JSON.clone(Array.isArray(this)?this:B);if(Array.isArray(arguments[0]))var z=arguments[0];else R=!0,z=P.find.apply(this,arguments)||[],R=!1;if(0<z.length){if(n&&A&&'undefined'==typeof z[0]&&'undefined'==typeof z[0][A])throw Error('[ Collection ][ notIn ] `key` not valid');n&&!A&&'undefined'!=typeof z[0]._uuid?A='_uuid':'undefined'!=typeof z[0].id&&(A='id');if(!A||'undefined'==typeof z[0][A])throw Error('No comparison key defined !');var F=0,w=z.length,x=0,G,M=E.count(),T;if(n&&'undefined'!=typeof y[x]&&
|
|
323
|
+
y[x].hasOwnProperty(A))for(;F<w&&y.length;++F)for(x=0,n=y.length;x<n;++x){if('undefined'!=typeof y[x]&&'undefined'!=typeof z[F]&&y[x][A]===z[F][A]){y.splice(x,1);break}}else if('undefined'==typeof y[x])y=JSON.clone(z);else for(;F<w&&y.length;++F)for(x=0,n=y.length;x<n;++x)if('undefined'!=typeof y[x]){for(G=T=0;G<M;++G){if('undefined'==typeof E[G])throw Error('filter `'+G+'` cannot be left undefined');var ra=E[G].count();var Ea=0;for(A in E[G])y[x].hasOwnProperty(A)&&y[x][A]===z[F][A]&&++Ea;Ea==ra&&
|
|
324
324
|
++T}if(T){y.splice(x,1);break}}}A=y;A.notIn=P.notIn;A.limit=P.limit;A.find=P.find;A.findOne=P.findOne;A.insert=P.insert;A.replace=P.replace;A.update=P.update;A.orderBy=P.orderBy;A.max=P.max;A.delete=P.delete;A.toRaw=P.toRaw;A.filter=P.filter;return A};P.insert=function(A){if('object'!==typeof A)throw Error('filter must be an object');var E=Array.isArray(this)?this:B;A._uuid=la.v4();E.push(A);E.limit=P.limit;E.find=P.find;E.findOne=P.findOne;E.update=P.update;E.replace=P.replace;E.orderBy=P.orderBy;
|
|
325
325
|
E.max=P.max;E.notIn=P.notIn;E.delete=P.delete;E.toRaw=P.toRaw;E.filter=P.filter;return E};P.update=function(){var A='_uuid',E,n=E=null;'string'==typeof arguments[arguments.length-1]&&(A=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);'object'==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);0<arguments.length&&(E=arguments);if('undefined'==typeof E||!E||'object'!=typeof E)throw Error('[ Collection ][ update ] `filters` argument must be defined: Array or Filter Object(s) expected');
|
|
326
|
-
if('undefined'==typeof n||!n||'object'!=typeof n)throw Error('[ Collection ][ update ] `set` argument must be defined: Object expected');var y=Array.isArray(arguments[0])?arguments[0]:P.find.apply(this,arguments)||[];E=Array.isArray(this)?this:JSON.clone(B);if(0<y.length){y=y.toRaw();for(var z=0,F=y.length;z<F;++z){y[z]=U(JSON.clone(n),y[z]);for(var
|
|
326
|
+
if('undefined'==typeof n||!n||'object'!=typeof n)throw Error('[ Collection ][ update ] `set` argument must be defined: Object expected');var y=Array.isArray(arguments[0])?arguments[0]:P.find.apply(this,arguments)||[];E=Array.isArray(this)?this:JSON.clone(B);if(0<y.length){y=y.toRaw();for(var z=0,F=y.length;z<F;++z){y[z]=U(JSON.clone(n),y[z]);for(var w=0,x=E.length;w<x;++w)if('undefined'==typeof E[w][A]&&'_uuid'==A&&'undefined'!=typeof E[w].id&&(A='id'),E[w][A]==y[z][A]){E[w]=y[z];break}}}E.limit=
|
|
327
327
|
P.limit;E.find=P.find;E.findOne=P.findOne;E.insert=P.insert;E.update=P.update;E.replace=P.replace;E.orderBy=P.orderBy;E.max=P.max;E.notIn=P.notIn;E.delete=P.delete;E.toRaw=P.toRaw;E.filter=P.filter;return E};P.replace=function(){var A='_uuid',E,n=E=null;'string'==typeof arguments[arguments.length-1]&&(A=arguments[arguments.length-1],delete arguments[arguments.length-1],--arguments.length);'object'==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1],delete arguments[arguments.length-
|
|
328
328
|
1],--arguments.length);0<arguments.length&&(E=arguments);if('undefined'==typeof E||!E||'object'!=typeof E)throw Error('[ Collection ][ update ] `filters` argument must be defined: Array or Filter Object(s) expected');if('undefined'==typeof n||!n||'object'!=typeof n)throw Error('[ Collection ][ update ] `set` argument must be defined: Object expected');var y=Array.isArray(arguments[0])?arguments[0]:P.find.apply(this,arguments)||[];E=Array.isArray(this)?this:JSON.clone(B);if(0<y.length){y=y.toRaw();
|
|
329
|
-
for(var z=0,F=y.length;z<F;++z){y[z]=JSON.clone(n);for(var
|
|
329
|
+
for(var z=0,F=y.length;z<F;++z){y[z]=JSON.clone(n);for(var w=0,x=E.length;w<x;++w){if('undefined'==typeof E[w][A]&&'_uuid'==A&&'undefined'!=typeof E[w].id)A='id';else if('undefined'==typeof E[w][A]&&'_uuid'==A)throw Error('No comparison key defined !');if(E[w][A]==y[z][A]){E[w]=y[z];break}}}}E.limit=P.limit;E.find=P.find;E.findOne=P.findOne;E.insert=P.insert;E.update=P.update;E.replace=P.replace;E.orderBy=P.orderBy;E.max=P.max;E.notIn=P.notIn;E.delete=P.delete;E.toRaw=P.toRaw;E.filter=P.filter;return E};
|
|
330
330
|
P['delete']=function(){var A=P.notIn.apply(this,arguments);A.limit=P.limit;A.find=P.find;A.findOne=P.findOne;A.insert=P.insert;A.update=P.update;A.replace=P.replace;A.orderBy=P.orderBy;A.max=P.max;A.notIn=P.notIn;A.toRaw=P.toRaw;A.filter=P.filter;A.delete=this.delete;return A};P.orderBy=function(){if('undefined'==typeof arguments||1>arguments.length)throw Error('[ Collection->orderBy(filter) ] where `filter` must not be empty or null');if(1==arguments.length)var A=arguments[0];else{A=Array(arguments.length);
|
|
331
331
|
for(var E=0,n=A.length;E<n;++E)A[E]=arguments[E]}E=Array.isArray(this)?this:JSON.clone(B);return L(A,E.toRaw())};P.max=function(){if('undefined'==typeof arguments||1>arguments.length)throw Error('[ Collection->max(filter) ] where `filter` must not be empty or null');if(1<arguments.length||Array.isArray(arguments[0])||'object'==typeof arguments[0]&&1<arguments[0].count())throw Error('[ Collection->max(filter) ] only accept one filter length, and fileter count must be equal to 1');var A=arguments[0];
|
|
332
|
-
try{var E=Object.keys(A)[0],n={};n[E]='desc';return P.find(A).orderBy(n).limit(1)[0][E]}catch(y){throw y;}};var L=function(A,E){if('object'!=typeof A)throw Error('`filter` parametter must be an object or an array');var n={},y=null,z=null,F=y=null;y=[];if(0==A.count())return null;n.asc=function(
|
|
333
|
-
1:0);if('string'==typeof Ea&&''!=Ea||'string'==typeof W){if('undefined'==typeof Ea||null==Ea)Ea='';if('undefined'==typeof W||null==W)W='';'number'==typeof Ea&&(Ea=''+Ea);'number'==typeof W&&(W=''+W);return Ea.localeCompare(W,void 0,{sensitivity:'case',caseFirst:'upper'})}return Ea>W?1:Ea<W?-1:0};return'object'==typeof M?
|
|
334
|
-
0,
|
|
335
|
-
-1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0):'boolean'==typeof Ea[ia[Aa]]||'boolean'==typeof W[ia[Aa]]?('boolean'==typeof Ea[ia[Aa]]&&(sa=Ea[ia[Aa]]?1:0),'boolean'==typeof W[ia[Aa]]&&(Da=W[ia[Aa]]?1:0),sa>Da?0==ma?1:-1:sa<Da?0==ma?-1:1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0):Ea[ia[Aa]]>W[ia[Aa]]?0==ma?1:-1:Ea[ia[Aa]]<W[ia[Aa]]?0==ma?-1:1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0};return
|
|
332
|
+
try{var E=Object.keys(A)[0],n={};n[E]='desc';return P.find(A).orderBy(n).limit(1)[0][E]}catch(y){throw y;}};var L=function(A,E){if('object'!=typeof A)throw Error('`filter` parametter must be an object or an array');var n={},y=null,z=null,F=y=null;y=[];if(0==A.count())return null;n.asc=function(w,x){var G=x.map(function(M,T){var ra={};ra.index=T;ra[w]=M[w];return ra});G.sort(function(M,T){var ra=function(Ea,W){/^(true|false)$/i.test(Ea)&&(Ea=/true/i.test(Ea)?1:0);/^(true|false)$/i.test(W)&&(W=/true/i.test(W)?
|
|
333
|
+
1:0);if('string'==typeof Ea&&''!=Ea||'string'==typeof W){if('undefined'==typeof Ea||null==Ea)Ea='';if('undefined'==typeof W||null==W)W='';'number'==typeof Ea&&(Ea=''+Ea);'number'==typeof W&&(W=''+W);return Ea.localeCompare(W,void 0,{sensitivity:'case',caseFirst:'upper'})}return Ea>W?1:Ea<W?-1:0};return'object'==typeof M?ra(M[w],T[w]):ra(M,T)});return G.map(function(M,T,ra){return x[M.index]})};n.desc=function(w,x){return n.asc(w,x).reverse()};y=function(w,x){var G=[],M=[];if(Array.isArray(x))for(var T=
|
|
334
|
+
0,ra=x.length;T<ra;++T)G[T]=Object.keys(x[T])[0],M[T]=x[T][G[T]];else for(ra in T=0,x)G[T]=ra,M[T]=x[ra],++T;z=function(Ea,W,ia,ea,Aa){var ma='desc'==ea[Aa]?1:0,sa,Da=sa=null;return'string'==typeof Ea[ia[Aa]]&&''!=Ea[ia[Aa]]?(sa=Ea[ia[Aa]].localeCompare(W[ia[Aa]]),0==ma&&0!=sa?0>sa?-1:1:0!=sa?0>sa?1:-1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0):'number'==typeof Ea[ia[Aa]]||'number'==typeof W[ia[Aa]]?(sa=(''+Ea[ia[Aa]]).localeCompare(''+W[ia[Aa]],void 0,{numeric:!0}),0==ma&&0!=sa?0>sa?-1:1:0!=sa?0>sa?1:
|
|
335
|
+
-1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0):'boolean'==typeof Ea[ia[Aa]]||'boolean'==typeof W[ia[Aa]]?('boolean'==typeof Ea[ia[Aa]]&&(sa=Ea[ia[Aa]]?1:0),'boolean'==typeof W[ia[Aa]]&&(Da=W[ia[Aa]]?1:0),sa>Da?0==ma?1:-1:sa<Da?0==ma?-1:1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0):Ea[ia[Aa]]>W[ia[Aa]]?0==ma?1:-1:Ea[ia[Aa]]<W[ia[Aa]]?0==ma?-1:1:ia.length-1>Aa?z(Ea,W,ia,ea,Aa+1):0};return w.sort(function(Ea,W){return z(Ea,W,G,M,0)})};Array.isArray(A)||1<A.count()?y=y(E,A):(F=Object.keys(A)[0],y=A[F],y=n[y](F,E));
|
|
336
336
|
y.find=P.find;y.findOne=P.findOne;y.limit=P.limit;y.notIn=P.notIn;y.insert=P.insert;y.update=P.update;y.replace=P.replace;y.delete=P.delete;y.orderBy=P.orderBy;y.max=P.max;y.toRaw=P.toRaw;y.filter=P.filter;return y};P.toRaw=function(){for(var A=Array.isArray(this)?this.slice():B.slice(),E=0,n=A.length;E<n;++E)A[E]._uuid&&delete A[E]._uuid;return A};P.filter=function(A){if('undefined'==typeof A)throw Error('`filter` parametter must be a string or an array.');var E=Array.isArray(this)?this:B;if(!E.length)return[];
|
|
337
|
-
var n=0,y=E.length,z=[],F=0;if(Array.isArray(A))for(var
|
|
337
|
+
var n=0,y=E.length,z=[],F=0;if(Array.isArray(A))for(var w,x=A.length,G;n<y;++n){G=!1;for(w=0;w<x;++w)'undefined'!=typeof E[n][A[w]]&&('undefined'==typeof z[F]&&(z[F]={}),z[F][A[w]]=E[n][A[w]],G=!0);G&&++F}else for(;n<y;++n)'undefined'!=typeof E[n][A]&&('undefined'==typeof z[F]&&(z[F]={}),z[F][A]=E[n][A],++F);return JSON.clone(z)};return P}'undefined'!==typeof module&&module.exports?module.exports=Collection:'function'===typeof define&&define.amd&&define('lib/collection',[],function(){return Collection});
|
|
338
338
|
function FormValidatorUtil(B,Q,V,la){var U='undefined'!==typeof module&&module.exports?!1:!0,N=U?require('lib/merge'):require('../../../../../lib/merge');U||require('../../../../../helpers');U&&require('helpers/dateFormat');var ha=U?require('lib/routing'):require('../../../../../lib/routing'),R=function(){var n=!1,y=null;U?U&&'undefined'!=typeof gina.forms&&(y=gina.forms):y=getContext('gina').forms||null;y&&'undefined'!=typeof y.validators&&(n=!0);return n},S={errors:{},keys:{'%l':'label','%n':'name',
|
|
339
339
|
'%s':'size'},data:{},excluded:[],errorLabels:{is:'Condition not satisfied',isEmail:'A valid email is required',isRequired:'Cannot be left empty',isBoolean:'Must be a valid boolean',isNumber:'Must be a number: allowed values are integers or floats',isNumberLength:'Must contain %s characters',isNumberMinLength:'Should be at least %s characters',isNumberMaxLength:'Should not be more than %s characters',isInteger:'Must be an integer',isIntegerLength:'Must have %s characters',isIntegerMinLength:'Should be at least %s characters',
|
|
340
340
|
isIntegerMaxLength:'Should not be more than %s characters',toInteger:'Could not be converted to integer',isFloat:'Must be a proper float',isFloatException:'Float exception found: %n',toFloat:'Could not be converted to float',toFloatNAN:'Value must be a valid number',isDate:'Must be a valid Date',isString:'Must be a string',isStringLength:'Must have %s characters',isStringMinLength:'Should be at least %s characters',isStringMaxLength:'Should not be more than %s characters',isJsonWebToken:'Must be a valid JSON Web Token',
|
|
341
|
-
query:'Must be a valid response',isApiError:'Condition not satisfied'}},u=null;if(B)u=N(JSON.clone(B),u),S.data=N(JSON.clone(B),S.data);else throw Error('missing data param');var I=function(n,y){var z=null;for(let F in la)if(la[F].name===y){z=(new DOMParser).parseFromString(n.innerHTML,'text/html').getElementById(la[F].id);break}if(z)return z;throw Error('Field `'+y+'` not found in fieldsSet');},
|
|
342
|
-
String.fromCharCode(
|
|
343
|
-
y){var z=u[this.name].errors||{},F=this.target.id||this.target.getAttribute('id');if(u.isValid()){var
|
|
344
|
-
|
|
345
|
-
M=!0);z.query=E(this.error||y||S.errorLabels.query,this);console.debug('[2] potential cached error detected !! ',M,G,' vs ',z.query);M&&(this.errors=z,this.valid=!1);'undefined'!=typeof gina.events[F]&&triggerEvent(gina,this.target,F,u[this.name]);return u[this.name]}var T=null,
|
|
346
|
-
|
|
341
|
+
query:'Must be a valid response',isApiError:'Condition not satisfied'}},u=null;if(B)u=N(JSON.clone(B),u),S.data=N(JSON.clone(B),S.data);else throw Error('missing data param');var I=function(n,y){var z=null;for(let F in la)if(la[F].name===y){z=(new DOMParser).parseFromString(n.innerHTML,'text/html').getElementById(la[F].id);break}if(z)return z;throw Error('Field `'+y+'` not found in fieldsSet');},v=function(n){var y;var z='';var F=n.length;for(y=0;y<F;){var w=n[y++];switch(w>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:z+=
|
|
342
|
+
String.fromCharCode(w);break;case 12:case 13:var x=n[y++];z+=String.fromCharCode((w&31)<<6|x&63);break;case 14:x=n[y++];var G=n[y++];z+=String.fromCharCode((w&15)<<12|(x&63)<<6|(G&63)<<0)}}return z},za=function(n,y){y=n.match(/\{\{([^{{}}]+)\}\}/g);for(let z=0,F=y.length;z<F;z++){let w=y[z].replace(/\[/g,'["').replace(/\]/g,'"]').replace(/\{|\}/g,'').trim();try{w=eval('data.'+w).replace(/^"|"$/g,''),n=n.replace(new RegExp(y[z].replace(/\{|\[|\]|\}/g,'\\$&'),'g'),w)}catch(x){}}return n},va=function(n,
|
|
343
|
+
y){var z=u[this.name].errors||{},F=this.target.id||this.target.getAttribute('id');if(u.isValid()){var w=this.target.dataset.ginaFormValidatorTestedValue;console.debug('[ '+this.name+' ]','TESTED VALUE -> '+this.value+' vs '+w);F='asyncCompleted.'+F;var x=this.target.form.getAttribute('id'),G='undefined'!=typeof gina.validator&&'undefined'!=typeof gina.validator.$forms[x]&&'undefined'!=typeof gina.validator.$forms[x].cachedErrors?gina.validator.$forms[x].cachedErrors:null;if(!w||'undefined'==typeof w||
|
|
344
|
+
w!==this.value)this.target.dataset.ginaFormValidatorTestedValue=this.value,G&&'undefined'!=typeof G[this.name]&&'undefined'!=typeof G[this.name].query&&(delete G[this.name].query,'undefined'!=typeof gina.validator.$forms[x]&&'undefined'!=typeof gina.validator.$forms[x].errors&&delete gina.validator.$forms[x].errors.query);else if(w===this.value){var M=!1;G&&'undefined'!=typeof G[this.name]&&'undefined'!=typeof G[this.name].query&&'undefined'!=typeof G[this.name].query[this.value]&&(this.error=y=G[this.name].query[this.value].slice(0),
|
|
345
|
+
M=!0);z.query=E(this.error||y||S.errorLabels.query,this);console.debug('[2] potential cached error detected !! ',M,G,' vs ',z.query);M&&(this.errors=z,this.valid=!1);'undefined'!=typeof gina.events[F]&&triggerEvent(gina,this.target,F,u[this.name]);return u[this.name]}var T=null,ra=this;if(window.XMLHttpRequest)T=new XMLHttpRequest;else if(window.ActiveXObject)try{T=new ActiveXObject('Msxml2.XMLHTTP')}catch(Aa){try{T=new ActiveXObject('Microsoft.XMLHTTP')}catch(ma){}}y={isSynchrone:!1,headers:{}};
|
|
346
|
+
w=n.data||null;z=null;F=/^true$/i.test(this.target.form.dataset.ginaFormLiveCheckEnabled)?!0:!1;z=JSON.stringify(w);if(/\$/.test(z)){w=z.match(/\$[-_\[\]a-z 0-9]+/g)||[];x=G=null;for(let Aa=0,ma=w.length;Aa<ma;Aa++)x=w[Aa].replace(/\$/g,''),re=new RegExp('\\'+w[Aa].replace(/\[|\]/g,'\\$&'),'g'),G=S.data[x]||null,!G&&F&&(G=I(this.target.form,x).value),z=z.replace(re,G)}w=z.replace(/\\"/g,'');var Ea='undefined'==typeof n.validIf?!0:n.validIf;y=N(y,n,V);delete y.data;delete y.validIf;z=y.headers['Content-Type'];
|
|
347
347
|
var W=null;F=this.target.getAttribute('id');if(!/^http/.test(y.url)&&/@/.test(y.url))try{M=ha.getRoute(y.url),y.url=M.toUrl()}catch(Aa){throw Aa;}if(y.withCredentials){if('withCredentials'in T)y.isSynchrone?T.open(y.method,y.url,y.isSynchrone):T.open(y.method,y.url);else if('undefined'!=typeof XDomainRequest)T=new XDomainRequest,T.open(y.method,y.url);else throw T=null,W='CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ',Error(W);T.responseType='undefined'!=
|
|
348
|
-
typeof y.responseType?y.responseType:'';T.withCredentials=!0}else y.isSynchrone?T.open(y.method,y.url,y.isSynchrone):T.open(y.method,y.url);for(var ia in y.headers)'Content-Type'==ia&&'undefined'!=typeof z&&null!=z&&''!=z||T.setRequestHeader(ia,y.headers[ia]);'undefined'!=typeof z&&null!=z&&''!=z&&T.setRequestHeader('Content-Type',z);var ea=function(Aa){
|
|
349
|
-
{},Da='undefined'!=typeof Aa.error&&'undefined'!=typeof Aa.fields?Aa.fields:{};if(0<Da.count()&&!ma||!ma){if(!ma){var Qa=null;'undefined'!=typeof Da[
|
|
350
|
-
|
|
351
|
-
sa&&''!=sa?sa+' query':'query')):'undefined'!=typeof Aa[
|
|
348
|
+
typeof y.responseType?y.responseType:'';T.withCredentials=!0}else y.isSynchrone?T.open(y.method,y.url,y.isSynchrone):T.open(y.method,y.url);for(var ia in y.headers)'Content-Type'==ia&&'undefined'!=typeof z&&null!=z&&''!=z||T.setRequestHeader(ia,y.headers[ia]);'undefined'!=typeof z&&null!=z&&''!=z&&T.setRequestHeader('Content-Type',z);var ea=function(Aa){ra.value=S.data[ra.name]=ra.value?ra.value.toLowerCase():ra.value;var ma=Aa.isValid||!1;ma=Ea!=ma?!1:!0;u[ra.name].valid=ma;var sa=u[ra.name].errors||
|
|
349
|
+
{},Da='undefined'!=typeof Aa.error&&'undefined'!=typeof Aa.fields?Aa.fields:{};if(0<Da.count()&&!ma||!ma){if(!ma){var Qa=null;'undefined'!=typeof Da[ra.name]?S.errorLabels.query=za(Da[ra.name],n.data):'undefined'!=typeof Aa.error&&/^5/.test(Aa.status)&&(Qa=Aa.error);var Ja='undefined'!=typeof n.error?n.error:null;sa.query=E(Qa||ra.error||Ja||S.errorLabels.query,ra);console.debug('[1] query error detected !! ',Aa,Da,sa.query)}sa.query||''!=ra.value||(ma=!0)}ma&&'undefined'!=typeof sa.query&&delete sa.query;
|
|
350
|
+
ra.valid=ma;Aa=gina.validator.$forms[ra.target.form.getAttribute('id')].cachedErrors||{};0<sa.count()?(ra.errors=sa,'undefined'==typeof u[ra.name].errors&&(u[ra.name].errors={}),u[ra.name].errors=N(u[ra.name].errors,sa),'undefined'!=typeof sa.query&&sa.query&&('undefined'==typeof Aa[ra.name]&&(Aa[ra.name]={}),'undefined'==typeof Aa[ra.name].query&&(Aa[ra.name].query={}),Aa[ra.name].query[ra.value]=sa.query.slice(0)),sa=ra.target.getAttribute('data-gina-form-errors'),/query/.test(sa)||ra.target.setAttribute('data-gina-form-errors',
|
|
351
|
+
sa&&''!=sa?sa+' query':'query')):'undefined'!=typeof Aa[ra.name]&&'undefined'!=typeof Aa[ra.name].query&&'undefined'!=typeof Aa[ra.name].query[ra.value]&&delete Aa[ra.name].query[ra.value];sa=ra.target.id||ra.target.getAttribute('id');console.debug('prematurely completed event `asyncCompleted.'+sa+'`');return triggerEvent(gina,ra.target,'asyncCompleted.'+sa,u[ra.name])};T&&(T.onerror=function(Aa,ma){console.debug('query error [2] detected !! ',ma,'Transaction error: might be due to the server CORS settings.\nPlease, check the console for more details.');
|
|
352
352
|
isOnException=!0;Aa=this.getResponseHeader('Content-Type');if(/\/json/.test(Aa))Aa=JSON.parse(this.responseText),'undefined'==typeof Aa.status&&(Aa.status=this.status);else if(Aa={status:T.status,message:''},/^(\{|\[)/.test(T.responseText))try{Aa=N(Aa,JSON.parse(T.responseText))}catch(sa){Aa=N(Aa,sa)}return ea(Aa)},T.onload=function(){try{W=this.responseText;var Aa=this.getResponseHeader('Content-Type');if(/\/json/.test(Aa))W=JSON.parse(this.responseText),'undefined'==typeof W.status&&(W.status=this.status);
|
|
353
|
-
else if(W={status:T.status,message:''},/^(\{|\[)/.test(T.responseText))try{W=N(W,JSON.parse(T.responseText))}catch(ma){W=N(W,ma)}return ea(W)}catch(ma){throw ma;}},B?T.send(
|
|
354
|
-
getConfig(T,'app');try{
|
|
355
|
-
Ea.host,n.port=Ea.port[Ea.server.protocol][Ea.server.scheme],n.protocol=Ea.server.protocol,n.rejectUnauthorized=!1),x={ca:n.ca,hostname:n.hostname,port:n.port,path:n.path},'undefined'!=typeof n.protocol&&(x.protocol=n.protocol),'undefined'!=typeof n.rejectUnauthorized&&(x.rejectUnauthorized=n.rejectUnauthorized));G={method:
|
|
353
|
+
else if(W={status:T.status,message:''},/^(\{|\[)/.test(T.responseText))try{W=N(W,JSON.parse(T.responseText))}catch(ma){W=N(W,ma)}return ea(W)}catch(ma){throw ma;}},B?T.send(w):T.send())}else console.debug('stopping on errors ...'),triggerEvent(gina,this.target,'asyncCompleted.'+F,u[this.name])},P=async function(n,y,z,F){var w=(new (require(_(GINA_FRAMEWORK_DIR+'/core/config.js',!0)))).getInstance(),x=null,G=null,M=null,T=getContext('bundle');if(/@/.test(n.url)){var ra=n.url.split(/@/);G=ra[0];M=ra[1];
|
|
354
|
+
getConfig(T,'app');try{w.bundle!==M&&(x=getConfig(T,'app').proxy[M])}catch(ea){throw Error('Could not retrieve `proxy` configuration for bundle `'+M+'`. Please check your `/config/app.json`.\n'+ea.stack);}ra=null}else throw Error('external url/domain not handled at this moment, please contact us if you need support for it.');ra=JSON.clone(ha.getRoute(n.url,n.data));var Ea=w[M][w.env];x||(w.bundle==M&&(x=getConfig(T,'settings').server.credentials,n.ca=x.ca||null,n.hostname=Ea.server.scheme+'://'+
|
|
355
|
+
Ea.host,n.port=Ea.port[Ea.server.protocol][Ea.server.scheme],n.protocol=Ea.server.protocol,n.rejectUnauthorized=!1),x={ca:n.ca,hostname:n.hostname,port:n.port,path:n.path},'undefined'!=typeof n.protocol&&(x.protocol=n.protocol),'undefined'!=typeof n.rejectUnauthorized&&(x.rejectUnauthorized=n.rejectUnauthorized));G={method:ra.method,requirements:ra.requirements,namespace:ra.namespace||void 0,url:decodeURI(ra.url),rule:G+'@'+M,param:JSON.clone(ra.param),middleware:JSON.clone(ra.middleware),bundle:ra.bundle,
|
|
356
356
|
isXMLRequest:y.isXMLRequest,isWithCredentials:y.isWithCredentials};M=G.rule.replace('@'+M,'')||'_common';M={template:'undefined'!=typeof Ea.content.templates?Ea.content.templates[M]||Ea.content.templates._common:void 0,cacheless:Ea.cacheless};M=N(M,G);Ea=JSON.clone(Ea);M.conf=Ea;M.conf.content.routing[M.rule].param=G.param;M.template&&'undefined'==typeof M.template.ginaLoader&&(M.template.ginaLoader=M.conf.content.templates._common.ginaLoader);M.conf.content.routing[M.rule].param=G.param;delete M.middleware;
|
|
357
|
-
delete M.param;delete M.requirements;Ea=new (require(_(GINA_FRAMEWORK_DIR+'/core/controller/controller.js'),!0))(M);Ea.name=
|
|
358
|
-
ea});ia&&(console.error(ia),W.error=ia);return W},L=null;L=U?va:P;var A=function(n,y){var z=null,F=null;'undefined'==typeof u[n]&&'undefined'!=typeof y&&(u[n]=z=y);if('object'==typeof u[n])try{z=JSON.parse(JSON.stringify(u[n]))}catch(
|
|
359
|
-
typeof window._currentValidatorAlias?window._currentValidatorAlias:'is';'undefined'!=typeof window&&window._currentValidatorAlias&&delete window._currentValidatorAlias;var
|
|
360
|
-
|
|
361
|
-
Aa.message);}}}else if(
|
|
362
|
-
S.data[this.name]=
|
|
363
|
-
''!=this.value||(
|
|
364
|
-
{};x.isRequired||''!=this.value||(
|
|
365
|
-
!1}(
|
|
366
|
-
E(this.error||S.errorLabels.isNumber,this),this.valid=!1,0<Ea.count()&&(this.errors=Ea)}if(+G===+G&&(M=!0,!Ea.isRequired&&''!=G)){var W=G.toString().length;
|
|
367
|
-
E(this.error||S.errorLabels.isNumberLength,this))),M=!1);M&&'undefined'!=typeof Ea.isNumberLength&&delete Ea.isNumberLength;this.valid=M;this.value=S.data[this.name]=''!=G?Number(G):G;0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].toInteger=function(){var
|
|
368
|
-
function(
|
|
369
|
-
E(this.error||S.errorLabels.isIntegerLength,this),M=!1)));this.valid=M;this.value=S.data[this.name]=Number(G);0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].toFloat=function(
|
|
357
|
+
delete M.param;delete M.requirements;Ea=new (require(_(GINA_FRAMEWORK_DIR+'/core/controller/controller.js'),!0))(M);Ea.name=ra.param.control;Ea.setOptions(y,z,F,M);y='object'==typeof n.data&&0<n.data.count()?n.data:{};if(/^get|delete|put$/i.test(n.method)){z=0;for(let ea in y)'object'==typeof y[ea]&&encodeRFC5987ValueChars(JSON.stringify(y[ea])),z++}x.method=n.method;x.path=ra.url;n=require('util').promisify;var W={isValid:!1},ia=!1;await n(Ea.query)(x,y).then(function(ea){W=ea}).catch(function(ea){ia=
|
|
358
|
+
ea});ia&&(console.error(ia),W.error=ia);return W},L=null;L=U?va:P;var A=function(n,y){var z=null,F=null;'undefined'==typeof u[n]&&'undefined'!=typeof y&&(u[n]=z=y);if('object'==typeof u[n])try{z=JSON.parse(JSON.stringify(u[n]))}catch(w){z=u[n]}else z=u[n];F='';U&&'undefined'!=typeof Q&&(F=Q[n].getAttribute('data-gina-form-field-label')||'');u[n]={target:U&&'undefined'!=typeof Q?Q[n]:null,name:n,value:z,valid:!1,label:F,exclude:!1};u[n].is=function(w,x,G){var M=!1,T='undefined'!=typeof window&&'undefined'!=
|
|
359
|
+
typeof window._currentValidatorAlias?window._currentValidatorAlias:'is';'undefined'!=typeof window&&window._currentValidatorAlias&&delete window._currentValidatorAlias;var ra=u[this.name].errors||{};S.data[this.name]=u[this.name].value;'undefined'==typeof ra.isRequired&&''==this.value&&!/^false$/i.test(this.value)&&0!=this.value||!ra.isRequired&&''==this.value&&!/^false$/i.test(this.value)&&0!=this.value?M=!0:ra.isRequired||'string'!=typeof this.value||''!=this.value||(M=!0);if(!M&&/^(true|false)$/i.test(w))M=
|
|
360
|
+
w;else if(!M){var Ea=null,W=null;if(/[!=>><a-z 0-9]+/i.test(w)){if((W=w.match(/\${0}[-_,.\[\]a-z0-9]+/ig))&&0<W.length){for(var ia=0,ea=W.length;ia<ea;++ia)'undefined'!=typeof u[W[ia]]&&W[ia]&&(Ea=new RegExp('\\$'+W[ia]+'(?!\\S+)','g'),w=''==u[W[ia]].value?w.replace(Ea,'""'):'string'==typeof u[W[ia]].value?w.replace(Ea,'"'+u[W[ia]].value+'"'):w.replace(Ea,u[W[ia]].value));try{w=w.replace(/(\(|\)|return)/g,''),M=/^\//.test(w)?eval(w+'.test("'+this.value+'")'):eval(w)}catch(Aa){throw Error(Aa.stack||
|
|
361
|
+
Aa.message);}}}else if(w instanceof RegExp)M=w.test(this.value)?!0:!1;else if('boolean'==typeof w)M=w?!0:!1;else try{/\/(.*)\//.test(w)?(Ea=w.match(/\/(.*)\//).pop(),W=w.replace('/'+Ea+'/',''),M=(new RegExp(Ea,W)).test(this.value)):M=eval(w)}catch(Aa){throw Error(Aa.stack||Aa.message);}}M?M&&'undefined'!=typeof ra[T]&&delete ra[T]:(ra[T]=E(this.error||x||S.errorLabels[T],this),'undefined'!=typeof G&&(ra.stack=G));this.valid=M;0<ra.count()&&(this.errors=ra);return u[this.name]};u[n].set=function(w){this.value=
|
|
362
|
+
S.data[this.name]=w;this.target.setAttribute('value',w);return u[this.name]};u[n].isEmail=function(){this.value=S.data[this.name]=this.value?this.value.toLowerCase():this.value;U&&this.target&&''!=this.target.value&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);var w=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this.value)?!0:!1,x=u[this.name].errors||{};x.isRequired||
|
|
363
|
+
''!=this.value||(w=!0);w?w&&'undefined'!=typeof x.isEmail&&delete x.isEmail:x.isEmail=E(this.error||S.errorLabels.isEmail,this);this.valid=w;0<x.count()&&(this.errors=x);return u[this.name]};u[n].isJsonWebToken=function(){this.value=S.data[this.name]=this.value?this.value.toLowerCase():this.value;U&&this.target&&''!=this.target.value&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);var w=/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(this.value)?!0:!1,x=u[this.name].errors||
|
|
364
|
+
{};x.isRequired||''!=this.value||(w=!0);w?w&&'undefined'!=typeof x.isJsonWebToken&&delete x.isJsonWebToken:x.isJsonWebToken=E(this.error||S.errorLabels.isJsonWebToken,this);this.valid=w;0<x.count()&&(this.errors=x);return u[this.name]};u[n].isBoolean=function(){var w=null,x=u[this.name].errors||{};x.isRequired&&0==this.value&&(delete x.isRequired,this.errors=x);switch(this.value){case 'true':case !0:case 1:w=this.value=S.data[this.name]=!0;break;case 'false':case !1:case 0:w=this.value=S.data[this.name]=
|
|
365
|
+
!1}(w=null!==w?!0:!1)?w&&'undefined'!=typeof x.isBoolean&&delete x.isBoolean:x.isBoolean=E(this.error||S.errorLabels.isBoolean,this);this.valid=w;0<x.count()&&(this.errors=x);return u[this.name]};u[n].isNumber=function(w,x){var G=this.value,M=!1,T=!0,ra=!0,Ea=u[this.name].errors||{};try{'string'==typeof G&&/,|\./g.test(G)?G=S.data[this.name]=this.value=parseFloat(G.replace(/,/g,'.').replace(/\s+/g,'')):'string'==typeof G&&''!=G&&(G=S.data[this.name]=this.value=parseInt(G.replace(/\s+/g,'')))}catch(ia){Ea.isNumber=
|
|
366
|
+
E(this.error||S.errorLabels.isNumber,this),this.valid=!1,0<Ea.count()&&(this.errors=Ea)}if(+G===+G&&(M=!0,!Ea.isRequired&&''!=G)){var W=G.toString().length;w&&'number'==typeof w&&W<w&&(T=!1,this.size=w);x&&'number'==typeof x&&W>x&&(ra=!1,this.size=x)}M&&T&&ra||(M||(Ea.isNumber=E(this.error||S.errorLabels.isNumber,this)),T&&ra||(T||(Ea.isNumberLength=E(this.error||S.errorLabels.isNumberMinLength,this)),ra||(Ea.isNumberLength=E(this.error||S.errorLabels.isNumberMaxLength,this)),w===x&&(Ea.isNumberLength=
|
|
367
|
+
E(this.error||S.errorLabels.isNumberLength,this))),M=!1);M&&'undefined'!=typeof Ea.isNumberLength&&delete Ea.isNumberLength;this.valid=M;this.value=S.data[this.name]=''!=G?Number(G):G;0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].toInteger=function(){var w=this.value,x=u[this.name].errors||{};if(w)try{this.value=S.data[this.name]=Math.round(w)}catch(G){x.toInteger=E(this.error||S.errorLabels.toInteger,this),this.valid=!1,0<x.count()&&(this.errors=x)}return u[this.name]};u[n].isInteger=
|
|
368
|
+
function(w,x){var G=this.value,M=!1,T=!0,ra=!0,Ea=u[this.name].errors||{};+G===+G&&0===G%1&&(M=!0,Ea.isRequired||''==G||(w&&'number'==typeof w&&G.length<w&&(T=!1,this.size=w),x&&'number'==typeof x&&G.length>x&&(ra=!1,this.size=x)));M&&T&&ra||(M||(Ea.isInteger=E(this.error||S.errorLabels.isInteger,this)),T&&ra||(T||(Ea.isIntegerLength=E(this.error||S.errorLabels.isIntegerMinLength,this),M=!1),ra||(Ea.isIntegerLength=E(this.error||S.errorLabels.isIntegerMaxLength,this),M=!1),w===x&&(Ea.isIntegerLength=
|
|
369
|
+
E(this.error||S.errorLabels.isIntegerLength,this),M=!1)));this.valid=M;this.value=S.data[this.name]=Number(G);0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].toFloat=function(w){'string'==typeof this.value&&(this.value=this.value.replace(/\s+/g,''),/,/.test(this.value)&&!/\./.test(this.value)?this.value=this.value.replace(/,/g,'.'):this.value=this.value.replace(/,/g,''));var x=S.data[this.name]=this.value,G=u[this.name].errors||{},M=!0;w?this.decimals=parseInt(w):'undefined'==typeof this.decimals&&
|
|
370
370
|
(this.decimals=2);if(x)if(this.isNumber().valid)try{Number.isFinite(x)||(x=this.value=S.data[this.name]=new Number(parseFloat(x.match(/[0-9.,]+/g).join('').replace(/,/,'.')))),U&&this.target.setAttribute('value',x)}catch(T){M=!1,G.toFloat=E(this.error||S.errorLabels.toFloat,this),this.valid=!1,0<G.count()&&(this.errors=G)}else M=!1,G.toFloat=E(this.error||S.errorLabels.toFloatNAN,this);else return u[this.name];this.decimals&&x&&!G.toFloat&&(this.value=S.data[this.name]=parseFloat(this.value.toFixed(this.decimals)));
|
|
371
|
-
this.valid=M;0<G.count()&&(this.errors=G);return u[this.name]};u[n].isFloat=function(
|
|
372
|
-
E(this.error||S.errorLabels.isFloat,this));this.valid=x;0<
|
|
373
|
-
/true/.test(
|
|
374
|
-
'string'!=typeof G||Ea.isRequired||''==G||(M=!0,
|
|
375
|
-
this))));this.valid=M;0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].isDate=function(
|
|
376
|
-
'yyyy-mm-dd';if(x instanceof Date)x=x.format(
|
|
377
|
-
''!=this.value?M.isDate=E(this.error||S.errorLabels.isDate,this):G=!0,this.valid=G,0<M.count()&&(this.errors=M),u[this.name];G=!0}this.valid=G;return x};u[n].format=function(
|
|
378
|
-
''),S.data[this.name]=S.data[this.name]=this.value,u[this.name]};u[n].exclude=function(
|
|
379
|
-
'/validators/'+
|
|
371
|
+
this.valid=M;0<G.count()&&(this.errors=G);return u[this.name]};u[n].isFloat=function(w){'string'==typeof this.value&&(this.value=this.value.replace(/\s+/g,''));var x=S.data[this.name]=this.value;w=u[this.name].errors||{};'string'==typeof x&&/\./.test(x)&&Number.isFinite(Number(x));'string'==typeof x&&/,/g.test(x)&&(x=this.value=S.data[this.name]=Number(x.replace(/,/g,'.')));Number(x)===x&&0!==x%1?(this.value=S.data[this.name]=Number(x),x=!0):x=!1;w.isRequired||''!=this.value||(x=!0);x||(w.isFloat=
|
|
372
|
+
E(this.error||S.errorLabels.isFloat,this));this.valid=x;0<w.count()&&(this.errors=w);return u[this.name]};u[n].isRequired=function(w){if('boolean'==typeof w&&!w)return this.valid=!0,w=S.excluded.indexOf(this.name),-1<w&&S.excluded.splice(w,1),u[this.name];if(U&&this.target&&'INPUT'==this.target.tagName&&'undefined'!=typeof this.target.type&&'radio'==this.target.type){w=document.getElementsByName(this.name);for(var x=0,G=w.length;x<G;++x)if(w[x].checked){/true|false/.test(w[x].value)?this.value=S.data[this.name]=
|
|
373
|
+
/true/.test(w[x].value)?!0:!1:this.value=S.data[this.name]=w[x].value;this.valid=!0;break}}w='undefined'==typeof this.value||null==this.value||''==this.value||/^\s+/.test(this.value)?!1:!0;x=u[this.name].errors||{};w?w&&'undefined'!=typeof x.isRequired&&delete x.isRequired:x.isRequired=E(this.error||S.errorLabels.isRequired,this);this.valid=w;0<x.count()&&(this.errors=x);return u[this.name]};u[n].isString=function(w,x){var G=S.data[this.name]=this.value,M=!1,T=!0,ra=!0,Ea=u[this.name].errors||{};
|
|
374
|
+
'string'!=typeof G||Ea.isRequired||''==G||(M=!0,w&&'number'==typeof w&&G.length<w&&(T=!1,this.size=w),x&&'number'==typeof x&&G.length>x&&(ra=!1,this.size=x));M&&T&&ra||(!M&&Ea.isRequired&&''==G?(M=!1,Ea.isString=E(this.error||S.errorLabels.isString,this)):M||Ea.isRequired||(M=!0),T&&ra||(M=!1,T||(Ea.isStringLength=E(this.error||S.errorLabels.isStringMinLength,this)),ra||(Ea.isStringLength=E(this.error||S.errorLabels.isStringMaxLength,this)),w===x&&(Ea.isStringLength=E(this.error||S.errorLabels.isStringLength,
|
|
375
|
+
this))));this.valid=M;0<Ea.count()&&(this.errors=Ea);return u[this.name]};u[n].isDate=function(w){var x=this.value,G=!1,M=u[this.name].errors||{},T=null;if(!x||''==x||/NaN|Invalid Date/i.test(x))return/NaN|Invalid Date/i.test(x)&&(console.warn('[FormValidator::isDate] Provided value for field `'+this.name+'` is not allowed: `'+x+'`'),M.isDate=E(this.error||S.errorLabels.isDate,this)),this.valid=G,0<M.count()&&(this.errors=M),u[this.name];if('undefined'==typeof w||'undefined'!=typeof w&&/true/i.test(w))w=
|
|
376
|
+
'yyyy-mm-dd';if(x instanceof Date)x=x.format(w);else{try{T=w.match(/[^\/\- ]+/g)}catch(ea){throw Error('[FormValidator::isDate] Provided mask not allowed: `'+w+'`');}try{x=x.match(/[^\/\- ]+/g);var ra={},Ea;var W=0;for(Ea=T.length;W<Ea;++W)ra[T[W]]=x[W];for(var ia in ra)w=w.replace(new RegExp(ia,'g'),ra[ia])}catch(ea){throw Error('[FormValidator::isDate] Provided value not allowed: `'+x+'`'+ea);}x=this.value=S.data[this.name]=new Date(w);if(/Invalid Date/i.test(x)||!1===x instanceof Date)return M.isRequired||
|
|
377
|
+
''!=this.value?M.isDate=E(this.error||S.errorLabels.isDate,this):G=!0,this.valid=G,0<M.count()&&(this.errors=M),u[this.name];G=!0}this.valid=G;return x};u[n].format=function(w,x){var G=this.value;return G?G.format(w,x):u[this.name]};u[n].setFlash=function(w,x){'undefined'!=typeof x&&''!=x&&(this.error=x);return u[this.name]};u[n].setLabel=function(w){'undefined'!=typeof w&&''!=w&&(this.label=w);return u[this.name]};u[n].trim=function(w){if('boolean'==typeof w&&w)return this.value=this.value.replace(/^\s+|\s+$/,
|
|
378
|
+
''),S.data[this.name]=S.data[this.name]=this.value,u[this.name]};u[n].exclude=function(w){if('boolean'==typeof w&&!w)return/^true|false$/i.test(this.value)&&(this.value=/^true$/i.test(this.value)?!0:!1,S.data[this.name]=this.value),u[this.name];this.isExcluded=!1;0>S.excluded.indexOf(this.name)&&(S.excluded.push(this.name),this.isExcluded=!0);return u[this.name]};u[n].query=L;u[n].getValidationContext=function(){return{isGFFCtx:U,self:u,local:S,replace:E}};if(R()){z=y=null;try{for(let w in gina.forms.validators)z=
|
|
379
|
+
'/validators/'+w+'/main.js',S.errorLabels[w]='Condition not satisfied',U?(y=v(gina.forms.validators[w].data),y=y.replace(/(\)\s+\{|\)\{){1}/,'$&\n\tvar validationContext = this.getValidationContext(),isGFFCtx = validationContext.isGFFCtx,self = validationContext.self,local = validationContext.local,replace = validationContext.replace;')):y=gina.forms.validators[w].toString(),u[n][w]=eval('('+y+')\n//# sourceURL='+w+'.js')}catch(w){throw Error('[UserFormValidator] Could not evaluate: `'+z+'`\n'+w.stack);
|
|
380
380
|
}}};for(let n in u)A(n,u[n]);u.addField=function(n,y){'undefined'==typeof u[n]&&A(n,y)};u.isValid=function(){return 0<u.getErrors().count()?!1:!0};u.setErrors=function(n){if(!n)return{};for(var y in u)if('object'==typeof u[y]){for(var z in u[y])'object'==typeof n[y]&&'undefined'!=typeof n[y][z]&&('undefined'!=typeof u[y].valid&&/^true$/i.test(u[y].valid)?delete n[y][z]:('undefined'==typeof u[y].errors&&(u[y].errors={}),u[y].errors[z]=n[y][z]));('undefined'==typeof u[y].errors&&'undefined'!=typeof n[y]||
|
|
381
381
|
'undefined'!=typeof u[y].errors&&0==u[y].errors.count()&&'undefined'!=typeof n[y])&&delete n[y]}return n};u.getErrors=function(n){var y={};if('undefined'!=typeof n)return'undefined'!=typeof u[n]&&u[n]&&'undefined'!=typeof u[n].errors&&0<u[n].errors.count()&&(y[n]=u[n].errors),y;for(var z in u)'object'==typeof u[z]&&'undefined'!=typeof u[z].errors&&0<u[z].errors.count()&&(y[z]=u[z].errors);return y};u.toData=function(){if(0<S.excluded.length)for(var n=0,y=S.excluded.length;n<y;++n)'undefined'!=typeof S.data[S.excluded[n]]&&
|
|
382
|
-
delete S.data[S.excluded[n]];return S.data};var E=function(n,y){var z=n.match(/%[a-z]+/gi);if(z)for(var F=0,
|
|
382
|
+
delete S.data[S.excluded[n]];return S.data};var E=function(n,y){var z=n.match(/%[a-z]+/gi);if(z)for(var F=0,w=z.length;F<w;++F)n=n.replace(new RegExp(z[F],'g'),y[S.keys[z[F]]]);return n};u.setErrorLabels=function(n){'undefined'!=typeof n&&(S.errorLabels=N(n,S.errorLabels))};return u}'undefined'!==typeof module&&module.exports?module.exports=FormValidatorUtil:'function'===typeof define&&define.amd&&define('lib/form-validator',[],function(){return FormValidatorUtil});
|
|
383
383
|
function Routing(){var B='undefined'!==typeof module&&module.exports?!1:!0,Q={allowedMethods:['get','post','put','delete'],reservedParams:['controle','file','title','namespace','path'],notFound:{}};Q.allowedMethodsString=Q.allowedMethods.join(',');var V=null,la=null,U=null;B?(la&&'function'==typeof la||(la=require('lib/merge')),U&&'function'==typeof U||(U=require('lib/form-validator'))):(require('fs'),require('util'),require('../../inherits'),la=require('../../merge'),V=require(__dirname+'/../../../core/plugins')||
|
|
384
|
-
getContext('gina').plugins,U=V.Validator);Q.getUrlProps=function(u,I){var
|
|
385
|
-
|
|
386
|
-
try{
|
|
387
|
-
1);else if(/^validator::/.test(
|
|
388
|
-
!x&&n>=E)for(G=Object.getOwnPropertyNames(u.requirements),L=0,I.join(',').match(/:[-_a-z0-9]+/g);L<G.length;){A=G[L];if('undefined'==typeof u.param[A]&&/^validator::/i.test(u.requirements[A])){if(I.length!=P.length)break;var M=I.join(',').match(/:[-_a-z0-9]+/g);let T=u.requirements[A];z={};
|
|
389
|
-
|
|
390
|
-
z),x=Array.isArray(
|
|
391
|
-
I));
|
|
392
|
-
typeof
|
|
393
|
-
u==E.query.data[Object.keys(E.query.data)[0]]&&(E.query.data[Object.keys(E.query.data)[0]]=n[y],
|
|
394
|
-
typeof
|
|
395
|
-
function(
|
|
396
|
-
I=z.substr(0,z.length),/^\//.test(L)?(E=L.match(/\/(.*)\//).pop(),n=L.replace('/'+E+'/',''),E=(new RegExp(E,n)).test(I)):E=(new RegExp(
|
|
384
|
+
getContext('gina').plugins,U=V.Validator);Q.getUrlProps=function(u,I){var v={};if(B){var za=window.gina.config;v.hostname=za.hostname;'undefined'!=typeof u&&(u=this.getRoute('webroot@'+u),v.hostname=u.hostname,v.host=u.host,v.webroot=u.webroot)}else za=getContext('gina').config,'undefined'!=typeof getContext('argvFilename')&&(za.getRouting=getContext('gina').Config.instance.getRouting),'undefined'==typeof u&&(u=za.bundle),'undefined'==typeof I&&(I=za.env),v.hostname=za.envConf[u][I].hostname,v.host=
|
|
385
|
+
za.envConf[u][I].host,v.webroot=za.envConf[u][I].server.webroot;return v};Q.compareUrls=async function(u,I,v,za,va){'undefined'==typeof v&&(v={routing:{}});if(/,/.test(I)){var P=0;I=I.split(/,/g);for(var L=I.length,A={past:!1,request:v};P<L&&!A.past;)A=await N(u,I[P],v,za,va),++P;return A}return await N(u,I,v,za,va)};var N=async function(u,I,v,za,va){var P=null;try{P=u.url.split(/\//)}catch(T){console.warn(T),P=['']}I=I.split(/\//);var L=0,A=0,E=I.length,n=0,y={},z=0,F=v.method.toLowerCase(),w='get';
|
|
386
|
+
try{w=u.method.toLowerCase()}catch(T){}var x=!1;if('undefined'!=typeof u.requirements&&/get|delete/i.test(F)&&'undefined'!=typeof v[F]||'undefined'!=typeof u.requirements&&/get/i.test(F)&&/delete/i.test(w)){/get/i.test(F)&&/delete/i.test(w)&&(F=w);if(/^(delete)$/i.test(F)&&P.length===I.length){'undefined'==typeof v[F]&&(v[F]={});for(let T=0,ra=I.length;T<ra;T++)if(P[T]===I[T])++n;else if(w=I[T].substr(1),'undefined'!=typeof u.requirements[w]){w=u.requirements[w];if(/^\//.test(w))w=w.substr(1,w.lastIndexOf('/')-
|
|
387
|
+
1);else if(/^validator::/.test(w)&&await ha(I[T],P[T],u,v,za,va)){++n;continue}/^:/.test(I[T])&&'undefined'!=typeof w&&(new RegExp(w)).test(P[T])&&(++n,v[F][I[T].substr(1)]=P[T])}x=!0}for(var G in v[F])'undefined'!=typeof u.requirements[G]&&0>I.indexOf(':'+G)&&(I[A]=':'+G,++A,P[L]=v[F][G],++L,x||P.length!==I.length||++E)}if(!x&&P.length===I.length)for(;z<E;++z)P[z]===I[z]?++n:n==z&&/:/.test(I[z])&&await ha(I[z],P[z],u,v,za,va)&&++n;if('undefined'!=typeof u.requirements&&F==u.method.toLowerCase()&&
|
|
388
|
+
!x&&n>=E)for(G=Object.getOwnPropertyNames(u.requirements),L=0,I.join(',').match(/:[-_a-z0-9]+/g);L<G.length;){A=G[L];if('undefined'==typeof u.param[A]&&/^validator::/i.test(u.requirements[A])){if(I.length!=P.length)break;var M=I.join(',').match(/:[-_a-z0-9]+/g);let T=u.requirements[A];z={};w={};x={};try{w=JSON.parse(T.split(/::/).splice(1)[0].replace(/([^:"\s+](\w+)):/g,'"$1":').replace(/([^:"\s+](\w+))\s+:/g,'"$1":'))}catch(ra){throw ra;}if('undefined'!=typeof w.query&&'undefined'!=typeof w.query.data){z=
|
|
389
|
+
w.query.data;for(let ra in z)0>M.indexOf(z[ra])&&delete z[ra];for(let ra=0,Ea=I.length;ra<Ea;ra++)/^:/.test(I[ra])&&(M=I[ra].replace(/^:/,''),''!=M&&'undefined'!=typeof P[ra]&&(z[M]=P[ra],'undefined'==typeof v.params[M]&&(v.params[M]=P[ra])))}z=la(z,JSON.clone(v[F])||{});'undefined'==typeof z[A]&&(z[A]=null);x[A]=w;_validator=B?new U(z):new U('routing',z,null,x);if(0==w.count()){console.error('Route validation failed '+u.rule);--n;L++;continue}for(let ra in w)if('undefined'!=typeof w[ra].data&&(w[ra].data=
|
|
390
|
+
z),x=Array.isArray(w[ra])?await _validator[A][ra].apply(_validator[A],w[ra]):await _validator[A][ra](w[ra],v,za,va),!x.isValid&&(--n,'undefined'!=typeof x.error))throw x.error;}L++}y.past=n===E?!0:!1;y.past&&(v.routing=S(u,v[F]),y.request=v);return y},ha=async function(u,I,v,za,va,P){var L=-1,A=u.match(/:\w+/g);L=new RegExp(u,'g');var E=null,n=null,y=null;E=!1;var z=E=n=n=null,F=null,w=za.method.toLowerCase();if(!A.length)return!1;v.param.path&&L.test(v.param.path)&&(v.param.path=v.param.path.replace(L,
|
|
391
|
+
I));v.param.namespace&&L.test(v.param.namespace)&&(v.param.namespace=v.param.namespace.replace(L,I));'undefined'!=typeof v.param.file&&/:/.test(v.param.file)&&(E=new RegExp('(:'+u+'/|:'+u+'$)','g'),R.variable=I,v.param.file=v.param.file.replace(E,R),E=null);v.param.title&&L.test(v.param.title)&&(v.param.title=v.param.title.replace(L,I));if(1==A.length){E=new RegExp(A[0]);L=-1<A.indexOf(u)?A.indexOf(u):!1;!1===L&&u.match(E)&&(L=0);if(!1===L)return L;if(v.method.toLowerCase()!==w)return!1;'undefined'==
|
|
392
|
+
typeof za[w]&&(za[w]={});y=A[L].substr(1);L=v.requirements[y];if(/^\//.test(L))E=L.match(/\/(.*)\//).pop(),n=L.replace('/'+E+'/',''),E=(new RegExp(E,n)).test(I);else if(/^validator::/.test(L)&&I){n={};E={};z={};F='';u.replace(new RegExp('[^'+y+']','g'),function(ra){F+=ra});n[y]=I.replace(new RegExp(F,'g'),'');try{E=JSON.parse(L.split(/::/).splice(1)[0].replace(/([^:"\s+](\w+)):/g,'"$1":').replace(/([^:"\s+](\w+))\s+:/g,'"$1":'))}catch(ra){throw ra;}'undefined'!=typeof E.query&&'undefined'!=typeof E.query.data&&
|
|
393
|
+
u==E.query.data[Object.keys(E.query.data)[0]]&&(E.query.data[Object.keys(E.query.data)[0]]=n[y],za.params[y]=n[y]);z[y]=E;n=new U('routing',n,null,z);if(0==E.count())return console.error('Route validation failed '+v.rule),!1;for(var x in E)Array.isArray(E[x])?await n[y][x].apply(n[y],E[x]):await n[y][x](E[x],za,va,P);E=n.isValid()}else E=(new RegExp(v.requirements[y])).test(I);if('undefined'!=typeof v.param[y]&&'undefined'!=typeof v.requirements&&'undefined'!=typeof v.requirements[y]&&'undefined'!=
|
|
394
|
+
typeof za.params&&E)return za.params[y]=I,'undefined'==typeof za[w][y]&&(za[w][y]=I),!0}else{va=v.url;P=za.url;w={};z='';var G=!1,M=0;x=0;for(var T=P.length;x<T;++x)if(P.charAt(x)!=va.charAt(M)||G){if(''==z)G=!0,z+=P.charAt(x);else if(x>va.indexOf(A[0])+A[0].length){L=v.requirements[A[0]];I=z.substr(0,z.length);if(/^\//.test(L))E=L.match(/\/(.*)\//).pop(),n=L.replace('/'+E+'/',''),E=(new RegExp(E,n)).test(I);else if(/^validator::/.test(L)){n={};E={};z={};F='';u.replace(new RegExp('[^'+y[0]+']','g'),
|
|
395
|
+
function(ra){F+=ra});n[y[0]]=I.replace(new RegExp(F,'g'),'');E=JSON.parse(L.split(/::/).splice(1)[0].replace(/([^\W+ true false])+(\w+)/g,'"$&"'));z[y[0]]=E;n=new U('routing',n,null,z);for(let ra in E)if(Array.isArray(E[ra]))n[y[0]][ra].apply(n[y[0]],E[ra]);else n[y[0]][ra](E[ra]);E=n.isValid()}else E=(new RegExp(v.requirements[y[0]])).test(I);if(E)w[A[0].substr(1)]=I;else return!1;z='';G=!1;M=va.indexOf(A[0])+A[0].length;--x;A.splice(0,1)}else z+=P.charAt(x),++M;if(x==T-1)if(L=v.requirements[A[0]],
|
|
396
|
+
I=z.substr(0,z.length),/^\//.test(L)?(E=L.match(/\/(.*)\//).pop(),n=L.replace('/'+E+'/',''),E=(new RegExp(E,n)).test(I)):E=(new RegExp(v.requirements[y])).test(I),E)w[A[0].substr(1)]=I;else return!1}else++M;if(w.count()==A.length){y=null;for(y in w)za.params[y]=w[y];return!0}}return!1},R=function(u){return/\/$/.test(u)?R.variable+'/':R.variable},S=function(u,I){var v=null,za,va=u.url,P=null;for(P in u.param)if(('undefined'==typeof I||'undefined'!=typeof I[P])&&/^:/.test(u.param[P])){var L=u.param[P].substr(1);
|
|
397
397
|
if('undefined'!=typeof I&&'undefined'!=typeof I[L]){var A=new RegExp('(:'+L+'/|:'+L+'$)','g');'undefined'!=typeof u.param.path&&/:/.test(u.param.path)&&(u.param.path=u.param.path.replace(A,I[L]));'undefined'!=typeof u.param.title&&/:/.test(u.param.title)&&(u.param.title=u.param.title.replace(A,I[L]));'undefined'!=typeof u.param.namespace&&/:/.test(u.param.namespace)&&(u.param.namespace=u.param.namespace.replace(A,I[L]));'undefined'!=typeof u.param.file&&/:/.test(u.param.file)&&(R.variable=I[L],u.param.file=
|
|
398
|
-
u.param.file.replace(A,R));if(/,/.test(u.url)){
|
|
399
|
-
window.location.hostname!=window.gina.config.hostname.replace(/^(https|http|wss|ws):\/\//,'').replace(/:\d+$/,'')||(va=!0,window.gina.config.hostname=window.gina.config.hostname.replace(/^(https|http|wss|ws):\/\//,'').replace(/:\d+$/,'')),
|
|
400
|
-
null==A||(u=u.toLowerCase(),u+='@'+A);if(/@/.test(u)){var E=u.replace(/(.*):\/\//,'').split(/@/);A=E[1];/\/(.*)$/.test(u)&&(L=u.replace(/(.*):\/\//,'').split(/\/(.*)$/)[1],A=A.replace(/\/(.*)$/,''),P=L||P);u=E[0].toLowerCase()+'@'+A}A=
|
|
401
|
-
|
|
402
|
-
'&',va[A]=I[n],++A);for(let n in I)-1<Q.reservedParams.indexOf(n)||'undefined'!=typeof L.requirements[n]||-1<va.indexOf(n)||(
|
|
403
|
-
(y=''+this.proxy_hostname);this.url='undefined'!=typeof n&&/^true$/i.test(n)?F.replace(new RegExp('^'+z),'/'):F.replace(new RegExp('^('+z+'|/$)'),z);return y+this.url};L.request=function(n,y){var z=null,F=null;'function'==typeof arguments[arguments.length-1]&&(z=arguments[arguments.length-1]);'object'==typeof arguments[2]&&(F=arguments[2]);var
|
|
404
|
-
'https':'http';B?window.open(F,'undefined'!=typeof y&&'undefined'!=typeof y.target?y.target:'_self'):('undefined'==typeof y.agent&&(y.agent=!1),x=require(''+x),
|
|
405
|
-
z?x.get(F,y,
|
|
406
|
-
'undefined'!=typeof arguments[1]&&arguments[1]&&-1<Q.allowedMethods.indexOf(arguments[1].toLowerCase())&&(
|
|
407
|
-
z=null));va='boolean'!=typeof arguments[arguments.length-1]?!1:arguments[arguments.length-1];var F=!1,
|
|
408
|
-
y=
|
|
409
|
-
'i');E=null;var M;for(M in A){if('undefined'==typeof A[M].param)break;if(A[M].bundle==I&&(E=A[M].method,/,/.test(E)&&P.test(E)&&(E=
|
|
410
|
-
M+' ] needs your attention.\n'+T.stack);}}}if(F)return/\/$/.test(u)&&'/'!=u&&(u=u.substr(0,u.length-1)),n&&(u+=n),L.url=u,L.toUrl=function(T){var
|
|
398
|
+
u.param.file.replace(A,R));if(/,/.test(u.url)){v=u.url.split(/,/g);var E=0;for(za=v.length;E<za;++E)R.variable=I[L],v[E]=v[E].replace(A,R);u.url=v.join(',')}else R.variable=I[L],u.url=u.url.replace(A,R)}}if(v){E=0;za=v.length;va=va.split(/,/g);var n=0;for(u.urlIndex=0;E<za;++E)if(v=0,A=va[0].match(/:[-_a-z0-9]+/ig)){P=0;for(L=A.length;P<L;P++){var y=A[P].substr(1);'undefined'!=typeof I[y]&&I[y]&&v++}v>n&&(n=v,u.urlIndex=E)}}return u};Q.getRoute=function(u,I,v){var za=null,va=!1;B?(window.location.port||
|
|
399
|
+
window.location.hostname!=window.gina.config.hostname.replace(/^(https|http|wss|ws):\/\//,'').replace(/:\d+$/,'')||(va=!0,window.gina.config.hostname=window.gina.config.hostname.replace(/^(https|http|wss|ws):\/\//,'').replace(/:\d+$/,'')),za=window.gina.config):(za=getContext('gina').config,'undefined'!=typeof getContext('argvFilename')&&(za.getRouting=getContext('gina').Config.instance.getRouting),va=getContext('isProxyHost'));var P=za.env||GINA_ENV,L=null,A=za.bundle;/@/.test(u)||'undefined'==typeof A||
|
|
400
|
+
null==A||(u=u.toLowerCase(),u+='@'+A);if(/@/.test(u)){var E=u.replace(/(.*):\/\//,'').split(/@/);A=E[1];/\/(.*)$/.test(u)&&(L=u.replace(/(.*):\/\//,'').split(/\/(.*)$/)[1],A=A.replace(/\/(.*)$/,''),P=L||P);u=E[0].toLowerCase()+'@'+A}A=za.getRouting(A,P);if('undefined'==typeof A[u])throw Error('[ RoutingHelper::getRouting(rule, params) ] : `'+u+'` not found !');L=JSON.clone(A[u]);E=null;L=S(L,I);if(L.isProxyHost=va)L.proxy_hostname=B?window.location.protocol+'//'+document.location.hostname:process.gina.PROXY_HOSTNAME||
|
|
401
|
+
za.envConf._proxyHostname,L.proxy_host=L.proxy_hostname.replace(/^(https|http):\/\//,'');/,/.test(L.url)&&('undefined'!=typeof L.urlIndex&&(v=L.urlIndex,delete L.urlIndex),v='undefined'!=typeof v?v:0,L.url=L.url.split(/,/g)[v]);/\/$/.test(L.url)&&'/'!=L.url&&(L.url=L.url.substr(0,L.url.length-1));if(/GET/i.test(L.method)&&'undefined'!=typeof I){v='?';za=A[u].url;va=[];A=0;for(let n in L.param)-1<Q.reservedParams.indexOf(n)||(new RegExp(L.param[n])).test(za)||'undefined'==typeof I[n]||(v+=n+'='+encodeRFC5987ValueChars(I[n])+
|
|
402
|
+
'&',va[A]=I[n],++A);for(let n in I)-1<Q.reservedParams.indexOf(n)||'undefined'!=typeof L.requirements[n]||-1<va.indexOf(n)||(v='object'==typeof I[n]?v+(n+'='+encodeRFC5987ValueChars(JSON.stringify(I[n]))+'&'):v+(n+'='+I[n]+'&'));A=va=za=null;1<v.length&&(v=v.substring(0,v.length-1),L.url+=v);v=null}L.toUrl=function(n){var y=null;/^redirect$/i.test(this.param.control)&&(y=Q.getUrlProps(this.bundle,P||GINA_ENV));var z=this.webroot||y.webroot;y=''+this.hostname||''+y.hostname;var F=''+this.url;this.isProxyHost&&
|
|
403
|
+
(y=''+this.proxy_hostname);this.url='undefined'!=typeof n&&/^true$/i.test(n)?F.replace(new RegExp('^'+z),'/'):F.replace(new RegExp('^('+z+'|/$)'),z);return y+this.url};L.request=function(n,y){var z=null,F=null;'function'==typeof arguments[arguments.length-1]&&(z=arguments[arguments.length-1]);'object'==typeof arguments[2]&&(F=arguments[2]);var w=this.webroot||F.webroot,x=this.hostname||F.hostname;F='undefined'!=typeof n&&1==n?path.replace(w,'/'):this.url||F.url;/^\//.test(F)&&(F=x+F);x=/^https/.test(x)?
|
|
404
|
+
'https':'http';B?window.open(F,'undefined'!=typeof y&&'undefined'!=typeof y.target?y.target:'_self'):('undefined'==typeof y.agent&&(y.agent=!1),x=require(''+x),w=function(G){var M='',T=!1;G.on('data',function(ra){M+=ra});G.on('error',function(ra){T='Failed to get mail content';ra&&'undefined'!=typeof ra.stack?T+=ra.stack:'string'==typeof ra&&(T+='\n'+ra)});G.on('end',function(){if(/^\{/.test(M))try{M=JSON.parse(M),'undefined'!=typeof M.error&&(T=JSON.clone(M),M=null)}catch(ra){T=ra}T?z(T):z(!1,M)})},
|
|
405
|
+
z?x.get(F,y,w):x.get(F,y))};!/:/.test(L.url)||/:d+\//.test(L.url)||/:\/\//.test(L.url)||(I=L.url.match(/(:(.*)\/|:(.*)$)/g).map(function(n){return n.replace(/\//g,'')}).join(', '),E='[ RoutingHelper::getRoute(rule[, bundle, method]) ] : route [ %r ] param placeholder not defined: `'+L.url+'` !\n Check your route description to compare requirements against param variables [ '+I+']',E=E.replace(/%r/,u),u=Error(E),console.warn(u),E=u=I=null);return L};Q.getRouteByUrl=function(u,I,v,za,va){2==arguments.length&&
|
|
406
|
+
'undefined'!=typeof arguments[1]&&arguments[1]&&-1<Q.allowedMethods.indexOf(arguments[1].toLowerCase())&&(v=arguments[1],I=void 0);var P=null,L=null,A=null,E=null,n=null,y=null;if(/#/.test(u)&&1<u.length){var z=u.split(/#/);u=z[0];n='#'+z[1];z=null}1==arguments.length&&'undefined'!=typeof arguments[0]&&(/^(https|http)/i.test(u)||/^\//.test(u)||(u='/'+u),P='/'+u.split(/\//g)[1],B&&(E=gina.config.reverseRouting,A=gina.config.routing),'undefined'!=typeof E[P]&&(z=A[E[P]],I=z.bundle,P=z.webroot,y=z.hostname,
|
|
407
|
+
z=null));va='boolean'!=typeof arguments[arguments.length-1]?!1:arguments[arguments.length-1];var F=!1,w=null,x=null,G=w=x=null;z='undefined'!=typeof v?!0:!1;B?(w=window.gina.config,I='undefined'!=typeof I?I:w.bundle,x=w.env,A=A||w.getRouting(I),E=E||w.reverseRouting,isXMLRequest='undefined'!=typeof isXMLRequest?isXMLRequest:!1,y=y||w.hostname,P=P||w.webroot,za={routing:{},method:v,params:{},url:u},I&&(za.bundle=I)):(w=getContext('gina').config,I='undefined'!=typeof I?I:w.bundle,x=w.env,A=w.getRouting(I),
|
|
408
|
+
y=w.envConf[I][x].hostname,P=w.envConf[I][x].server.webroot,za||={routing:{},isXMLRequest:!1,method:'undefined'!=typeof v?v.toLowerCase():'get',params:{},url:u},va&&(za.method=v),isXMLRequest=za.isXMLRequest||!1);x=u.replace(new RegExp('^('+y+'|'+y.replace(/:\d+/,'')+')'),'');'undefined'==typeof za.routing.path&&(za.routing.path=decodeURI(x));v='undefined'!=typeof v?v.toLowerCase():'get';z&&(za.originalMethod=za.method,za.method=v,za.routing.path=decodeURI(x));za.method||(za.method=v);w={};P=new RegExp(v,
|
|
409
|
+
'i');E=null;var M;for(M in A){if('undefined'==typeof A[M].param)break;if(A[M].bundle==I&&(E=A[M].method,/,/.test(E)&&P.test(E)&&(E=za.method),'undefined'==typeof A[M].method||P.test(E))){w={method:E,requirements:A[M].requirements,namespace:A[M].namespace||void 0,url:decodeURI(x),rule:A[M].originalRule||M,param:A[M].param,middleware:JSON.clone(A[M].middleware),bundle:A[M].bundle,isXMLRequest};try{if(G=Q.compareUrls(w,A[M].url,za),G.past){L=JSON.clone(A[M]);L.name=M;F=!0;G={};break}}catch(T){throw Error('Route [ '+
|
|
410
|
+
M+' ] needs your attention.\n'+T.stack);}}}if(F)return/\/$/.test(u)&&'/'!=u&&(u=u.substr(0,u.length-1)),n&&(u+=n),L.url=u,L.toUrl=function(T){var ra=this.webroot,Ea=this.hostname,W=this.url;this.url='undefined'!=typeof T&&1==T?W.replace(ra,'/'):W;return Ea+this.url},L;if(B){n=!1;if('#'==u&&/GET/i.test(v)&&z||/^404:/.test(u))u=location.pathname,n=!0;'undefined'==typeof Q.notFound&&(Q.notFound={});A=null;L='[ RoutingHelper::getRouteByUrl(rule[, bundle, method]) ] : route [ %r ] is called but not found inside your view: `'+
|
|
411
411
|
u+'` !';if((A=(A=gina.hasPopinHandler&&gina.popinIsBinded?gina.popin.getActivePopin().target.innerHTML.match(/404:\[\w+\][a-z 0-9-_@]+/):document.body.innerHTML.match(/404:\[\w+\][a-z 0-9-_@]+/))&&0<A.length?A[0]:null)&&z&&n)return n=A.match(/\[\w+\]/)[0],A=A.replace('404:'+n,n.replace(/\[|\]/g,'')+'::'),L=L.replace(/%r/,A.replace(/404:\s+/,'')),'undefined'==typeof Q.notFound[A]?Q.notFound[A]={count:1,message:L}:z&&'undefined'!=typeof Q.notFound[A]&&++Q.notFound[A].count,!1;if((n=gina.config.reverseRouting[u]||
|
|
412
|
-
null)&&'undefined'!=typeof n&&n.split(/@(.+)$/)[1]==I)return A=n,'undefined'==typeof Q.notFound[A]?(L=L.replace(/%r/,
|
|
412
|
+
null)&&'undefined'!=typeof n&&n.split(/@(.+)$/)[1]==I)return A=n,'undefined'==typeof Q.notFound[A]?(L=L.replace(/%r/,v.toUpperCase()+'::'+n),Q.notFound[A]={count:1,message:L}):z&&'undefined'!=typeof Q.notFound[A]&&++Q.notFound[A].count,!1;A=Q.compareUrls(w,u,za)||null;A.past&&z&&(A=v.toUpperCase()+'::'+A.request.routing.rule,'undefined'==typeof Q.notFound[A]?L=L.replace(/%r/,A):++Q.notFound[A].count);return!1}console.warn(Error('[ RoutingHelper::getRouteByUrl(rule[, bundle, method, request]) ] : route not found for url: `'+
|
|
413
413
|
u+'` !').stack);return!1};return Q}'undefined'!==typeof module&&module.exports?module.exports=Routing():'function'===typeof define&&define.amd&&define('lib/routing',['require','lib/form-validator','lib/merge'],function(){return Routing()});
|
|
414
|
-
function StoragePlugin(B){function Q(L){I=JSON.parse(S.getItem(this.bucket));'undefined'==typeof I[L]&&(I[L]=[],S.setItem(this.bucket,JSON.stringify(I)),I=JSON.parse(S.getItem(this.bucket)));u[L]={_collection:L,_bucket:this.bucket};u[L]=la(u[L],va);return u[L]}function V(L){if('object'!==typeof L)throw Error('filter must be an object');var A=I[this._collection],E=L.count(),n=0,y=null;if(0==E)return null;for(var z in A)for(var F in L){var
|
|
415
|
-
-1<
|
|
416
|
-
var U=U||require('vendor/uuid'),N=N||require('helpers/dateFormat'),ha={bucket:'default'},R={},S=null,u={},I={},
|
|
417
|
-
if('object'!==typeof L)throw Error('filter must be an object');A=I[this._collection];L.count();var E=0,n=[],y;for(y in A)for(var z in L){var F='boolean'!=typeof L[z]?L[z].toLocaleLowerCase():L[z];L[z]&&-1<
|
|
418
|
-
typeof L)throw Error('filter must be an object');var A=JSON.clone(I[this._collection]),E=0,n=[],y;for(y in A)for(var z in L)L[z]&&-1<
|
|
414
|
+
function StoragePlugin(B){function Q(L){I=JSON.parse(S.getItem(this.bucket));'undefined'==typeof I[L]&&(I[L]=[],S.setItem(this.bucket,JSON.stringify(I)),I=JSON.parse(S.getItem(this.bucket)));u[L]={_collection:L,_bucket:this.bucket};u[L]=la(u[L],va);return u[L]}function V(L){if('object'!==typeof L)throw Error('filter must be an object');var A=I[this._collection],E=L.count(),n=0,y=null;if(0==E)return null;for(var z in A)for(var F in L){var w='boolean'!=typeof L[F]?L[F].toLocaleLowerCase():L[F];L[F]&&
|
|
415
|
+
-1<v.indexOf(w)&&'not null'==w&&'undefined'!=typeof A[z][F]&&'object'!==typeof A[z][F]&&A[z][F]===L[F]&&'null'!=A[z][F]&&'undefined'!=A[z][F]?0>y.indexOf(A[z][F])&&(++n,n===E&&(y=A[z],y._index=z,y._collection=this._collection,y._bucket=this._bucket)):'undefined'!=typeof A[z][F]&&'object'!==typeof A[z][F]&&A[z][F]===L[F]&&(++n,n===E&&(y=A[z],y._index=z,y._collection=this._collection,y._bucket=this._bucket,y._filter=L))}y&&(y.save=P);return y}var la=la||require('lib/merge');Q=Q||require('lib/collection');
|
|
416
|
+
var U=U||require('vendor/uuid'),N=N||require('helpers/dateFormat'),ha={bucket:'default'},R={},S=null,u={},I={},v=['not null'],za={bucket:void 0,drop:function(){S.removeItem(ha.bucket);R=null;for(var L in this)delete this[L];return R},Collection:Q},va={insert:function(L){L._id=U.v1();L._createdAt=(new Date).format('isoDateTime');L._updatedAt=(new Date).format('isoDateTime');I[this._collection][I[this._collection].length]=L;S.setItem(this._bucket,JSON.stringify(I))},find:function(L,A){if(!L)return I[this._collection];
|
|
417
|
+
if('object'!==typeof L)throw Error('filter must be an object');A=I[this._collection];L.count();var E=0,n=[],y;for(y in A)for(var z in L){var F='boolean'!=typeof L[z]?L[z].toLocaleLowerCase():L[z];L[z]&&-1<v.indexOf(F)&&'not null'==F&&'undefined'!=typeof A[y][z]&&'object'!==typeof A[y][z]&&'null'!=A[y][z]&&'undefined'!=A[y][z]?0>n.indexOf(A[y][z])&&(n[E]=A[y][z],++E):'undefined'!=typeof A[y][z]&&'object'!==typeof A[y][z]&&A[y][z]===L[z]&&(n[E]=A[y],++E)}return n},findOne:V,update:null,'delete':function(L){if('object'!==
|
|
418
|
+
typeof L)throw Error('filter must be an object');var A=JSON.clone(I[this._collection]),E=0,n=[],y;for(y in A)for(var z in L)L[z]&&-1<v.indexOf(L[z].toLocaleLowerCase())&&'not null'==L[z].toLowerCase()&&'undefined'!=typeof A[y][z]&&'object'!==typeof A[y][z]&&'null'!=A[y][z]&&'undefined'!=A[y][z]?0>n.indexOf(A[y][z])&&(n[E]=A[y][z],delete I[this._collection][y][z],++E):'undefined'!=typeof A[y][z]&&'object'!==typeof A[y][z]&&A[y][z]===L[z]&&(n[E]=A[y],I[this._collection].splice(y,1),++E);return 0<n.length?
|
|
419
419
|
(S.setItem(this._bucket,JSON.stringify(I)),!0):!1},drop:function(L){if('undefined'==typeof I[this._collection])throw Error('Collection `'+L+'` not found');delete u[this._collection];delete I[this._collection];S.setItem(this._bucket,JSON.stringify(I))}},P=function(L){L=L||!1;try{var A=JSON.clone(I),E=this._index,n=this._collection,y=this._bucket,z=this._filter;this._updatedAt=(new Date).format('isoDateTime');A[n][E]=la(A[n][E],this,!0);delete A[n][E]._index;delete A[n][E]._collection;delete A[n][E]._bucket;
|
|
420
|
-
delete A[n][E].save;delete A[n][E]._filter;if(L&&'object'==typeof A[n][E]){var F=function(x,G){for(var M=0,T=x.length;M<T;++M)'object'!=typeof G[M]||'undefined'==typeof x[M]||Array.isArray(x[M])?Array.isArray(x[M])?F(x[M],G[M]):'undefined'==typeof x[M]&&delete G[M]:
|
|
421
|
-
A[n][E]=F(this,A[n][E]):'object'==typeof A[n][E]?A[n][E]=
|
|
422
|
-
typeof L&&'undefined'!=typeof L)throw Error('`options` must be an object');'undefined'==typeof L&&(L={});ha=la(L,ha);S=window.localStorage;L=ha.bucket;if(!S.getItem(L)&&void 0!=L)S.setItem(L,JSON.stringify(I));else if(void 0==L)throw Error('`bucket` name cannot be undefined');R.bucket=L;R=la(R,
|
|
420
|
+
delete A[n][E].save;delete A[n][E]._filter;if(L&&'object'==typeof A[n][E]){var F=function(x,G){for(var M=0,T=x.length;M<T;++M)'object'!=typeof G[M]||'undefined'==typeof x[M]||Array.isArray(x[M])?Array.isArray(x[M])?F(x[M],G[M]):'undefined'==typeof x[M]&&delete G[M]:w(x[M],G[M]);return G},w=function(x,G){for(var M in G)'object'!=typeof G[M]||'undefined'==typeof x[M]||Array.isArray(x[M])?Array.isArray(x[M])?F(x[M],G[M]):'undefined'==typeof x[M]&&delete G[M]:w(x[M],G[M]);return G};Array.isArray(A[n][E])?
|
|
421
|
+
A[n][E]=F(this,A[n][E]):'object'==typeof A[n][E]?A[n][E]=w(this,A[n][E]):'undefined'==typeof this[prop]&&delete A[n][E]}I[n][E]=A[n][E];S.setItem(y,JSON.stringify(I));return V(z)}catch(x){throw x;}};(function(L){if(!window.localStorage||window.localStorage&&'undefined'==!typeof window.localStorage.setItem)throw Error('Make sure your browser supports `window.localStorage` to use Gina Storage. See: `https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API#Browser_compatibility`');if('object'!=
|
|
422
|
+
typeof L&&'undefined'!=typeof L)throw Error('`options` must be an object');'undefined'==typeof L&&(L={});ha=la(L,ha);S=window.localStorage;L=ha.bucket;if(!S.getItem(L)&&void 0!=L)S.setItem(L,JSON.stringify(I));else if(void 0==L)throw Error('`bucket` name cannot be undefined');R.bucket=L;R=la(R,za)})(B);return R}
|
|
423
423
|
if('undefined'!==typeof module&&module.exports){var merge=require('lib/merge');Collection=require('lib/collection');var uuid=require('uuid');module.exports=StoragePlugin}else'function'===typeof define&&define.amd&&define('gina/storage',['helpers/dateFormat','helpers/prototypes'],function(){return StoragePlugin});function insertAfter(B,Q){B.parentNode.insertBefore(Q,B.nextSibling)}
|
|
424
424
|
function getElementsByAttribute(B){for(var Q=[],V=0,la=document.getElementsByTagName('*'),U=0,N=la.length;U<N;++U)null!==la[U].getAttribute(B)&&(Q[V]=la[U],++V);return Q}
|
|
425
425
|
(function(B){var Q=B.prototype,V=Q.parseFromString;try{if((new B).parseFromString('','text/html'))return}catch(la){}Q.parseFromString=function(la,U){if(/^\s*text\/html\s*(?:;|$)/i.test(U)){var N=document.implementation.createHTMLDocument('');-1<la.toLowerCase().indexOf('<!doctype')?N.documentElement.innerHTML=la:N.body.innerHTML=la;return N}return V.apply(this,arguments)}})(DOMParser);define('utils/dom',function(){});
|
|
@@ -430,216 +430,217 @@ function DataHelper(){encodeRFC5987ValueChars=function(V){return encodeURICompon
|
|
|
430
430
|
/^(.*)\[(.*)\]/.test(la[0])?(R=la[0].replace(/\]/g,'').split(/\[/g),V=Q(V,R,0,la[1])):V[la[0]]=la[1])}S=V}}return S};var B=function(V,la){var U=[];la||={};for(let ha in V)if(U[0]=ha,U[1]=V[ha],/^(.*)\[(.*)\]/.test(U[0])){var N=U[0].replace(/\]/g,'').split(/\[/g);la=Q(la,N,0,U[1])}else la[U[0]]=U[1];return la},Q=function(V,la,U,N){for(let ha=0,R=la.length;ha<R;ha++){let S=la[U];if(ha==U){if('undefined'==typeof V[la[U]]||'string'==typeof V[la[U]])Array.isArray(V)?(S=~~la[U],V[S]=/^\d+$/.test(la[U+1])?
|
|
431
431
|
[]:{}):V[la[U]]=/^\d+$/.test(la[U+1])?[]:{};if(U==la.length-1){N='undefined'!=typeof N?N:'';Array.isArray(V[la[U]])?V[la[U]].push(N):V[la[U]]=N;break}else/^\d+$/.test(la[U])&&!Array.isArray(V)&&(V=[]),'undefined'==typeof V[S]&&(V[S]=null),Q(V[S],la,U+1,N)}}return V}}'undefined'!==typeof module&&module.exports?module.exports=DataHelper:'function'===typeof define&&define.amd&&define('utils/data',[],function(){return DataHelper()});
|
|
432
432
|
function ValidatorPlugin(B,Q,V){this.plugin='validator';var la='init ready registered success error progress submit reset change changed keydown keyup focusout focusin validate validated destroy asyncCompleted'.split(' '),U='undefined'!==typeof module&&module.exports?!1:!0,N=null;if(U)require('utils/events'),registerEvents(this.plugin,la),require('utils/dom'),require('utils/effects'),require('utils/data'),N=gina.config.envIsDev;else{if(N=/^true$/i.test(process.env.NODE_ENV_IS_DEV)?!0:!1)delete require.cache[require.resolve('./form-validator')],
|
|
433
|
-
delete require.cache[require.resolve('../../../../../helpers/data')];require('../../../../../helpers/data')}var ha=U?require('vendor/uuid'):require('uuid'),R=U?require('lib/merge'):require('../../../../../lib/merge'),S=U?require('lib/inherits'):require('../../../../../lib/inherits'),u=U?require('lib/form-validator'):require('./form-validator'),I=U?require('lib/routing'):require('../../../../../lib/routing'),
|
|
434
|
-
null,errors:{},initialized:!1,isReady:!1,rules:{},$forms:{},getFormById:null,validateFormById:null,setOptions:null,resetErrorsDisplay:null,resetFields:null},
|
|
435
|
-
withCredentials:!1,headers:{'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8','X-Requested-With':'XMLHttpRequest'}},E=function(l,h,e){e='undefined'!=typeof e?{id:e}:null;var b={},q;for(q in h)b[q]=h[q];if('undefined'!=typeof l&&0<l.count()){try{Ja(l,''),Da(l)}catch(m){throw m;}return ca(e,b,null,
|
|
436
|
-
l=l.replace(/#/,'');if(null!=document.getElementById(l)&&'undefined'==typeof
|
|
437
|
-
typeof q[b])throw Error('['+e.id+'] no rule found with key: `null`');b=q[b]}'string'==typeof e.id&&'undefined'!=typeof q[e.id.replace(/\-/g,'.')]?$target=
|
|
438
|
-
typeof this.$forms&&'undefined'==typeof this.$forms[l]?this.$forms[l]=
|
|
439
|
-
!1,h=null;gina.hasPopinHandler&&gina.popinIsBinded&&(h=gina.popin.getActivePopin());h&&h.isOpen&&(l=!0);return l},F=function(l,h){var e=typeof(0<va.count())?va:
|
|
440
|
-
typeof l)l=l.replace(/#/,'');else{if('object'!=typeof l||Array.isArray(l))throw Error('[ FormValidator::validateFormById(formId[, customRule]) ] `formId` should be a `string`');var b=l.form;l=b.getAttribute('id')||'form.'+ha.v4();b.setAttribute('id',l)}var q=document.getElementsByTagName('form');for(var m={},p=0,O=q.length;p<O;++p)b=q[p].getAttribute('id')||null,'undefined'==typeof m[b]?m[b]=!0:'undefined'==typeof
|
|
441
|
-
b+'` is a duplicate form ID. If not fixed, this could lead to an undesirable behaviour.\n Check inside your popin content'):console.warn('Validator::bindForm($target, customRule): `'+b+'` is a duplicate form ID. If not fixed, this could lead to an undesirable behaviour.'),
|
|
433
|
+
delete require.cache[require.resolve('../../../../../helpers/data')];require('../../../../../helpers/data')}var ha=U?require('vendor/uuid'):require('uuid'),R=U?require('lib/merge'):require('../../../../../lib/merge'),S=U?require('lib/inherits'):require('../../../../../lib/inherits'),u=U?require('lib/form-validator'):require('./form-validator'),I=U?require('lib/routing'):require('../../../../../lib/routing'),v={id:'validator-'+ha.v4(),plugin:this.plugin,on:U?on:null,eventData:{},target:U?document:
|
|
434
|
+
null,errors:{},initialized:!1,isReady:!1,rules:{},$forms:{},getFormById:null,validateFormById:null,setOptions:null,resetErrorsDisplay:null,resetFields:null},za={id:null,plugin:this.plugin,on:U?on:null,eventData:{},target:U?document:null,cachedErrors:{},lastFocused:U?[]:null,binded:!1,unbinded:!1,withUserBindings:!1,rules:{},setOptions:null,send:null,isValidating:null,isSubmitting:null,submit:null,destroy:null,resetErrorsDisplay:null,resetFields:null},va={},P={},L=null,A={url:'',method:'GET',isSynchrone:!1,
|
|
435
|
+
withCredentials:!1,headers:{'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8','X-Requested-With':'XMLHttpRequest'}},E=function(l,h,e){e='undefined'!=typeof e?{id:e}:null;var b={},q;for(q in h)b[q]=h[q];if('undefined'!=typeof l&&0<l.count()){try{Ja(l,''),Da(l)}catch(m){throw m;}return ca(e,b,null,v.rules)}return new u(b)},n=function(l){A=l=R(l,A)},y=function(l){var h=null;if(!v.$forms)throw Error('`$forms` collection not found');if('undefined'==typeof l)throw Error('[ FormValidator::getFormById(formId) ] `formId` is missing');
|
|
436
|
+
l=l.replace(/#/,'');if(null!=document.getElementById(l)&&'undefined'==typeof v.$forms[l]){var e=document.getElementById(l),b,q=typeof(0<va.count())?va:v.rules;e.getAttribute?(id=e.getAttribute('id')||'form.'+ha.v4(),id!==e.getAttribute('id')&&e.setAttribute('id',id)):(id='form.'+ha.v4(),e.setAttribute('id',id));e.id=za.id=id;if('undefined'!=typeof e.id&&'null'!=e.id&&''!=e.id){za.target=e;v.$forms[e.id]=R({},za);if(b=e.getAttribute('data-gina-form-rule')){b=b.replace(/\-|\//g,'.');if('undefined'==
|
|
437
|
+
typeof q[b])throw Error('['+e.id+'] no rule found with key: `null`');b=q[b]}'string'==typeof e.id&&'undefined'!=typeof q[e.id.replace(/\-/g,'.')]?$target=v.$forms[e.id].target:'object'==typeof e.id?(delete v.$forms[e.id],q=e.attributes.getNamedItem('id').nodeValue||'form.'+ha.v4(),e.setAttribute('id',q),e.id=q,za.target=e,v.$forms[q]=R({},za),$target=v.$forms[q].target):$target=v.$forms[e.id].target;b?yb($target,b):yb($target)}}'undefined'!=typeof v.$forms[l]&&(v.$forms[l].withUserBindings=!0,h='undefined'!=
|
|
438
|
+
typeof this.$forms&&'undefined'==typeof this.$forms[l]?this.$forms[l]=v.$forms[l]:v.$forms[l]);if(!h)throw Error('Validator::getFormById(...) exception: could not retrieve form `'+l+'`');h.binded||(yb(h.target),h=v.$forms[l]);N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),e={id:l,rules:v.$forms[l].rules},'undefined'!=typeof v.$forms[l].errors&&(e.errors=v.$forms[l].errors),window.ginaToolbar.update('forms',e));return h},z=function(){var l=
|
|
439
|
+
!1,h=null;gina.hasPopinHandler&&gina.popinIsBinded&&(h=gina.popin.getActivePopin());h&&h.isOpen&&(l=!0);return l},F=function(l,h){var e=typeof(0<va.count())?va:v.rules;if(!v.$forms)throw Error('`$forms` collection not found');if('undefined'!=typeof l&&'undefined'!=typeof v.$forms[l])return v.$forms[l];if('undefined'==typeof l)if('undefined'!=typeof this.id&&''!=this.id&&null!=this.id)l=this.id;else throw Error('[ FormValidator::validateFormById(formId, customRule) ] `formId` is missing');if('string'==
|
|
440
|
+
typeof l)l=l.replace(/#/,'');else{if('object'!=typeof l||Array.isArray(l))throw Error('[ FormValidator::validateFormById(formId[, customRule]) ] `formId` should be a `string`');var b=l.form;l=b.getAttribute('id')||'form.'+ha.v4();b.setAttribute('id',l)}var q=document.getElementsByTagName('form');for(var m={},p=0,O=q.length;p<O;++p)b=q[p].getAttribute('id')||null,'undefined'==typeof m[b]?m[b]=!0:'undefined'==typeof v.$forms[b]||v.$forms[b].warned||(gina.popinIsBinded?console.warn('Popin/Validator::bindForm($target, customRule): `'+
|
|
441
|
+
b+'` is a duplicate form ID. If not fixed, this could lead to an undesirable behaviour.\n Check inside your popin content'):console.warn('Validator::bindForm($target, customRule): `'+b+'` is a duplicate form ID. If not fixed, this could lead to an undesirable behaviour.'),v.$forms[b].warned=!0);if('undefined'!=typeof this.$forms&&'undefined'!=typeof v.$forms[l])q=this.$forms[l]=v.$forms[l];else{b=document.getElementById(l);za.id=l;za.target=b;q=this.$forms[l]=v.$forms[l]=R({},za);if('undefined'==
|
|
442
442
|
typeof h)if(m=l.replace(/\-/g,'.'),'undefined'!=typeof e)q.rule=Ia(m);else{if('undefined'!=typeof q.target&&null!==q.target&&q.target.getAttribute('data-gina-form-rule'))if(m=q.target.getAttribute('data-gina-form-rule').replace(/\-|\//g,'.'),'undefined'!=typeof e)q.rule=Ia(m);else throw Error('[ FormValidator::validateFormById(formId) ] using `data-gina-form-rule` on form `'+q.target+'`: no matching rule found');}else if(m=h.replace(/\-|\//g,'.'),'undefined'!=typeof e)q.rule=Ia(m);else throw Error('[ FormValidator::validateFormById(formId, customRule) ] `'+
|
|
443
|
-
h+'` is not a valid rule');b&&'undefined'!=typeof this.isPopinContext&&/true/i.test(this.isPopinContext)&&(b.isPopinContext=this.isPopinContext);b&&!q.binded&&yb(b,m)}if(!q)throw Error('[ FormValidator::validateFormById(formId, customRule) ] `'+l+'` not found');return q||null},
|
|
444
|
-
(e.className=e.className.replace(/form\-item\-error/,'form-item-warning'),l=!0);if(!/^true$/i.test(
|
|
445
|
-
else if(/^(true)$/i.test(l.dataset.ginaFormLiveCheckEnabled)&&'undefined'!=typeof b){var p='string'!=typeof l.id?l.getAttribute('id'):l.id;'undefined'==typeof x[p]&&(x[p]={});if(h&&0<h.count()){if(x[p][b]={},x[p][b]=R(h[b],x[p][b]),0==x[p][b].count()&&delete x[p][b],h=x[p],!
|
|
446
|
-
'undefined'!=typeof window.gina.validator.$forms[p].errors[b]&&delete window.gina.validator.$forms[p].errors[b]),('undefined'!=typeof
|
|
447
|
-
l[D];if('undefined'==typeof b||b==
|
|
448
|
-
O=document.createElement('div');O.className=m?'form-item-error-message hidden':'form-item-error-message';for(var ka in h[Ba])'stack'!=ka&&(ba=document.createElement('p'),ba.appendChild(document.createTextNode(h[Ba][ka])),O.appendChild(ba)),N&&(q||={},q[Ba]||(q[Ba]={}),q[Ba][ka]=h[Ba][ka]);'hidden'!=oa.type&&insertAfter(oa,O)}else if(h&&'undefined'==typeof h[Ba]&&/(form\-item\-error|form\-item\-warning)/.test(ba.className)||
|
|
449
|
-
ba.getElementsByTagName('div');oa=0;for(H=Ba.length;oa<H;++oa)if(/form\-item\-error\-message/.test(Ba[oa].className)){Ba[oa].parentElement.removeChild(Ba[oa]);break}ba.className=ba.className.replace(/(\s+form\-item\-error|form\-item\-error|\s+form\-item\-warning|form\-item\-warning)/,'')}else if(h&&'undefined'!=typeof h[Ba]&&H){
|
|
450
|
-
O=document.createElement('div');O.setAttribute('class','form-item-error-message');for(ka in h[Ba])ba=document.createElement('p'),ba.appendChild(document.createTextNode(h[Ba][ka])),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
typeof
|
|
454
|
-
|
|
455
|
-
typeof
|
|
456
|
-
typeof q.id&&(h.headers['X-Gina-Form-Id']=q.id,'undefined'!=typeof gina.forms.rules&&0<q.rules.count()&&'undefined'!=typeof q.rules[q.id]&&(h.headers['X-Gina-Form-Rule']=q.id+'@'+gina.config.bundle));'undefined'!=typeof q.target.dataset.ginaFormRule&&
|
|
457
|
-
typeof $activePopin.name&&(h.headers['X-Gina-Popin-Name']=$activePopin.name)));(D=e.getAttribute('data-gina-form-event-on-submit-success')||e.getAttribute('data-gina-form-event-on-submit-error')?!0:!1)&&Aa(q);var aa=e.getAttribute('action')||h.url,
|
|
458
|
-
h.url);else if('undefined'!=typeof XDomainRequest)L=new XDomainRequest,L.open(h.method,h.url);else{L=null;m='CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ';triggerEvent(gina,e,'error.'+b,m);
|
|
459
|
-
L.setRequestHeader(ba,h.headers[ba]);if(L){L.onreadystatechange=function(Y){q.isSubmitting=!1;q.isSending=!1;setTimeout(function(){q.sent=!1},1E3);Y=/Google Inc/i.test(navigator.vendor)?50:0;2==L.readyState&&(O=/^attachment;/.test(L.getResponseHeader('Content-Disposition'))
|
|
460
|
-
Ta)Ta='application/octet-stream';
|
|
461
|
-
'undefined'==typeof m.status&&(m.status=L.status));if(/\/html/.test(Ta)&&(m={contentType:Ta,content:L.responseText},'undefined'==typeof m.status&&(m.status=L.status),'undefined'!=typeof gina.popin&&gina.hasPopinHandler&&(
|
|
462
|
-
XHRView=JSON.parse(decodeURIComponent(XHRView.value)),gina&&N&&typeof window.ginaToolbar&&'undefined'!=typeof p&&window.ginaToolbar.update('data-xhr',p),gina&&N&&typeof window.ginaToolbar&&'undefined'!=typeof XHRView&&window.ginaToolbar.update('view-xhr',XHRView)}catch(X){throw X;}
|
|
463
|
-
window.ginaToolbar.update('data-xhr',p)}catch(X){throw X;}/^gina\-upload/i.test(b)&&W(gina,e,'success',b,m);var
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
(console.debug('Validator::Popin now redirecting [1-d]'),
|
|
467
|
-
}/^gina\-upload/i.test(b)&&W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)}if('undefined'!=typeof m&&'undefined'!=typeof m.location)return window.location.hash='',m.location=/^http/.test(m.location)
|
|
468
|
-
'$1').replace(/^:/,'')),setTimeout(()=>{window.location.href=m.location},Y)}else if(0!=L.status)if(m={status:L.status},/blob/.test(L.responseType)){
|
|
469
|
-
R(m,ja)}m.message||delete m.message;p=q.eventData.error=m;if(gina&&N&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&p)try{window.ginaToolbar.update('data-xhr',p)}catch(ja){throw ja;}/^gina\-upload/i.test(b)&&
|
|
470
|
-
L.responseText;if('undefined'!=typeof m&&'undefined'!=typeof m.error&&m.fields&&'object'==typeof m.fields){Wa='undefined'!=typeof m.message?m.message:null;Y={};for(
|
|
471
|
-
W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)}}};L.onprogress=function(Y){var
|
|
472
|
-
m)};l||(l=event.detail.data);if(l){h=!1;if('object'==typeof l){ba=[];
|
|
473
|
-
e,'error.'+b,Y),D&&triggerEvent(gina,e,'error.'+b+'.hform',Y);else return
|
|
474
|
-
e,'error.'+b+'.hform',Y)}}h||('undefined'!=typeof aa&&null!=aa&&''!=aa&&L.setRequestHeader('Content-Type',aa),L.send(l))}else'undefined'!=typeof aa&&null!=aa&&''!=aa&&L.setRequestHeader('Content-Type',aa),L.send();q.sent=!0;N&&U&&'undefined'!=
|
|
475
|
-
h=document.getElementById(l.uploadTriggerId);b=null;var m=q.files||[],p=null;l.hasPreviewContainer&&(b=document.getElementById(l.previewContainer.id))&&(b.innerHTML='');l.errorField&&(p=document.getElementById(l.errorField));
|
|
476
|
-
p
|
|
477
|
-
''!=m[e].location){D=document.createElement('IMG');D.src=m[e].tmpUri;D.style.display='none';D.setAttribute('data-upload-original-filename',m[e].originalFilename);D.setAttribute('data-upload-reset-link-id',p.id);
|
|
478
|
-
fadeIn(D)}D=l.uploadFields[e];for(var ba in D)if('name'==ba&&''!=D[ba].value||!m[e][ba]||'preview'==ba&&'undefined'==typeof m[e][ba]||/(height|width)/i.test(ba)&&!/^image/.test(m[e].mime))/(preview|height|width)/i.test(ba)&&
|
|
479
|
-
|
|
480
|
-
(aa=document.createElement('LI'),aa.className='item',
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
'undefined'
|
|
484
|
-
q.send(JSON.stringify({files:D}));if(/none/i.test(window.getComputedStyle(l).display)){if(/none/i.test(l.parentElement.style.display)){l.parentElement.style.display='block';return}l.style.display=
|
|
485
|
-
new Uint8Array(O);break;case 16:aa=new Uint16Array(O);break;case 32:aa=new Uint32Array(O);break;default:aa=new Uint8Array(O)}var ba=aa.length,oa=Math.pow(2,8)+
|
|
486
|
-
'"; filename="'+l[this.index].file.name+'"\r\nContent-Type: '+l[this.index].file.type+'\r\nContent-Length: '+l[this.index].bin.length+'\r\n\r\n';e+=l[this.index].bin+'\r\n'
|
|
487
|
-
null;if(null!=h)if(/\((.*)\)/.test(h))eval(h);else l.on('error.hform',window[h])},ma=function(l){var h=null,e=l;if(!
|
|
488
|
-
l=e.form;e=l.getAttribute('id')||'form.'+ha.v4();l.setAttribute('id',e)}'undefined'!=typeof
|
|
489
|
-
l:
|
|
490
|
-
[],b=[];for(let O=0,D=e.length;O<D;O++)0>b.indexOf(e[O])&&b.push(e[O]);e=b;b=h.match(/("_merging(.*))(\s+:|:)(.*)(",|")/g);
|
|
491
|
-
p._comment+'\n':'',p._comment+='Imported from `'+q+'`',p=JSON.stringify(p),h=h.replace(new RegExp(e[O],'g'),p),
|
|
492
|
-
q),
|
|
493
|
-
typeof l&&l.count())try{Ja(l,''),l=Da(l),gina.forms.rules='undefined'!=typeof gina.forms.rules&&gina.forms.rules?R(gina.forms.rules,l,!0):l,
|
|
494
|
-
q;++b){if(e[b].getAttribute){var m=e[b].getAttribute('id')||'form.'+ha.v4();m!==e[b].getAttribute('id')&&e[b].setAttribute('id',m)}else m='form.'+ha.v4(),e[b].setAttribute('id',
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
m(
|
|
499
|
-
'
|
|
500
|
-
'
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
'
|
|
506
|
-
|
|
507
|
-
'
|
|
508
|
-
|
|
509
|
-
if(-1<e){var b=l[e+1];h&&(b=l[e-1]);(b||l[0]).focus()}}},pb=function(l,h){l.setAttribute('readonly',
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
(
|
|
515
|
-
|
|
516
|
-
b.
|
|
443
|
+
h+'` is not a valid rule');b&&'undefined'!=typeof this.isPopinContext&&/true/i.test(this.isPopinContext)&&(b.isPopinContext=this.isPopinContext);b&&!q.binded&&yb(b,m)}if(!q)throw Error('[ FormValidator::validateFormById(formId, customRule) ] `'+l+'` not found');return q||null},w=function(l){var h=l.form.getAttribute('id'),e=l.parentNode;l=!1;var b=e.getElementsByTagName('div');/form\-item\-warning/.test(e.className)?e.className=e.className.replace(/form\-item\-warning/,'form-item-error'):/form\-item\-error/.test(e.className)&&
|
|
444
|
+
(e.className=e.className.replace(/form\-item\-error/,'form-item-warning'),l=!0);if(!/^true$/i.test(v.$forms[h].isValidating)||l)for(h=0,e=b.length;h<e;++h)if(/form\-item\-error\-message/.test(b[h].className)){b[h].className=l?b[h].className+' hidden':b[h].className.replace(/(\s+hidden|hidden)/,'');break}},x={},G=function(l,h,e,b){if(N)var q=null;var m=!1;if('undefined'!=typeof l.dataset.ginaFormIsResetting&&/^(true)$/i.test(l.dataset.ginaFormIsResetting))h={},x={},l.dataset.ginaFormIsResetting=!1;
|
|
445
|
+
else if(/^(true)$/i.test(l.dataset.ginaFormLiveCheckEnabled)&&'undefined'!=typeof b){var p='string'!=typeof l.id?l.getAttribute('id'):l.id;'undefined'==typeof x[p]&&(x[p]={});if(h&&0<h.count()){if(x[p][b]={},x[p][b]=R(h[b],x[p][b]),0==x[p][b].count()&&delete x[p][b],h=x[p],!v.$forms[p].sent||v.$forms[p].isValidating)if(m=!0,p=v.$forms[p].lastFocused,0<p.length&&'undefined'!=typeof p[1]&&p[1].name==b||0<p.length&&!p[1]&&document.activeElement.getAttribute('name')!=p[0].name||document.activeElement.getAttribute('name')!=
|
|
446
|
+
b)m=!1}else'undefined'!=typeof x[p][b]&&(delete x[p][b],'undefined'!=typeof window.gina.validator.$forms[p].errors&&'undefined'!=typeof window.gina.validator.$forms[p].errors[b]&&delete window.gina.validator.$forms[p].errors[b]),('undefined'!=typeof v.$forms&&'undefined'!=typeof v.$forms[p]&&'undefined'!=typeof v.$forms[p].errors&&0==v.$forms[p].errors.count()||'undefined'!=typeof v.$forms&&'undefined'!=typeof v.$forms[p]&&!v.$forms[p].errors)&&La(l,!0),'undefined'!=typeof x[p]&&0==x[p].count()?delete x[p]:
|
|
447
|
+
h=x[p]}var O=null;p=l.getAttribute('id');e='undefined'!=typeof e?e:{};for(var D=0,aa=l.length;D<aa;++D){var xa=l[D];if('undefined'==typeof b||b==xa.name){if(/form\-item\-wrapper$/.test(xa.parentNode.className)){var ba=xa.parentNode.parentNode;var oa=xa.parentNode}else ba=xa.parentNode,oa=xa;var Ba=xa.getAttribute('name');var H=xa.getAttribute('data-gina-form-errors');if(Ba){if(h&&'undefined'!=typeof h[Ba]&&!/(form\-item\-error|form\-item\-warning)/.test(ba.className)){ba.className=m?ba.className+
|
|
448
|
+
(''==ba.className?'form-item-warning':' form-item-warning'):ba.className+(''==ba.className?'form-item-error':' form-item-error');O=document.createElement('div');O.className=m?'form-item-error-message hidden':'form-item-error-message';for(var ka in h[Ba])'stack'!=ka&&(ba=document.createElement('p'),ba.appendChild(document.createTextNode(h[Ba][ka])),O.appendChild(ba)),N&&(q||={},q[Ba]||(q[Ba]={}),q[Ba][ka]=h[Ba][ka]);'hidden'!=oa.type&&insertAfter(oa,O)}else if(h&&'undefined'==typeof h[Ba]&&/(form\-item\-error|form\-item\-warning)/.test(ba.className)||
|
|
449
|
+
h&&'undefined'!=typeof h[Ba]&&0==h[Ba].count()&&/(form\-item\-error|form\-item\-warning)/.test(ba.className)){Ba=ba.getElementsByTagName('div');oa=0;for(H=Ba.length;oa<H;++oa)if(/form\-item\-error\-message/.test(Ba[oa].className)){Ba[oa].parentElement.removeChild(Ba[oa]);break}ba.className=ba.className.replace(/(\s+form\-item\-error|form\-item\-error|\s+form\-item\-warning|form\-item\-warning)/,'')}else if(h&&'undefined'!=typeof h[Ba]&&H){H=ba.getElementsByTagName('div');for(var wa=0,Y=H.length;wa<
|
|
450
|
+
Y;++wa){let pa=H[wa].className.match('form-item-error-message');if(pa&&'undefined'!=typeof pa.length&&0<pa.length){H[wa].parentElement.removeChild(H[wa]);O=document.createElement('div');O.setAttribute('class','form-item-error-message');!m&&/(\s+form\-item\-warning|form\-item\-warning)/.test(ba.className)&&(ba.className=ba.className.replace(/(\s+form\-item\-warning|form\-item\-warning)/,' form-item-error'));for(ka in h[Ba])ba=document.createElement('p'),ba.appendChild(document.createTextNode(h[Ba][ka])),
|
|
451
|
+
O.appendChild(ba),N&&(q||={},q[Ba]||(q[Ba]={}),q[Ba][ka]=h[Ba][ka]);break}}O&&'hidden'!=oa.type&&insertAfter(oa,O)}if('undefined'!=typeof b&&b===xa.name)break}}}q?(triggerEvent(gina,l,'error.'+p,h),N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),l={id:p,errors:q},window.ginaToolbar.update('forms',l))):N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),l={id:p,errors:{}},U&&window.ginaToolbar.update('forms',
|
|
452
|
+
l));if(gina&&U&&N&&v.$forms[p].isSubmitting&&/^true$/i.test(v.$forms[p].isSubmitting)&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&e)try{window.ginaToolbar.update('data-xhr',e)}catch(pa){throw pa;}},M=function(l){var h=null;'undefined'==typeof l&&'undefined'!=typeof this.id&&(l=this.id);/^string$/i.test(typeof l)?(h=l.replace(/#/,''),h=document.getElementById(h)):l instanceof HTMLFormElement?h=l:/^object$/i.test(typeof l)&&(h=l.target);if(!h)throw Error('[ FormValidator::resetErrorsDisplay([ formId | <form> ]) ] `'+
|
|
453
|
+
l+'` not found');h.dataset.ginaFormIsResetting=!0;G(h,{});return h},T=function(l){if('undefined'==typeof l){var h='undefined'!=typeof this.target?this.target.getAttribute('id'):this.getAttribute('id');l=v.$forms[h]}else if('string'==typeof l){h=l.replace(/#/,'');if('undefined'==typeof v.$forms[h])throw Error('[ FormValidator::resetErrorsDisplay([formId]) ] `'+l+'` not found');l=v.$forms[h]}if(l.fieldsSet){var e;for(e in l.fieldsSet){h=document.getElementById(e);var b=h.tagName.toLowerCase();var q=
|
|
454
|
+
h.tagName;/textarea/i.test(q)?(q=l.fieldsSet[e].defaultValue,h.value=q,triggerEvent(gina,h,'change')):'input'==b?(q=l.fieldsSet[e].defaultValue,/$(on|true|false)$/i.test(q)&&(q=/$(on|true)$/i.test(q)?!0:!1),/^(checkbox|radio)$/i.test(h.type)?h.checked=l.fieldsSet[e].defaultChecked:/^(checkbox|radio)$/i.test(h.type)||(h.value=q),triggerEvent(gina,h,'change')):'select'==b&&(q=l.fieldsSet[e].selectedIndex||0,h.selectedIndex=q,h.dataset.value=h.options[h.selectedIndex].value,triggerEvent(gina,h,'change'))}}return l},
|
|
455
|
+
ra=function(){var l=null,h=null;'undefined'!=typeof this.getAttribute?(l=this.getAttribute('id'),h=this):'undefined'!=typeof this.target&&null!=this.target&&'undefined'!=typeof this.target.getAttribute&&(l=this.target.getAttribute('id'),h=this.target);if('undefined'==typeof v.$forms[l])throw Error('[ FormValidator::submit() ] not `$form` binded. Use `FormValidator::getFormById(id)` or `FormValidator::validateFormById(id)` first ');triggerEvent(gina,h,'submit');return this},Ea=function(l,h){var e=
|
|
456
|
+
this.target,b=e.getAttribute('id'),q=v.$forms[b]||this,m=null,p=null,O=null,D=null;if(!('undefined'!=typeof q.isSending&&/^true$/i.test(q.isSending)||'undefined'!=typeof q.sent&&/^true$/i.test(q.sent))){v.$forms[b].isSending=!0;h='undefined'!=typeof h?R(h,A):A;'undefined'!=typeof q.id&&(h.headers['X-Gina-Form-Id']=q.id,'undefined'!=typeof gina.forms.rules&&0<q.rules.count()&&'undefined'!=typeof q.rules[q.id]&&(h.headers['X-Gina-Form-Rule']=q.id+'@'+gina.config.bundle));'undefined'!=typeof q.target.dataset.ginaFormRule&&
|
|
457
|
+
(h.headers['X-Gina-Form-Rule']=q.target.dataset.ginaFormRule+'@'+gina.config.bundle);z()&&($activePopin=gina.popin.getActivePopin(),$activePopin.isOpen&&('undefined'!=typeof $activePopin.id&&(h.headers['X-Gina-Popin-Id']=$activePopin.id),'undefined'!=typeof $activePopin.name&&(h.headers['X-Gina-Popin-Name']=$activePopin.name)));(D=e.getAttribute('data-gina-form-event-on-submit-success')||e.getAttribute('data-gina-form-event-on-submit-error')?!0:!1)&&Aa(q);var aa=e.getAttribute('action')||h.url,xa=
|
|
458
|
+
e.getAttribute('method')||h.method;xa=xa.toUpperCase();h.method=xa;h.url=aa;L||=setupXhr(h);aa=e.getAttribute('enctype')||h.headers['Content-Type'];if(h.withCredentials){if('withCredentials'in L)h.isSynchrone?L.open(h.method,h.url,h.isSynchrone):L.open(h.method,h.url);else if('undefined'!=typeof XDomainRequest)L=new XDomainRequest,L.open(h.method,h.url);else{L=null;m='CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ';triggerEvent(gina,e,'error.'+b,m);
|
|
459
|
+
return}L.responseType='undefined'!=typeof h.responseType?h.responseType:'';L.withCredentials=!0}else h.isSynchrone?L.open(h.method,h.url,h.isSynchrone):L.open(h.method,h.url);for(var ba in h.headers)'Content-Type'==ba&&'undefined'!=typeof aa&&null!=aa&&''!=aa||L.setRequestHeader(ba,h.headers[ba]);if(L){L.onreadystatechange=function(Y){q.isSubmitting=!1;q.isSending=!1;setTimeout(function(){q.sent=!1},1E3);Y=/Google Inc/i.test(navigator.vendor)?50:0;2==L.readyState&&(O=/^attachment;/.test(L.getResponseHeader('Content-Disposition'))?
|
|
460
|
+
!0:!1,!L.responseType&&O&&(L.responseType='blob'));if(4==L.readyState){var pa=null,Ka=null,Ta=L.getResponseHeader('Content-Type');if(/^2/.test(L.status)){try{if(/blob/.test(L.responseType)||O){if('undefined'==typeof Ta||null==Ta)Ta='application/octet-stream';Ka=new Blob([this.response],{type:Ta});var $a=document.createElement('a');$a.style='display: none';document.body.appendChild($a);var Ab=window.URL.createObjectURL(Ka);$a.href=Ab;var Bb=L.getResponseHeader('Content-Disposition');$a.download=Bb.match('=(.*)')[0].substr(1);
|
|
461
|
+
$a.click();window.URL.revokeObjectURL(Ab);m={status:L.status,statusText:L.statusText,responseType:Ka.type,type:Ka.type,size:Ka.size}}else m=L.responseText;/\/json/.test(Ta)&&(m=JSON.parse(L.responseText),'undefined'==typeof m.status&&(m.status=L.status));if(/\/html/.test(Ta)&&(m={contentType:Ta,content:L.responseText},'undefined'==typeof m.status&&(m.status=L.status),'undefined'!=typeof gina.popin&&gina.hasPopinHandler&&(pa=gina.popin.getActivePopin()))){p={};try{p=(new DOMParser).parseFromString(m.content,
|
|
462
|
+
'text/html').getElementById('gina-without-layout-xhr-data'),p=JSON.parse(decodeURIComponent(p.value)),XHRView=(new DOMParser).parseFromString(m.content,'text/html').getElementById('gina-without-layout-xhr-view'),XHRView=JSON.parse(decodeURIComponent(XHRView.value)),gina&&N&&typeof window.ginaToolbar&&'undefined'!=typeof p&&window.ginaToolbar.update('data-xhr',p),gina&&N&&typeof window.ginaToolbar&&'undefined'!=typeof XHRView&&window.ginaToolbar.update('view-xhr',XHRView)}catch(X){throw X;}pa.loadContent(m.content);
|
|
463
|
+
m=p;triggerEvent(gina,e,'success.'+b,m);return}p=q.eventData.success=m;if(gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&p)try{N&&'undefined'!=typeof p&&!/\/html|\/json/.test(Ta)&&window.ginaToolbar.update('data-xhr',p)}catch(X){throw X;}/^gina\-upload/i.test(b)&&W(gina,e,'success',b,m);var gb=!1;'undefined'!=typeof m.isXhrRedirect&&/^true$/i.test(m.isXhrRedirect)&&(gb=!0);if('undefined'!=typeof gina.popin&&gina.hasPopinHandler&&'undefined'!=typeof m.popin||'undefined'!=typeof gina.popin&&
|
|
464
|
+
gina.hasPopinHandler&&'undefined'!=typeof m.location&&gb){pa=gina.popin.getActivePopin();if(!pa&&'undefined'!=typeof m.popin){if('undefined'!=typeof m.popin&&'undefined'==typeof m.popin.name)throw Error('To get a `$popin` instance, you need at list a `popin.name`.');pa=gina.popin.getPopinByName(m.popin.name);if(!pa)throw Error('Popin with name: `'+m.popin.name+'` not found.');}if('undefined'!=typeof m.popin&&'undefined'!=typeof m.popin.close){pa.isRedirecting=!1;pa.close();var Hb=m.popin.reload?m.popin.reload:
|
|
465
|
+
!1;m.popin.location||m.popin.url||(delete m.popin,Hb&&(m.popin={reload:Hb}))}if('undefined'!=typeof m.popin&&'undefined'!=typeof m.popin.location||'undefined'!=typeof m.popin&&'undefined'!=typeof m.popin.url||'undefined'!=typeof m.location&&gb){gb=null;pa&&(gb=pa.name,pa.isRedirecting=!0);'undefined'!=typeof m.popin&&'undefined'!=typeof m.popin.target&&(m.popin.target='_'+m.popin.target);var Wa=m.location||m.popin.location||m.popin.url;if('undefined'!=typeof m.popin&&'undefined'!=typeof m.popin.name&&
|
|
466
|
+
gb!=m.popin.name){pa&&pa.isOpen&&pa.close();gb=m.popin.name;pa=gina.popin.getPopinByName(gb);if(!pa)throw Error('Popin with name `'+gb+'` not found !');console.debug('Validator::Popin now redirecting [1-c]');pa.load(pa.name,Wa,pa.options)}else pa&&(console.debug('Validator::Popin now redirecting [1-d]'),pa&&pa.isOpen&&pa.close(),pa.load(pa.name,Wa,pa.options));if(pa&&!pa.isOpen)return setTimeout(function(X){X.isOpen||X.open()},50,pa)}}triggerEvent(gina,e,'success.'+b,m);D&&triggerEvent(gina,e,'success.'+
|
|
467
|
+
b+'.hform',m)}catch(X){m={status:422,error:X.message,stack:X.stack};p=q.eventData.error=m;if(gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&p)try{N&&'undefined'!=typeof p&&window.ginaToolbar.update('data-xhr',p)}catch(ja){throw ja;}/^gina\-upload/i.test(b)&&W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)}if('undefined'!=typeof m&&'undefined'!=typeof m.location)return window.location.hash='',m.location=/^http/.test(m.location)||
|
|
468
|
+
/^\//.test(m.location)?m.location:location.protocol+'//'+m.location,m.location.replace(/^http(.*):\d+/,'$1').replace(/^:\/\//,'').split(/\//g)[0]==gina.config.hostname&&gina.config.hostname==window.location.host&&(m.location=location.protocol+m.location.replace(/^http(.*):\d+/,'$1').replace(/^:/,'')),setTimeout(()=>{window.location.href=m.location},Y)}else if(0!=L.status)if(m={status:L.status},/blob/.test(L.responseType)){Ka=new Blob([this.response],{type:'text/plain'});var cb=new FileReader,fa='';
|
|
469
|
+
cb.addEventListener('loadend',X=>{/string/i.test(typeof X.srcElement.result)?fa+=X.srcElement.result:'object'==typeof X.srcElement.result?m=R(m,X.srcElement.result):m.message+=X.srcElement.result;if(/2/.test(cb.readyState)){if(/^(\{|\[)/.test(fa))try{m=R(m,JSON.parse(fa))}catch(ja){m=R(m,ja)}m.message||delete m.message;p=q.eventData.error=m;if(gina&&N&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&p)try{window.ginaToolbar.update('data-xhr',p)}catch(ja){throw ja;}/^gina\-upload/i.test(b)&&
|
|
470
|
+
W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)}});cb.readAsText(Ka)}else{if(/^(\{|\[)/.test(L.responseText))try{m=R(JSON.parse(L.responseText),m)}catch(X){m=R(X,m)}else'object'==typeof L.responseText?m=R(L.responseText,m):m.message=L.responseText;if('undefined'!=typeof m&&'undefined'!=typeof m.error&&m.fields&&'object'==typeof m.fields){Wa='undefined'!=typeof m.message?m.message:null;Y={};for(gb in m.fields)pa={},pa[gb]={},pa[gb].isApiError=m.fields[gb],
|
|
471
|
+
Wa&&!pa[gb].isApiError&&(pa[gb].isApiError=m.error),Y[gb]=pa[gb],G(q.target,pa,l,gb);m.fields=Y}p=q.eventData.error=m;if(gina&&N&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&p)try{window.ginaToolbar.update('data-xhr',p)}catch(X){throw X;}/^gina\-upload/i.test(b)&&W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)}}};L.onprogress=function(Y){var pa='0';Y.lengthComputable&&(pa=Y.loaded/Y.total,pa=parseInt(100*pa));Y={status:100,progress:pa};
|
|
472
|
+
q.eventData.onprogress=Y;triggerEvent(gina,e,'progress.'+b,Y)};L.ontimeout=function(Y){m={status:408,error:'Request Timeout'};q.eventData.ontimeout=m;/^gina\-upload/i.test(b)&&W(gina,e,'error',b,m);triggerEvent(gina,e,'error.'+b,m);D&&triggerEvent(gina,e,'error.'+b+'.hform',m)};l||(l=event.detail.data);if(l){h=!1;if('object'==typeof l){ba=[];xa=0;var oa={};try{if(l instanceof FormData){var Ba=event.currentTarget.getAttribute('data-gina-form-upload-group')||'untagged',H,ka;for([H,ka]of l.entries())ka instanceof
|
|
473
|
+
File?(h||=!0,ba[xa]={key:H,group:Ba,file:ka,bin:''},++xa):oa[H]=ka}else l=JSON.stringify(l);if(h&&0<ba.length){var wa='--ginaWKBoundary'+ha.v4().replace(/\-/g,'');return ea(ba,wa,'',0,function(Y,pa,Ka){if(Y)/^gina\-upload/i.test(b)&&W(gina,e,'error',b,Y),triggerEvent(gina,e,'error.'+b,Y),D&&triggerEvent(gina,e,'error.'+b+'.hform',Y);else return Ka&&(L.setRequestHeader('Content-Type','multipart/form-data; boundary='+wa),L.send(pa),q.sent=!0,N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&
|
|
474
|
+
(gina.forms.sent||(gina.forms.sent={}),window.ginaToolbar.update('forms',{id:b,sent:pa}))),!1})}'undefined'!=typeof oa&&0<oa.count()&&(l=JSON.stringify(oa))}catch(Y){/^gina\-upload/i.test(b)&&W(gina,e,'error',b,Y),triggerEvent(gina,e,'error.'+b,Y),D&&triggerEvent(gina,e,'error.'+b+'.hform',Y)}}h||('undefined'!=typeof aa&&null!=aa&&''!=aa&&L.setRequestHeader('Content-Type',aa),L.send(l))}else'undefined'!=typeof aa&&null!=aa&&''!=aa&&L.setRequestHeader('Content-Type',aa),L.send();q.sent=!0;N&&U&&'undefined'!=
|
|
475
|
+
typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.sent||(gina.forms.sent={}),Ba={id:b,sent:'string'==typeof l?JSON.parse(l):l},window.ginaToolbar.update('forms',Ba))}}},W=function(l,h,e,b,q){l=h.uploadProperties||null;if(!l)throw Error('No uploadProperties found !!');h=document.getElementById(l.uploadTriggerId);b=null;var m=q.files||[],p=null;l.hasPreviewContainer&&(b=document.getElementById(l.previewContainer.id))&&(b.innerHTML='');l.errorField&&(p=document.getElementById(l.errorField));
|
|
476
|
+
p&&(p.style.display='none');if(p&&'success'!=e){var O=q.message||q.error;p.innerHTML='<p>'+O+'</p>';fadeIn(p)}else if(p||'success'==e)for(e=0,q=m.length;e<q;++e){var D=b.id.replace(/\-preview/,'-'+e+'-reset-trigger');O=!1;p=document.getElementById(D);var aa=['reset','js-upload-reset'];p?(/a/i.test(p.tagName)&&(p.href='#'),p.innerHTML&&''!=p.innerHTML||(p.innerHTML=h.getAttribute('data-gina-form-upload-reset-label')||'Reset'),'undefined'==typeof p.className&&(p.className=''),D=R(p.className.split(/\s+/g),
|
|
477
|
+
aa),p.className=D.join(' ')):(O=!0,p=document.createElement('A'),p.href='#',p.innerHTML=h.getAttribute('data-gina-form-upload-reset-label')||'Reset',p.className=aa.join(' '),p.id=D);p.style.display='none';if('undefined'==typeof m[e].preview&&l.hasPreviewContainer&&/^image/.test(m[e].mime)&&''!=m[e].location){D=document.createElement('IMG');D.src=m[e].tmpUri;D.style.display='none';D.setAttribute('data-upload-original-filename',m[e].originalFilename);D.setAttribute('data-upload-reset-link-id',p.id);
|
|
478
|
+
aa=b.getAttribute('data-preview-max-width')||null;if(D.width&&aa&&D.width>aa){var xa=D.width/aa;D.width=aa;D.height/=xa}else!D.width&&aa&&(D.width=aa);/ul/i.test(l.previewContainer.tagName)?(aa=document.createElement('LI'),aa.className='item',aa.appendChild(D),b.appendChild(aa)):b.appendChild(D);fadeIn(D)}D=l.uploadFields[e];for(var ba in D)if('name'==ba&&''!=D[ba].value||!m[e][ba]||'preview'==ba&&'undefined'==typeof m[e][ba]||/(height|width)/i.test(ba)&&!/^image/.test(m[e].mime))/(preview|height|width)/i.test(ba)&&
|
|
479
|
+
(aa=document.getElementById(D[ba].id))&&aa.parentNode.removeChild(aa);else if(D[ba].value=m[e][ba],'preview'==ba)for(var oa in m[e][ba])if('undefined'!=typeof m[e][ba][oa]&&'undefined'!=typeof D[ba][oa]&&(D[ba][oa].value=m[e][ba][oa]),'tmpUri'==oa&&l.hasPreviewContainer){xa=document.createElement('IMG');xa.src=m[e][ba].tmpUri;xa.style.display='none';xa.setAttribute('data-upload-original-filename',m[e].originalFilename);xa.setAttribute('data-upload-preview-original-filename',m[e][ba].originalFilename);
|
|
480
|
+
xa.setAttribute('data-upload-reset-link-id',p.id);if(aa=b.getAttribute('data-preview-max-width')||null)xa.width=aa;/ul/i.test(l.previewContainer.tagName)?(aa=document.createElement('LI'),aa.className='item',aa.appendChild(xa),b.appendChild(aa)):b.appendChild(xa);fadeIn(xa)}l.hasPreviewContainer&&(/ul/i.test(l.previewContainer.tagName)?(aa=document.createElement('LI'),aa.className='item',O&&aa.appendChild(p),b.appendChild(aa)):O&&b.appendChild(p));qb('reset',h,e);fadeIn(p)}else throw Error(O);},ia=
|
|
481
|
+
function(l,h){console.debug(h+' input files');var e=/reset/i.test(h)?!0:!1,b=null,q=null,m=document.getElementById(l.id+'-preview').childNodes,p=null,O=l.customFiles,D=[];for(let aa=0,xa=m.length;aa<xa;aa++)if(/img/i.test(m[aa].tagName)){e?(b=m[aa].getAttribute('data-upload-original-filename'),D.push(b),(q=m[aa].getAttribute('data-upload-preview-original-filename'))&&D.push(q)):(b=m[aa].src.substr(m[aa].src.lastIndexOf('/')+1),D.push(b));for(let ba=0,oa=O.length;ba<oa;ba++)if(O[ba].name==b){p=e?document.getElementById(m[aa].getAttribute('data-upload-'+
|
|
482
|
+
h+'-link-id')):document.getElementById(O[ba].deleteLinkId);p.style.display='none';m[aa].style.display='none';O.splice(ba,1);l.customFiles=O;e&&(l.value=O.join(', C:\\fakepath\\'));b=new RegExp('^'+(l.name+'['+ba+']').replace(/\-|\[|\]|\./g,'\\$&'));for(let H=0,ka=l.form.length;H<ka;H++)if(q=l.form[H].dataset.ginaFormUploadIsLocked||!1,b.test(l.form[H].name)&&!/true/i.test(q)&&(l.form[H].remove(),ka--,H--,gina&&N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar))try{window.ginaToolbar.update('data-xhr',
|
|
483
|
+
{files:O})}catch(wa){throw wa;}q=l.getAttribute('data-gina-form-upload-'+h+'-action');if(!q||'undefined'==typeof q||''==q||/404/.test(q))throw Error('input file `'+l.id+'` error: `data-gina-form-upload-'+h+'-action` is required. You need to provide a valide url.');(b=l.getAttribute('data-gina-form-upload-'+h+'-method'))&&'undefined'!=typeof b&&''!=b?b=b.toUpperCase():e?b='POST':(b=1<D.length?'POST':'DELETE',console.warn('`data-gina-form-upload-'+h+'-method` was not defined. Switching to `'+b+'` by default.'));
|
|
484
|
+
let Ba=l.getAttribute('data-gina-form-upload-'+h+'-is-synchrone');if(/null/i.test(Ba)||'undefined'==typeof b||''==b)Ba=!0;q=setupXhr({url:q,method:b,isSynchrone:Ba,headers:{'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8','X-Requested-With':'XMLHttpRequest'}});/GET|DELETE/i.test(b)?q.send():q.send(JSON.stringify({files:D}));if(/none/i.test(window.getComputedStyle(l).display)){if(/none/i.test(l.parentElement.style.display)){l.parentElement.style.display='block';return}l.style.display=
|
|
485
|
+
'block'}removeListener(gina,$uploadResetTrigger,'click',function(){p.remove();m[aa].remove()});xa--;aa--;break}}},ea=function(l,h,e,b,q){var m=new FileReader;m.addEventListener('load',function(p){p.preventDefault();try{var O=this.result,D=void 0;p='';var aa=null;'undefined'==typeof D&&(D=8);var xa=D/8;switch(D){case 8:aa=new Uint8Array(O);break;case 16:aa=new Uint16Array(O);break;case 32:aa=new Uint32Array(O);break;default:aa=new Uint8Array(O)}var ba=aa.length,oa=Math.pow(2,8)+xa;O=0;for(xa=D=null;O<
|
|
486
|
+
ba;O+=oa)D=Math.min(oa,ba-O),xa=aa.subarray(O,O+D),p+=String.fromCharCode.apply(null,xa);l[this.index].bin+=p;l[this.index].file.type||(l[this.index].file.type='application/octet-stream')}catch(Ba){return q(Ba,null,!0)}e+='--'+h+'\r\n';e+='Content-Disposition: form-data; name="'+l[this.index].key+'"; group="'+l[this.index].group+'"; filename="'+l[this.index].file.name+'"\r\nContent-Type: '+l[this.index].file.type+'\r\nContent-Length: '+l[this.index].bin.length+'\r\n\r\n';e+=l[this.index].bin+'\r\n';
|
|
487
|
+
++this.index;this.index==l.length?(e+='--'+h+'--',q(!1,e,!0)):ea(l,h,e,this.index,q)},!1);m.index=b;l[b].bin='';m.readAsArrayBuffer(l[b].file)},Aa=function(l){var h=l.target.getAttribute('data-gina-form-event-on-submit-success')||null;if(null!=h)if(/\((.*)\)/.test(h))eval(h);else l.on('success.hform',window[h]);h=l.target.getAttribute('data-gina-form-event-on-submit-error')||null;if(null!=h)if(/\((.*)\)/.test(h))eval(h);else l.on('error.hform',window[h])},ma=function(l){var h=null,e=l;if(!v.$forms)throw Error('`$forms` collection not found');
|
|
488
|
+
if('undefined'==typeof e)if('undefined'!=typeof this.id&&''!=this.id&&null!=this.id)e=this.id;else throw Error('[ FormValidator::destroy(formId) ] `formId` is missing');if('string'==typeof e)e=e.replace(/#/,'');else{if('object'!=typeof e||Array.isArray(e))throw Error('[ FormValidator::destroy(formId) ] `formId` should be a `string`');l=e.form;e=l.getAttribute('id')||'form.'+ha.v4();l.setAttribute('id',e)}'undefined'!=typeof v.$forms[e]?h=v.$forms[e]:'undefined'!=typeof this.binded&&(h=this);if(h)addListener(gina,
|
|
489
|
+
h.target,'destroy.'+e,function(b){cancelEvent(b);delete v.$forms[e];removeListener(gina,b.currentTarget,b.type);removeListener(gina,b.currentTarget,'destroy')}),h=nb(h),triggerEvent(gina,h.target,'destroy.'+e);else throw Error('[ FormValidator::destroy(formId) ] `'+e+'` not found');},sa=function(l){l='undefined'!=typeof l?l:v.rules;for(let b in l){var h=Object.getOwnPropertyNames(l[b]),e=0;let q=h.length,m=!1,p=null;for(;e<q;){if(/^_case_/.test(h[e])){m=!0;p=h[e];break}e++}m||'object'!=typeof l[b]||
|
|
490
|
+
sa(l[b]);if(p&&Array.isArray(l[b][p].conditions)&&0<l[b][p].conditions.length)for(h=0,e=l[b][p].conditions.length;h<e;)'undefined'!=typeof l[b][p].conditions[h].rules&&0==l[b][p].conditions[h].rules.count()&&(l[b][p].conditions.splice(h,1),e--,h--),h++}},Da=function(l){var h=JSON.stringify(l),e=h.match(/("@import\s+[-_a-z A-Z 0-9/.]+")/g)||[],b=[];for(let O=0,D=e.length;O<D;O++)0>b.indexOf(e[O])&&b.push(e[O]);e=b;b=h.match(/("_merging(.*))(\s+:|:)(.*)(",|")/g);v.rules||(v.rules={});if(e&&0<e.length){l=
|
|
491
|
+
{};for(let O=0,D=e.length;O<D;++O){var q=e[O].replace(/(@import\s+|"|')/g,'');var m=q.replace(/(@import\s+|"|')/g,'').split(/\s/g);for(let aa=0,xa=m.length;aa<xa;++aa){var p=m[aa].replace(/\//g,'.').replace(/\-/g,'.');'undefined'!=typeof v.rules[p]?(p=JSON.stringify(v.rules[p]),p=JSON.parse(p),p._comment='undefined'!=typeof p._comment?p._comment+'\n':'',p._comment+='Imported from `'+q+'`',p=JSON.stringify(p),h=h.replace(new RegExp(e[O],'g'),p),v.rules=JSON.parse(JSON.stringify(v.rules).replace(new RegExp(e[O],
|
|
492
|
+
'g'),'{}'))):console.warn('[formValidator:rules] <@import error> on `'+e[O]+'`: rule `'+m[aa]+'` not found. Ignoring.')}m=new RegExp(e[O]);if(q=b&&m.test(b.join())?!0:!1)for(let aa=0,xa=b.length;aa<xa;aa++)if(m.test(b[aa])){q=JSON.stringify(l);q=q.substr(1,q.length-1);aa<xa-1&&(q+=',');try{h=h.replace(new RegExp(b[aa],'g'),q),v.rules=JSON.parse(JSON.stringify(v.rules).replace(new RegExp(b[aa],'g'),'{}'))}catch(ba){throw ba;}}l={}}l=JSON.parse(h);Ja(l,'');try{sa()}catch(O){console.error(O.stack)}}return l},
|
|
493
|
+
Qa=function(l){gina.hasValidator?(v=R(v,gina.validator),v.on('init',function(h){v.isReady=!0;triggerEvent(gina,v.target,'ready.'+v.id,v)})):(v.target=document,v.setOptions=n,v.getFormById=y,v.validateFormById=F,v.resetErrorsDisplay=M,v.resetFields=T,v.handleErrorsDisplay=G,v.send=Ea,v.on('init',function(h){if('undefined'!=typeof l&&l.count())try{Ja(l,''),l=Da(l),gina.forms.rules='undefined'!=typeof gina.forms.rules&&gina.forms.rules?R(gina.forms.rules,l,!0):l,v.rules=R(v.rules,JSON.clone(gina.forms.rules),
|
|
494
|
+
!0)}catch(O){throw O;}va.count()||(va=JSON.clone(v.rules));za.setOptions=n;za.getFormById=y;za.validateFormById=F;za.resetErrorsDisplay=M;za.resetFields=T;za.handleErrorsDisplay=G;za.submit=ra;za.send=Ea;za.unbind=nb;za.bind=yb;za.reBind=wb;za.destroy=ma;h=0;for(var e=document.getElementsByTagName('form'),b=0,q=e.length;b<q;++b){if(e[b].getAttribute){var m=e[b].getAttribute('id')||'form.'+ha.v4();m!==e[b].getAttribute('id')&&e[b].setAttribute('id',m)}else m='form.'+ha.v4(),e[b].setAttribute('id',
|
|
495
|
+
m);za.id=m;za.target=e[b];v.$forms[m]=R({},za);var p=e[b].getAttribute('data-gina-form-rule');if(p){p=p.replace(/\-|\//g,'.');'undefined'!=typeof l&&(v.$forms[m].rules[p]=v.rules[p]=va[p]=R(JSON.clone(eval('gina.forms.rules.'+p)),v.rules[p]));if('undefined'==typeof va[p])throw Error('['+m+'] no rule found with key: `'+p+'`. Please check if json is not malformed @ /forms/rules/'+p.replace(/\./g,'/')+'.json');p=v.rules[p]}'string'==typeof m&&'undefined'!=typeof va[m.replace(/\-/g,'.')]||'object'==typeof p?
|
|
496
|
+
(m=v.$forms[m].target,p?yb(m,p):yb(m),++h):('object'==typeof e[b].id?(delete v.$forms[e[b].id],m=e[b].attributes.getNamedItem('id').nodeValue||'form.'+ha.v4(),e[b].setAttribute('id',m),e[b].id=m,za.target=e[b],v.$forms[m]=R({},za),m=v.$forms[m].target):m=v.$forms[e[b].id].target,p?yb(m,p):yb(m))}if(window.XMLHttpRequest)L=new XMLHttpRequest;else if(window.ActiveXObject)try{L=new ActiveXObject('Msxml2.XMLHTTP')}catch(O){try{L=new ActiveXObject('Microsoft.XMLHTTP')}catch(D){}}v.isReady=!0;gina.hasValidator=
|
|
497
|
+
!0;gina.validator=v;triggerEvent(gina,v.target,'ready.'+v.id,v)}));v.initialized=!0;return v},Ja=function(l,h){var e;for(e in l)if('object'==typeof l[e]&&'undefined'==typeof v.rules[h+e]){var b=e;/\[|\]/.test(e)&&(b=e.replace(/\[/g,'.').replace(/\]/g,''));v.rules[h+b]=l[e];Ja(l[e],h+b+'.')}},Ia=function(l){if('undefined'!=typeof va[l])return va[l];var h=null;if('undefined'==typeof v.rules[l]){if(Ja(va,''),va=Da(va),h=va[l],!h)return{}}else h=v.rules[l];h=JSON.clone(h);var e=new RegExp('^'+l),b=new RegExp('^'+
|
|
498
|
+
l+'.'),q=null,m=function(O,D,aa,xa,ba,oa,Ba){if(D.length){var H=Object.getOwnPropertyNames(O)[0],ka=D[0];ka=''==ba?ba+=ka:ba+'['+ka+']';1==D.length&&(O[H]=R(O[H],aa,!0));D.splice(0,1);ka==H?m(O[H],D,aa,xa,ka,oa,Ba):'undefined'!=typeof O[H]?m(O[H],D,aa,xa,ka,oa,Ba):m(O,D,aa,xa,ba,oa,Ba)}},p;for(p in v.rules)p!=l&&e.test(p)&&(q=p.replace(b,''),/\./.test(q)&&(q=q.split(/\./g),m(h,q,v.rules[p],h,'',0,h.count()-1)));return va[l]=h},Ha=formatDataFromString,mb=function(l){var h=v.$forms[l.form.getAttribute('id')],
|
|
499
|
+
e=/^true$/i.test(l.disabled)?!0:!1;e&&'undefined'!=typeof h.rule&&'undefined'!=typeof h.rule[l.name]&&'undefined'!=typeof h.rule[l.name].exclude&&/^false$/i.test(h.rule[l.name].exclude)&&(e=!1);if(/^(radio|text|hidden|password|number|date|email)$/i.test(l.type)&&!e){var b=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value'),q=b.set;b.set=function(m){Object.defineProperty(this,'value',{set:q});var p='change.'+this.id;m===this.value&&m===this.defaultValue||m===this.value||(this.value=
|
|
500
|
+
m,console.debug('Value set: '+m),'undefined'!=typeof gina.events[p]&&(console.debug('trigger event on: ',this.name,p),triggerEvent(gina,this,p,m)));Object.defineProperty(this,'value',b)};Object.defineProperty(l,'value',b)}},Fa=function(l,h,e,b){'undefined'==typeof b&&(b=!1);var q=l.rules,m=v.$forms[h.form.getAttribute('id')],p=/^true$/i.test(h.disabled)?!0:!1;p&&'undefined'!=typeof m.rule&&'undefined'!=typeof m.rule[h.name]&&'undefined'!=typeof m.rule[h.name].exclude&&/^false$/i.test(m.rule[h.name].exclude)&&
|
|
501
|
+
(p=!1);if(/^(radio|checkbox|text|hidden|password|number|date|email)$/i.test(h.type)&&!p||b&&!p){b=h.name;m=q[b]||null;if(!m&&(xb(q,h),'undefined'==typeof q[b]))return;if(l.target.dataset.ginaFormLiveCheckEnabled&&m&&(b=[],m=null,p=0,/^(radio|checkbox)$/i.test(h.type)?m=/^(radio|checkbox)$/i.test(h.type)?'changed.'+h.id:'change.'+h.id:(addEventListener(gina,h,'focusout.'+h.id,function(D){D.preventDefault();clearTimeout(e)}),m='change.'+h.id,'undefined'==typeof gina.events[m]&&(b[p]=m,++p),m='keyup.'+
|
|
502
|
+
h.id,'undefined'==typeof gina.events[m]&&(b[p]=m,++p),m='focusin.'+h.id,'undefined'==typeof gina.events[m]&&(b[p]=m,++p),m='focusout.'+h.id),'undefined'==typeof gina.events[m]&&(b[p]=m,++p),0<b.length)){var O=!1;addListener(gina,h,b,function(D){D.preventDefault();clearTimeout(e);if(!O&&/^changed\./i.test(D.type)||!O&&/^(radio|checkbox)$/i.test(D.target.type))O=!0;else if(O&&/^changed\./i.test(D.type)||O&&/^(radio|checkbox)$/i.test(D.target.type))return!1;if('undefined'!=typeof v.$forms[D.target.form.getAttribute('id')].isSubmitting&&
|
|
503
|
+
/true/i.test(v.$forms[D.target.form.getAttribute('id')].isSubmitting))return!1;var aa=function(){console.debug('processing: '+D.target.name+'/'+D.target.id);if(!/^(radio|checkbox)$/i.test(D.target.type)&&D.target.value===D.target.defaultValue&&''!=D.target.value){var xa=v.$forms[D.target.form.getAttribute('id')].errors;if(xa&&0!=xa.count())G(D.target.form,xa,null,D.target.name);else return G(D.target.form,{},null,D.target.name),cancelEvent(D)}xa={};var ba={};xa[D.target.name]=D.target.value;ba[D.target.name]=
|
|
504
|
+
D.target;v.$forms[D.target.form.getAttribute('id')].isValidating=!0;ca(D.target,xa,ba,l.rules,function(oa){v.$forms[D.target.form.getAttribute('id')].isValidating=!1;oa.isValid()?G(D.target.form,{},oa.data,D.target.name):G(D.target.form,oa.error,oa.data,D.target.name);var Ba=D.target.form,H=null,ka=oa=null;oa=db(Ba,q);H=oa.fields;oa=oa.$fields;var wa=Ba.getAttribute('id');ka=v.$forms[wa].rules;v.$forms[wa].isValidating=!0;ca(Ba,H,oa,ka,function(Y){v.$forms[wa].isValidating=!1;console.debug('['+wa+
|
|
505
|
+
'] onSilentGlobalLiveValidation: '+Y.isValid(),Y,H);var pa=Y.isValid();N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:wa,errors:Y.error||{}}));if(!pa&&Y.error){v.$forms[h.form.getAttribute('id')].errors=Y.error;for(let Ka in Y.error)G(Ba,Y.error,Y.data,Ka)}La(Ba,pa);O=!1})})};if(/^changed\./i.test(D.type)||/^change\./i.test(D.type)&&'radio'==D.target.type)return function(xa,ba){if(!(0<ba))return++ba,
|
|
506
|
+
setTimeout(()=>{console.debug(' changed .... '+h.id);aa()},0)}(O,0);/^focusin\./i.test(D.type)?/\-error/.test(h.parentNode.className)&&(console.debug('#1 you just focusin ....'+h.id,h.value,v.$forms[h.form.getAttribute('id')].isValidating),w(h)):/^focusout\./i.test(D.type)?/\-warning/.test(h.parentNode.className)&&(console.debug('#1 you just focusout ....'+h.id,h.value),v.$forms[h.form.getAttribute('id')].isValidating=!1,w(h),G(h.form,v.$forms[h.form.getAttribute('id')].errors,null,h.name)):/^keyup\./i.test(D.type)?
|
|
507
|
+
(h.ginaFormValidatorTestedValue=h.value,e=setTimeout(function(){if(!(-1<['91','17','16'].indexOf(''+D.keyCode)&&0==P.count()))if(-1<['9'].indexOf(''+D.keyCode)){var xa=document.getElementById(v.$forms[h.form.getAttribute('id')].lastFocused[1].id),ba=v.$forms[xa.form.getAttribute('id')].errors,oa=!0;console.debug('[TAB] you just focusout from "'+v.$forms[h.form.getAttribute('id')].lastFocused[1].id+'" to "'+h.id+'"','errors: ',ba);ba&&0<ba.count()&&(oa=v.$forms[xa.form.getAttribute('id')].isValidating=
|
|
508
|
+
!1);w(xa);G(xa.form,ba,null,xa.name);La(h.form,oa)}else console.debug('[A]['+P.count()+'] keyup ('+D.keyCode+') .... '+h.id,h.value,' VS ',h.ginaFormValidatorTestedValue+'(old)'),aa()},1E3)):/^change\./i.test(D.type)&&!/^(checkbox)$/i.test(D.target.type)&&(console.debug(' change .... '+h.id),aa())})}}},Pa=function(l,h){l.setSelectionRange?(l.focus(),l.setSelectionRange(h,h)):l.createTextRange&&(l=l.createTextRange(),l.collapse(!0),l.moveEnd('character',h),l.moveStart('character',h),l.select())},Ya=
|
|
509
|
+
function(l,h){if(document.activeElement&&document.activeElement.form){l=Array.prototype.filter.call(document.activeElement.form.querySelectorAll('a:not([disabled]), button:not([disabled]), input[type=text]:not([disabled]), select:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])'),function(q){return 0<q.offsetWidth||0<q.offsetHeight||q===document.activeElement});var e=l.indexOf(document.activeElement);if(-1<e){var b=l[e+1];h&&(b=l[e-1]);(b||l[0]).focus()}}},pb=function(l,h){l.setAttribute('readonly',
|
|
510
|
+
'readonly');addListener(gina,l,'focusout.'+l.id,function(e){e.preventDefault();clearTimeout(h);e=e.currentTarget;triggerEvent(gina,e,'change.'+e.id);e.setAttribute('readonly','readonly')});addListener(gina,l,'focusin.'+l.id,function(e){e.preventDefault();e.currentTarget.removeAttribute('readonly');var b='keydown.'+e.currentTarget.id;'undefined'==typeof gina.events[b]&&addListener(gina,e.currentTarget,b,function(q){q.preventDefault();clearTimeout(h);var m=q.currentTarget,p=q.currentTarget.value,O=
|
|
511
|
+
m.selectionStart,D=m.selectionEnd;m.removeAttribute('readonly');switch(q.keyCode){case 46:case 8:O!=D?(m.value=p.substr(0,O)+p.substr(D),0==O&&(m.value=p.substr(D))):m.value=0==O?p.substring(O+1):p.substr(0,O-1)+p.substr(D);q.currentTarget.setAttribute('readonly','readonly');setTimeout(()=>{m.removeAttribute('readonly');setTimeout(()=>{O!=D?Pa(m,O):0==O?Pa(m,O):Pa(m,O-1)},0)},0);break;case 9:P[16]&&P[9]?Ya(m,!0):Ya(m);break;case 13:case 16:break;case 37:console.debug('moving left ',O-1);Pa(m,O-1);
|
|
512
|
+
break;case 39:O+1<p.length+1&&Pa(m,O+1);break;case 17:case 91:console.debug('CMD hit');q.preventDefault();break;case 67:if(P[67]&&P[91]||P[67]&&P[17]){m.setSelectionRange(O,D);document.execCommand('copy');break}case 86:if(P[86]&&P[91]||P[86]&&P[17]){O!=D&&(m.value=m.value.replace(p.substring(O,D),''));Pa(m,O);document.execCommand('paste');break}case 88:if(P[88]&&P[91]||P[88]&&P[17]){m.setSelectionRange(O,D);document.execCommand('cut');break}case 90:if(P[90]&&P[91]||P[90]&&P[17]){m.value=m.defaultValue;
|
|
513
|
+
break}default:O!=D?(m.value=p.substr(0,O)+q.key,D-1<p.length&&(m.value+=p.substring(D))):m.value=0==O?q.key+p.substring(O):p.substr(0,O)+q.key+p.substr(D),q.currentTarget.setAttribute('readonly','readonly'),setTimeout(()=>{m.removeAttribute('readonly');setTimeout(()=>{Pa(m,O+1)},0)},0)}})})},bb=function(l,h){if(/^(input|textarea)$/i.test(h.tagName)&&'undefined'==typeof gina.events['registered.'+h.id]){/^file$/i.test(h.type)||mb(h);switch(h.tagName.toLowerCase()){case 'textarea':Fa(l,h,null,!0);break;
|
|
514
|
+
default:Fa(l,h,null),l=h.getAttribute('autocomplete'),/safari/i.test(navigator.userAgent)&&l&&/^(off|false)/i.test(l)&&pb(h,null)}gina.events['registered.'+h.id]=h.id}},qb=function(l,h,e){var b=h.id+'-'+e+'-'+l+'-trigger',q=document.getElementById(b);q||(b=h.getAttribute('data-gina-form-upload--'+e+ +l+'-trigger'),q=document.getElementById(b));q&&'undefined'==typeof q.isBinded||q&&'undefined'!=typeof q.isBinded&&!/true/i.test(q.isBinded)?(addListener(gina,q,'click',function(m){m.preventDefault();
|
|
515
|
+
ia(h,l)}),q.isBinded=!0):console.warn('[FormValidator::bindForm][upload]['+h.id+'] : did not find `upload '+l+' trigger`.\nPlease, make sure that your delete element ID is `'+b+'-'+l+'-trigger`, or add to your file input ('+h.id+') -> `data-gina-form-upload-'+l+'-trigger="your-custom-id"` definition.')},Vb=function(l,h){var e=function(b,q,m){var p=null;switch(q){case 'data-gina-form-upload-action':p='upload-to-tmp-xml';break;case 'data-gina-form-upload-reset-action':p='upload-delete-from-tmp-xml'}var O=
|
|
516
|
+
b.getAttribute(q);if(!O||''==O){p||console.warn('`'+q+'` definition not found for `'+b.id+'`. Trying to get default route.');var D=null;try{p&&(O=I.getRoute(p))}catch(aa){D=aa}O?(console.info('Ignore previous warnings regarding upload. I have found a default `'+q+'` route: `'+p+'@'+O.bundle+'`'),b.setAttribute('data-gina-form-upload-action',O.toUrl())):(b='`'+q+'` needs to be defined to proceed for your `input[type=file]` with ID `'+b.id+'`\n'+D+'\n',m&&(m.innerHTML+=b.replace(/(\n|\r)/g,'<br>')),
|
|
517
|
+
console.error(b))}};e(l,'data-gina-form-upload-action',h);e(l,'data-gina-form-upload-reset-action',h);e(l,'data-gina-form-upload-delete-action',h)},wb=function(l,h,e){l=nb(l);yb(l.target,h);return e?e(l):l},nb=function(l){var h=null,e=null;try{if(l.getAttribute&&l.getAttribute('id'))if(e=l.getAttribute('id'),'undefined'!=typeof v.$forms[e])h=v.$forms[e];else throw Error('form instance `'+e+'` not found');else if('undefined'!=typeof l.target)h=l,e=h.id;else throw Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+
|
|
517
518
|
err.stack);}catch(p){throw Error('Validator::unbindForm($target) could not unbind form `'+l+'`\n'+p.stack);}if('undefined'!=typeof h&&!h.binded)return h;removeListener(gina,h,'success.'+e);removeListener(gina,h,'error.'+e);h.target.getAttribute('data-gina-form-event-on-submit-success')&&removeListener(gina,h,'success.'+e+'.hform');h.target.getAttribute('data-gina-form-event-on-submit-error')&&removeListener(gina,h,'error.'+e+'.hform');removeListener(gina,h,'validate.'+e);removeListener(gina,h,'validated.'+
|
|
518
519
|
e);removeListener(gina,h,'submit.'+e);removeListener(gina,h,'reset.'+e);l=[];e=h.target.getElementsByTagName('button');if(0<e.length)for(let p=0,O=e.length;p<O;++p)l.push(e[p]);e=h.target.getElementsByTagName('a');if(0<e.length)for(let p=0,O=e.length;p<O;++p)l.push(e[p]);e=h.target.getElementsByTagName('input');if(0<e.length)for(let p=0,O=e.length;p<O;++p)if(/^(hidden)$/i.test(e[p].type)||l.push(e[p]),/^(file)$/i.test(e[p].type)){var b=e[p].getAttribute('data-gina-form-virtual');if(b){var q=y(b).target;
|
|
519
520
|
if(q){l.push(q);for(let D=0,aa=la.length;D<aa;D++){var m=la[D];'undefined'!=typeof gina.events[m+'.'+b+'.hform']&&gina.events[m+'.'+b+'.hform']==b&&removeListener(gina,q,m+'.'+b+'.hform')}}}}else for(let D=0,aa=la.length;D<aa;D++)b=la[D]+'.'+e[p].id,'undefined'!=typeof gina.events[b]&&gina.events[b]==e[p].id&&removeListener(gina,e[p],b),b=la[D],'undefined'!=typeof gina.events[b]&&gina.events[b]==e[p].id&&removeListener(gina,e[p],b),b=e[p].id,'undefined'!=typeof gina.events[b]&&gina.events[b]==e[p].id&&
|
|
520
521
|
removeListener(gina,e[p],b);e=h.target.getElementsByTagName('textarea');if(0<e.length)for(let p=0,O=e.length;p<O;++p)l.push(e[p]);e=h.target.getElementsByTagName('form');if(0<e.length)for(let p=0,O=e.length;p<O;++p)l.push(e[p]);l.push(h.target);for(let p=0,O=l.length;p<O;++p){e=l[p];b=e.getAttribute('id');for(let D=0,aa=la.length;D<aa;D++)m=q=la[D],'undefined'!=typeof gina.events[m]&&gina.events[m]==b&&removeListener(gina,e,m),m=b,'undefined'!=typeof gina.events[m]&&gina.events[m]==b&&removeListener(gina,
|
|
521
522
|
e,m),m=q+'.'+b,'undefined'!=typeof gina.events[m]&&gina.events[m]==b&&removeListener(gina,e,m),m=q+'.'+b,'undefined'!=typeof gina.events[m]&&gina.events[m]==m&&removeListener(gina,e,m),m=q+'.'+b+'.hform','undefined'!=typeof gina.events[m]&&gina.events[m]==b&&removeListener(gina,e,m)}evt=null;h.binded=!1;return h},xb=function(l,h){h=h.name;if(!l[h])for(let e in l)if(/^\//.test(e)&&(re=e.match(/\/(.*)\//).pop(),flags=e.replace('/'+re+'/',''),re=re.replace(/\[/g,'\\[').replace(/\]/g,'\\]'),re=new RegExp(re,
|
|
522
|
-
flags),re.test(h))){l[h]=l[e];break}},yb=function(l,h){var e=null,b=null,q=typeof(0<va.count())?va:
|
|
523
|
+
flags),re.test(h))){l[h]=l[e];break}},yb=function(l,h){var e=null,b=null,q=typeof(0<va.count())?va:v.rules;try{if(l.getAttribute&&l.getAttribute('id'))if(b=l.getAttribute('id'),'undefined'!=typeof v.$forms[b])e=v.$forms[b];else throw Error('form instance `'+b+'` not found');else throw Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n'+err.stack);}catch(fa){throw Error('Validator::bindForm($target, customRule) could not bind form `'+l+'`\n'+fa.stack);}if('undefined'!=
|
|
523
524
|
typeof e&&e.binded)return!1;console.debug('binding for: '+b);var m=!1,p=null,O='',D=null;'undefined'!=typeof h||'string'==typeof b&&'undefined'!=typeof q[b.replace(/\-|\//g,'.')]?(m=!0,p=h&&'object'==typeof h?h:h&&'string'==typeof h&&'undefined'!=typeof q[h.replace(/\-|\//g,'.')]?Ia(h.replace(/\-|\//g,'.')):Ia(b.replace(/\-|\//g,'.')),e.rules=p,N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.rules||(gina.forms.rules={}),objCallback={id:b,rules:e.rules},window.ginaToolbar.update('forms',
|
|
524
|
-
objCallback))):e.rules={};'undefined'==typeof e.target.dataset.ginaFormLiveCheckEnabled&&0<e.rules.count()?e.target.dataset.ginaFormLiveCheckEnabled=!0:e.target.dataset.ginaFormLiveCheckEnabled='undefined'!=typeof e.target.dataset.ginaFormLiveCheckEnabled?/^true$/i.test(e.target.dataset.ginaFormLiveCheckEnabled)?!0:!1:!1;e.fieldsSet||(e.fieldsSet={});D=null;l.getElementsByTagName('a');h=l.getElementsByTagName('input');var aa=l.getElementsByTagName('textarea');D=l.getElementsByTagName('select');var
|
|
525
|
-
{},ba=[],oa={},Ba=null,H={},ka=null,
|
|
526
|
-
|
|
527
|
-
!0:!1,/^radio$/i.test(h[fa].type)&&(e.fieldsSet[
|
|
528
|
-
(e.rules[h[fa].name]={}),'undefined'!=typeof e.rules[h[fa].name].isRequired&&e.rules[h[fa].name].isRequired||(e.rules[h[fa].name].exclude=!0));if(0<oa.count())for(var Y in oa)h[fa].name!=Y&&(h[fa].getAttribute('data-gina-form-element-group'),oa[Y].test(h[fa].name)&&(h[fa].disabled=!0,'undefined'==typeof H[Y]&&(H[Y]={}),H[Y][h[fa].name]=h[fa]));if(/^file$/i.test(h[fa].type)){
|
|
529
|
-
'text/html');
|
|
530
|
-
sb;Oa++)/img/i.test(
|
|
531
|
-
|
|
532
|
-
document.getElementById(
|
|
533
|
-
'undefined'!=typeof Eb&&(Mb=!0);rb&&(Na=rb);rb=[];for(var Ib='name group originalFilename ext encoding size height width location mime preview'.split(' '),Kb=ta.form.getElementsByTagName('INPUT'),Zb,Xb,Dc,fc,Nb=0,Pc=ja.length;Nb<Pc;++Nb){qb('reset',ta,Nb);rb[Nb]=null;Zb=Na+'['+Nb+']';fc=new RegExp('^'+Zb.replace(/\[/g,'\\[').replace(/\]/g,'\\]'));for(var mc=0,Lc=Kb.length;mc<Lc;++mc)Zb=Kb[mc].getAttribute('type'),
|
|
525
|
+
objCallback))):e.rules={};'undefined'==typeof e.target.dataset.ginaFormLiveCheckEnabled&&0<e.rules.count()?e.target.dataset.ginaFormLiveCheckEnabled=!0:e.target.dataset.ginaFormLiveCheckEnabled='undefined'!=typeof e.target.dataset.ginaFormLiveCheckEnabled?/^true$/i.test(e.target.dataset.ginaFormLiveCheckEnabled)?!0:!1:!1;e.fieldsSet||(e.fieldsSet={});D=null;l.getElementsByTagName('a');h=l.getElementsByTagName('input');var aa=l.getElementsByTagName('textarea');D=l.getElementsByTagName('select');var xa=
|
|
526
|
+
{},ba=[],oa={},Ba=null,H={},ka=null,wa=null;for(let fa=0,X=aa.length;fa<X;++fa)xb(e.rules,aa[fa]),wa=aa[fa].getAttribute('id'),wa&&''!=wa||(wa='textareas.'+ha.v4(),aa[fa].setAttribute('id',wa)),e.fieldsSet[wa]||(e.fieldsSet[wa]={id:wa,name:aa[fa].name||null,value:aa[fa].value||'',defaultValue:aa[fa].value||''}),/^true$/i.test(e.target.dataset.ginaFormLiveCheckEnabled)&&bb(e,aa[fa]);for(let fa=0,X=h.length;fa<X;++fa){xb(e.rules,h[fa]);wa=h[fa].getAttribute('id');wa&&''!=wa||(wa='input.'+ha.v4(),h[fa].setAttribute('id',
|
|
527
|
+
wa));e.fieldsSet[wa]||(Ba=h[fa].value,/$(on|true|false)$/i.test(Ba)&&(Ba=/$(on|true)$/i.test(Ba)?!0:!1),e.fieldsSet[wa]={id:wa,name:h[fa].name||null,value:Ba||!/^(checkbox|radio)$/i.test(h[fa].type)?'':h[fa].checked,defaultValue:/^(checkbox|radio)$/i.test(h[fa].type)?h[fa].checked:Ba},/^(checkbox|radio)$/i.test(h[fa].type)&&'undefined'==typeof e.fieldsSet[wa].defaultChecked&&(e.fieldsSet[wa].defaultChecked=/^(true|on)$/i.test(h[fa].checked)||/^(true|on)$/.test(Ba)&&/^(checkbox)$/i.test(h[fa].type)?
|
|
528
|
+
!0:!1,/^radio$/i.test(h[fa].type)&&(e.fieldsSet[wa].value=h[fa].value,e.fieldsSet[wa].defaultValue=h[fa].value)));/^true$/i.test(e.target.dataset.ginaFormLiveCheckEnabled)&&bb(e,h[fa]);if(Ba=h[fa].getAttribute('data-gina-form-element-group'))0>ba.indexOf(Ba)&&ba.push(Ba),ka=h[fa].getAttribute('name')||wa,ka===wa&&h[fa].setAttribute('name',wa),xa[wa]={id:wa,name:ka,group:Ba,target:h[fa]},oa[h[fa].name]=new RegExp('^'+Ba.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')),m&&('undefined'==typeof e.rules[h[fa].name]&&
|
|
529
|
+
(e.rules[h[fa].name]={}),'undefined'!=typeof e.rules[h[fa].name].isRequired&&e.rules[h[fa].name].isRequired||(e.rules[h[fa].name].exclude=!0));if(0<oa.count())for(var Y in oa)h[fa].name!=Y&&(h[fa].getAttribute('data-gina-form-element-group'),oa[Y].test(h[fa].name)&&(h[fa].disabled=!0,'undefined'==typeof H[Y]&&(H[Y]={}),H[Y][h[fa].name]=h[fa]));if(/^file$/i.test(h[fa].type)){wa=h[fa].getAttribute('data-gina-form-upload-trigger');wa||(wa=h[fa].id);Ba=null;ka=(new DOMParser).parseFromString(l.innerHTML,
|
|
530
|
+
'text/html');wa&&(Ba=document.getElementById(wa));aa=document.getElementById(h[fa].id+'-error');Vb(h[fa],aa);if((aa=ka.getElementById(wa+'-preview'))&&Ba&&!/none/i.test(window.getComputedStyle(aa).display)&&!/none/i.test(aa.parentElement.style.display)){ka=0;console.debug('preview is visible ...');Ba.customFiles=[];Ba.form=l;aa=aa.childNodes;for(let ja=0,ta=aa.length;ja<ta;ja++){var pa=null;if(/ul/i.test(aa[ja].tagName))for(let Na=0,Va=aa[ja].length;Na<Va;Na++){let hb=$$els[ja];for(let Oa=0,sb=hb.length;Oa<
|
|
531
|
+
sb;Oa++)/img/i.test(hb[Oa])&&(pa=hb[Oa],pa.setAttribute(''),ka++)}else/img/i.test(aa[ja].tagName)&&(pa=aa[ja],deleteLinkId=wa+'-'+ka+'-delete-trigger',pa=pa.src.substr(pa.src.lastIndexOf('/')+1),Ba.customFiles.push({name:pa,deleteLinkId}),qb('delete',Ba,ka),ka++)}}addListener(gina,h[fa],'change',function(ja){ja.preventDefault();var ta=ja.currentTarget;ja=ta.files;ta.customFiles=Array.from(ja);if(!ja.length)return!1;var Na=ta.getAttribute('data-gina-form-upload-action'),Va=ta.getAttribute('name'),
|
|
532
|
+
hb='gina-upload-'+Va.replace(/\[/g,'-').replace(/\]/g,'-'+e.id);ta.setAttribute('data-gina-form-virtual',hb);var Oa=ta.getAttribute('data-gina-form-upload-on-success'),sb=ta.getAttribute('data-gina-form-upload-on-error'),jb=null;if(0<ja.length){var eb=null;if(z()){eb=gina.popin.getActivePopin();eb.$target=(new DOMParser).parseFromString(eb.target.outerHTML,'text/html');eb.$target.getElementById(eb.id).innerHTML=document.getElementById(eb.id).innerHTML;var fb=eb.$target.getElementById(hb)}else fb=
|
|
533
|
+
document.getElementById(hb);if(!fb){try{fb=y(hb)||null}catch(Rc){}fb||=z()?eb.$target.createElement('form'):document.createElement('form');fb.id=hb;fb.action=Na;fb.enctype='multipart/form-data';fb.method='POST';if('undefined'!=typeof ta.form){Na='files';var rb=ta.getAttribute('data-gina-form-upload-prefix')||ta.name||ta.getAttribute('name'),kb=ta.id||ta.getAttribute('id'),Mb=!1,Eb=ta.getAttribute('data-gina-form-upload-preview')||kb+'-preview';Eb=z()?eb.$target.getElementById(Eb):document.getElementById(Eb);
|
|
534
|
+
'undefined'!=typeof Eb&&(Mb=!0);rb&&(Na=rb);rb=[];for(var Ib='name group originalFilename ext encoding size height width location mime preview'.split(' '),Kb=ta.form.getElementsByTagName('INPUT'),Zb,Xb,Dc,fc,Nb=0,Pc=ja.length;Nb<Pc;++Nb){qb('reset',ta,Nb);rb[Nb]=null;Zb=Na+'['+Nb+']';fc=new RegExp('^'+Zb.replace(/\[/g,'\\[').replace(/\]/g,'\\]'));for(var mc=0,Lc=Kb.length;mc<Lc;++mc)Zb=Kb[mc].getAttribute('type'),jb=Kb[mc].getAttribute('data-gina-form-upload-error')||kb+'-error'||null,Zb&&/hidden/i.test(Zb)&&
|
|
534
535
|
(Xb=Kb[mc],Zb=/\[\w+\]$/i.test(Xb.name)?Xb.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g,''):Xb.name,Dc=/\[\w+\]$/i.test(Xb.name)?Xb.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g,''):Xb.name,Xb&&'undefiend'!=typeof Zb&&-1<Ib.indexOf(Zb)&&fc.test(Xb.name)?(rb[Nb]||(rb[Nb]={}),/\[preview\]/i.test(Xb.name)?('undefined'==typeof rb[Nb].preview&&(rb[Nb].preview={}),rb[Nb].preview[Zb]=Xb):rb[Nb][Zb]=Xb):Xb&&'undefiend'!=typeof Zb&&0>Ib.indexOf(Zb)&&fc.test(Xb.name)&&(rb[Nb]||(rb[Nb]={}),/\[preview\]/i.test(Xb.name)?
|
|
535
|
-
('undefined'==typeof rb[Nb].preview&&(rb[Nb].preview={}),rb[Nb].preview[Dc]=Xb):rb[Nb][Dc]=Xb));fc=0;for(mc=Ib.length;fc<mc;++fc)rb[Nb]||(rb[Nb]={}),'undefined'==typeof rb[Nb][Ib[fc]]&&(Zb=Na+'['+Nb+']['+Ib[fc]+']',$newVirtualField=document.createElement('input'),$newVirtualField.type='hidden',$newVirtualField.id='input.'+ha.v4(),$newVirtualField.name=Zb,$newVirtualField.value='',ta.form.appendChild($newVirtualField),rb[Nb][Ib[fc]]=ta.form[ta.form.length-1])}
|
|
536
|
-
uploadTriggerId:ta.id,$form:ta.form,errorField:
|
|
537
|
-
document.body.appendChild(
|
|
538
|
-
!0;ca(event.target,ja,ta,X.rules,function(Va){
|
|
539
|
-
Ba=H=null;Y=0;for(oa=D.length;Y<oa;++Y)if(xb(e.rules,D[Y]),
|
|
540
|
-
null)for(ka=0,aa=D[Y].options.length;ka<aa;++ka)if(D[Y].options[ka].value==Ba){H=ka;D[Y].selectedIndex=H;break}'undefined'!=typeof D[Y].options[D[Y].selectedIndex]&&D[Y].options[D[Y].selectedIndex].index&&(H=D[Y].options[D[Y].selectedIndex].index);0<D[Y].options.length&&'undefined'!=typeof D[Y].options[H]&&(Ba=D[Y].options[H].value);e.fieldsSet[
|
|
541
|
-
|
|
542
|
-
Va.test(
|
|
543
|
-
{});/^true$/i.test(X.checked)?m&&(fa.rules[ja].exclude=!1,'undefined'!=typeof
|
|
544
|
-
fa.getAttribute('data-value')||fa.getAttribute('value')||fa.value;ta=/^(true|on)$/.test(ta)?!0:ta;''===ta&&(ta=!1);var Na=/^(true|on|false)$/i.test(ta)?!0:!1;X&&Na&&(/^true$/i.test(ta)&&!fa.checked?fa.checked=!0:/^false$/i.test(ta)&&fa.checked&&(fa.checked=!1));ta=fa.checked;var Va=fa.getAttribute('data-gina-form-element-group')||null,
|
|
545
|
-
fa.setAttribute('checked','checked')),Na&&(fa.value=!0,fa.setAttribute('value',!0),typeof('undefined'!=fa.getAttribute('data-value'))&&fa.setAttribute('data-value',!0))):(X?Bb(fa):setTimeout(function(){fa.checked=!1;ja(fa,Va,!0);Bb(fa)},0),fa.removeAttribute('checked'),Na&&(fa.value=!1,fa.setAttribute('value','false'),typeof('undefined'!=fa.getAttribute('data-value'))&&fa.setAttribute('data-value','false')))},Bb=function(fa){fa=new RegExp(fa.id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'));for(let X in
|
|
546
|
-
fa.test(
|
|
547
|
-
'\\$&')))
|
|
548
|
-
fa.id&&ta&&(Hb[Va].checked=!1,Hb[Va].removeAttribute('checked'),
|
|
549
|
-
typeof D&&/^checkbox$/i.test(D)){if(h[Y].disabled&&-1<ba.indexOf(h[Y].id)||!h[Y].checked&&-1<ba.indexOf(h[Y].id)){D=new RegExp(h[Y].id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'));for(var cb in
|
|
550
|
-
typeof D&&/^radio$/i.test(D)&&(O=h[Y].id,D=function(fa,X){addListener(gina,fa,X,function(ja){Wa(ja.target);triggerEvent(gina,ja.target,'changed.'+ja.target.id)});Wa(fa,!0)},'undefined'!=typeof gina.events[O]&&gina.events[O]==h[Y].id&&removeListener(gina,h[Y],O),D(h[Y],O))}O='click';D=function(){var fa=null;fa='reset.'+l.id;'undefined'==typeof gina.events[fa]&&addListener(gina,l,fa,function(X){X.preventDefault();var ja=
|
|
551
|
-
!0;T(ja);X=db(ja.target,ja.rules,!0);ca(ja.target,X.fields,X.$fields,ja.rules,function(ta){var Na=ta.isValid();console.debug('silent reset validation result[isValid:'+Na+']: ',ta);G(ja.target,{});
|
|
536
|
+
('undefined'==typeof rb[Nb].preview&&(rb[Nb].preview={}),rb[Nb].preview[Dc]=Xb):rb[Nb][Dc]=Xb));fc=0;for(mc=Ib.length;fc<mc;++fc)rb[Nb]||(rb[Nb]={}),'undefined'==typeof rb[Nb][Ib[fc]]&&(Zb=Na+'['+Nb+']['+Ib[fc]+']',$newVirtualField=document.createElement('input'),$newVirtualField.type='hidden',$newVirtualField.id='input.'+ha.v4(),$newVirtualField.name=Zb,$newVirtualField.value='',ta.form.appendChild($newVirtualField),rb[Nb][Ib[fc]]=ta.form[ta.form.length-1])}fb.uploadProperties={id:ta.form.id||ta.getAttribute('id'),
|
|
537
|
+
uploadTriggerId:ta.id,$form:ta.form,errorField:jb,mandatoryFields:Ib,uploadFields:rb,hasPreviewContainer:Mb,isPopinContext:z()};Mb&&(fb.uploadProperties.previewContainer=Eb)}Oa?fb.setAttribute('data-gina-form-event-on-submit-success',Oa):fb.setAttribute('data-gina-form-event-on-submit-success','onGenericXhrResponse');sb?fb.setAttribute('data-gina-form-event-on-submit-error',sb):fb.setAttribute('data-gina-form-event-on-submit-error','onGenericXhrResponse');z()?document.getElementById(eb.id).appendChild(fb):
|
|
538
|
+
document.body.appendChild(fb)}try{var Qc=y(hb),rc=new FormData;ta=null;hb=0;for(var sc=ja.length;hb<sc;++hb)ta=ja[hb],rc.append(Va,ta,ta.name);Qc.send(rc,{withCredentials:!0})}catch(Rc){throw Rc;}}})}}var Ka=function(fa,X){fa.setAttribute('data-value',fa.value);if(/^(true)$/i.test(X.target.dataset.ginaFormLiveCheckEnabled&&0<X.rules.count())){var ja={},ta={},Na=null;Na=fa.form;ja[event.target.name]=event.target.value;ta[event.target.name]=event.target;v.$forms[Na.getAttribute('id')].isValidating=
|
|
539
|
+
!0;ca(event.target,ja,ta,X.rules,function(Va){v.$forms[Na.getAttribute('id')].isValidating=!1;Va.isValid()?G(Na,{},Va.data,event.target.name):G(Na,Va.error,Va.data,event.target.name);var hb=Na,Oa=Va=null,sb=null;Oa=db(hb,q);Va=Oa.fields;Oa=Oa.$fields;var jb=hb.getAttribute('id');sb=v.$forms[jb].rules;v.$forms[jb].isValidating=!0;ca(hb,Va,Oa,sb,function(eb){v.$forms[jb].isValidating=!1;console.debug('[updateSelect]: onSilentGlobalLiveValidation: '+eb.isValid(),eb);var fb=eb.isValid();fb||(v.$forms[jb].errors=
|
|
540
|
+
eb.error);La(hb,fb);once=!1})})}};Ba=H=null;Y=0;for(oa=D.length;Y<oa;++Y)if(xb(e.rules,D[Y]),wa=D[Y].getAttribute('id'),!wa||!/^gina\-toolbar/.test(wa)){wa&&''!=wa||(wa='select.'+ha.v4(),D[Y].setAttribute('id',wa));if(Ba=D[Y].getAttribute('data-gina-form-element-group'))H=D[Y].getAttribute('name')||wa,H===wa&&D[Y].setAttribute('name',wa),xa[wa]={id:wa,name:H,group:Ba,target:D[Y]};addListener(gina,D[Y],'change',function(fa){fa=fa.target;/select/i.test(fa.type)&&Ka(fa,e)});if(D[Y].options&&!e.fieldsSet[wa]){H=
|
|
541
|
+
0;if(Ba=D[Y].getAttribute('data-value')||null)for(ka=0,aa=D[Y].options.length;ka<aa;++ka)if(D[Y].options[ka].value==Ba){H=ka;D[Y].selectedIndex=H;break}'undefined'!=typeof D[Y].options[D[Y].selectedIndex]&&D[Y].options[D[Y].selectedIndex].index&&(H=D[Y].options[D[Y].selectedIndex].index);0<D[Y].options.length&&'undefined'!=typeof D[Y].options[H]&&(Ba=D[Y].options[H].value);e.fieldsSet[wa]={id:wa,name:D[Y].name||null,value:Ba||null,selectedIndex:H||0};'undefined'!=typeof D[Y].selectedIndex&&-1<D[Y].selectedIndex&&
|
|
542
|
+
(D[Y].options[H].selected=!0,D[Y].setAttribute('data-value',D[Y].options[H].value))}}var Ta=function(fa,X,ja,ta){'undefined'==typeof ta&&(ta=!1);if('undefined'==typeof xa[fa])throw Error('Radio & Checkbox dependencies not met: you must use the ID attribue of the `master element` as the `data-gina-form-element-group`');var Na=fa.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&');fa=xa[fa].target.checked;for(let Oa in xa)if(!/radio|checkbox/i.test(xa[Oa].target.type)){var Va=new RegExp(Na);var hb=new RegExp(X);if(Va.test(xa[Oa].group)&&
|
|
543
|
+
hb.test(xa[Oa].group)||Va.test(xa[Oa].group))xa[Oa].target.disabled=!0,'undefined'==typeof e.rules[xa[Oa].name]&&(e.rules[xa[Oa].name]={}),e.rules[xa[Oa].name].exclude=!0,ta?(xa[Oa].target.disabled=fa?!1:!0,e.rules[xa[Oa].name].exclude=fa?!1:!0):(xa[Oa].target.disabled=ja,e.rules[xa[Oa].name].exclude=ja)}},$a=function(fa,X,ja,ta){'undefined'==typeof ta&&(ta=!1);if(ta&&'undefined'!=typeof xa[X.id])return fa=/true/i.test(X.checked)?!1:!0,Ta(X.id,xa[X.id].group,fa,ta);ja=X.name;m&&'undefined'==typeof fa.rules[ja]&&
|
|
544
|
+
(fa.rules[ja]={});/^true$/i.test(X.checked)?m&&(fa.rules[ja].exclude=!1,'undefined'!=typeof xa[X.id]&&Ta(X.id,xa[X.id].group,!1,ta)):m&&(fa.rules[ja].exclude=!0,'undefined'!=typeof xa[X.id]&&Ta(X.id,xa[X.id].group,!0,ta))},Ab=function(fa,X){'undefined'==typeof X&&(X=!1);var ja=function(Oa,sb,jb){if(sb)$a(e,Oa,sb);else for(let eb in xa)if(hb.test(xa[eb].group)||hb.test(xa[eb].target.getAttribute('data-gina-form-element-group')))xa[eb].target.disabled=jb};X&&/^(on)$/i.test(fa.value)&&!fa.checked&&(fa.value=
|
|
545
|
+
!1);var ta=fa.getAttribute('data-value')||fa.getAttribute('value')||fa.value;ta=/^(true|on)$/.test(ta)?!0:ta;''===ta&&(ta=!1);var Na=/^(true|on|false)$/i.test(ta)?!0:!1;X&&Na&&(/^true$/i.test(ta)&&!fa.checked?fa.checked=!0:/^false$/i.test(ta)&&fa.checked&&(fa.checked=!1));ta=fa.checked;var Va=fa.getAttribute('data-gina-form-element-group')||null,hb=new RegExp(fa.id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'));ta&&'null'!=ta&&'false'!=ta&&''!=ta?(X?Bb(fa):(setTimeout(function(){fa.checked=!0;ja(fa,Va,!1);
|
|
546
|
+
Bb(fa)},0),fa.setAttribute('checked','checked')),Na&&(fa.value=!0,fa.setAttribute('value',!0),typeof('undefined'!=fa.getAttribute('data-value'))&&fa.setAttribute('data-value',!0))):(X?Bb(fa):setTimeout(function(){fa.checked=!1;ja(fa,Va,!0);Bb(fa)},0),fa.removeAttribute('checked'),Na&&(fa.value=!1,fa.setAttribute('value','false'),typeof('undefined'!=fa.getAttribute('data-value'))&&fa.setAttribute('data-value','false')))},Bb=function(fa){fa=new RegExp(fa.id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'));for(let X in xa)(/checkbox/i.test(xa[X].target.type)&&
|
|
547
|
+
fa.test(xa[X].group)||/checkbox/i.test(xa[X].target.type)&&fa.test(xa[X].target.getAttribute('data-gina-form-element-group')))&&$a(e,xa[X].target,xa[X].group,!0)},gb=function(fa,X){X=fa.id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&');X=new RegExp(X);for(let ja in xa)if(/checkbox|radio/i.test(xa[ja].target.type)||(xa[ja].target.disabled=!0,'undefined'==typeof e.rules[xa[ja].name]&&(e.rules[xa[ja].name]={}),e.rules[xa[ja].name].exclude=!0),X.test(xa[ja].group)||X.test(xa[ja].target.getAttribute('data-gina-form-element-group').replace(/\-|_|@|#|\.|\[|\]/g,
|
|
548
|
+
'\\$&')))xa[ja].target.disabled=!0,'undefined'==typeof e.rules[xa[ja].name]&&(e.rules[xa[ja].name]={}),/^(true|on)$/i.test(fa.checked)?(xa[ja].target.disabled=!1,e.rules[xa[ja].name].exclude=!1):(xa[ja].target.disabled=!0,e.rules[xa[ja].name].exclude=!0);Bb(fa)},Hb=null,Wa=function(fa,X,ja){X='undefined'!=typeof X&&X?!0:!1;ja='undefined'!=typeof ja&&ja?!0:!1;var ta=fa.checked,Na=/^(true|false)$/i.test(fa.value);Hb=document.getElementsByName(fa.name);for(let Va=0,hb=Hb.length;Va<hb;++Va)Hb[Va].id!==
|
|
549
|
+
fa.id&&ta&&(Hb[Va].checked=!1,Hb[Va].removeAttribute('checked'),gb(Hb[Va],!0));X?gb(fa):(ta&&'null'!=ta&&'false'!=ta&&''!=ta?setTimeout(function(){ja?gb(fa):(fa.checked=!1,fa.removeAttribute('checked'))},0):setTimeout(function(){ja?gb(fa):(fa.checked=!0,fa.setAttribute('checked','checked'))},0),Na&&(fa.value=/^true$/.test(fa.value)?!0:!1))};Y=0;for(oa=h.length;Y<oa;++Y){D=h[Y].getAttribute('type');if('undefined'==typeof h[Y].id||''==h[Y].id)h[Y].id=D+'-'+ha.v4(),h[Y].setAttribute('id',h[Y].id);if('undefined'!=
|
|
550
|
+
typeof D&&/^checkbox$/i.test(D)){if(h[Y].disabled&&-1<ba.indexOf(h[Y].id)||!h[Y].checked&&-1<ba.indexOf(h[Y].id)){D=new RegExp(h[Y].id.replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'));for(var cb in xa)D.test(xa[cb].group)&&(xa[cb].target.disabled=!0)}O='change.'+h[Y].id;D=function(fa,X){addListener(gina,fa,X,function(ja){Ab(ja.target);triggerEvent(gina,ja.target,'changed.'+ja.target.id)});Ab(fa,!0)};'undefined'!=typeof gina.events[O]&&gina.events[O]==h[Y].id&&removeListener(gina,h[Y],O);D(h[Y],O)}else'undefined'!=
|
|
551
|
+
typeof D&&/^radio$/i.test(D)&&(O=h[Y].id,D=function(fa,X){addListener(gina,fa,X,function(ja){Wa(ja.target);triggerEvent(gina,ja.target,'changed.'+ja.target.id)});Wa(fa,!0)},'undefined'!=typeof gina.events[O]&&gina.events[O]==h[Y].id&&removeListener(gina,h[Y],O),D(h[Y],O))}O='click';D=function(){var fa=null;fa='reset.'+l.id;'undefined'==typeof gina.events[fa]&&addListener(gina,l,fa,function(X){X.preventDefault();var ja=v.$forms[X.currentTarget.id||X.target.id];ja.target.dataset.ginaFormIsResetting=
|
|
552
|
+
!0;T(ja);X=db(ja.target,ja.rules,!0);ca(ja.target,X.fields,X.$fields,ja.rules,function(ta){var Na=ta.isValid();console.debug('silent reset validation result[isValid:'+Na+']: ',ta);G(ja.target,{});La(ja.target,Na);ja.target.dataset.ginaFormIsResetting=!1})});addListener(gina,l,'reset',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;X.preventDefault();var ta=ja.id;if(!ta)return!1;/^reset\./.test(ta)||(ta='reset.'+ja.id);gina.events[ta]&&triggerEvent(gina,
|
|
552
553
|
ja,ta,X.detail)});addListener(gina,l,'keydown',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;P[X.keyCode]='keydown'==X.type;var ta=ja.id;if(!ta)return!1;/^keydown\./.test(ta)||(ta='keydown.'+ja.id);gina.events[ta]&&(cancelEvent(X),triggerEvent(gina,ja,ta,X.detail,X))});addListener(gina,l,'keyup',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;P[X.keyCode]&&delete P[X.keyCode];var ta=ja.id;if(!ta)return!1;
|
|
553
|
-
/^keyup\./.test(ta)||(ta='keyup.'+ja.id);gina.events[ta]&&(cancelEvent(X),triggerEvent(gina,ja,ta,X.detail,X))});addListener(gina,l,'focusin',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;var ta=ja.id;if(!ta)return!1;/^focusin\./.test(ta)||(ta='focusin.'+ja.id);if(gina.events[ta]){cancelEvent(X);var Na=X.target.form.getAttribute('id')||X.currentTarget.getAttribute('id'),Va={id:ja.id,name:ja.name};
|
|
554
|
-
0,Va):
|
|
554
|
+
/^keyup\./.test(ta)||(ta='keyup.'+ja.id);gina.events[ta]&&(cancelEvent(X),triggerEvent(gina,ja,ta,X.detail,X))});addListener(gina,l,'focusin',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;var ta=ja.id;if(!ta)return!1;/^focusin\./.test(ta)||(ta='focusin.'+ja.id);if(gina.events[ta]){cancelEvent(X);var Na=X.target.form.getAttribute('id')||X.currentTarget.getAttribute('id'),Va={id:ja.id,name:ja.name};v.$forms[Na].lastFocused.length?v.$forms[Na].lastFocused.splice(0,
|
|
555
|
+
0,Va):v.$forms[Na].lastFocused[0]=Va;v.$forms[Na].lastFocused.splice(2);triggerEvent(gina,ja,ta,X.detail)}});addListener(gina,l,'focusout',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;var ta=ja.id;if(!ta)return!1;/^focusout\./.test(ta)||(ta='focusout.'+ja.id);gina.events[ta]&&(cancelEvent(X),triggerEvent(gina,ja,ta,X.detail))});addListener(gina,l,'change',function(X){var ja=X.target;if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;
|
|
555
556
|
var ta=ja.id;if(!ta)return!1;/^change\./.test(ta)||(ta='change.'+ja.id);gina.events[ta]&&(cancelEvent(X),triggerEvent(gina,ja,ta,X.detail))});addListener(gina,l,'click',function(X){var ja=X.target,ta=!1,Na=!1;if(/(label)/i.test(X.target.tagName)&&'undefined'!=typeof X.target.control&&null!=X.target.control&&/(checkbox|radio)/i.test(X.target.control.type)||/(label)/i.test(X.target.parentNode.tagName)&&'undefined'!=typeof X.target.parentNode.control&&null!=X.target.parentNode.control&&/(checkbox|radio)/i.test(X.target.parentNode.control.type))Na=
|
|
556
557
|
X.target.getAttribute('for')||X.target.parentNode.getAttribute('for')?!0:!1,ja=X.target.control||X.target.parentNode.control;if(!ja.disabled&&/(checkbox|radio)/i.test(ja.type)&&!Na){if(/checkbox/i.test(ja.type))return Ab(ja);if(/radio/i.test(ja.type))return Wa(ja,!1,!0)}if(/(button|input)/i.test(ja.tagName)&&/(submit|checkbox|radio)/i.test(ja.type)||/a/i.test(ja.tagName)&&ja.attributes.getNamedItem('data-gina-form-submit')||/a/i.test(ja.parentNode.tagName)&&ja.parentNode.attributes.getNamedItem('data-gina-form-submit')){Na=
|
|
557
558
|
ja.attributes.getNamedItem('data-gina-form-submit');var Va=ja.parentNode.attributes.getNamedItem('data-gina-form-submit');if(Na||Va)ta=!0,(Va=Na?ja.getAttribute('data-gina-form-submit-method')||X.currentTarget.getAttribute('method'):ja.parentNode.getAttribute('data-gina-form-submit-method')||X.currentTarget.getAttribute('method'))&&(Na&&ja.form?ja.form.setAttribute?ja.form.setAttribute('method',Va):X.currentTarget.setAttribute('method',Va):ja.parentNode.form&&(ja.parentNode.form.setAttribute?ja.parentNode.form.setAttribute('method',
|
|
558
559
|
Va):X.currentTarget.setAttribute('method',Va)));'undefined'!=typeof ja.id&&ja.getAttribute('id')||ja.setAttribute('id','click.'+ha.v4());ja.id=ja.getAttribute('id');if(/^click\./.test(ja.id)||m){Na=ja.id;if(!Na)return!1;/^click\./.test(Na)||(Na=ja.id);if(!ja.disabled&&/(checkbox|radio)/i.test(ja.type)){if(/checkbox/i.test(ja.type))return Ab(ja);if(/radio/i.test(ja.type))return Wa(ja,!1,!0)}if('undefined'!=typeof X.defaultPrevented&&X.defaultPrevented)return!1;if('submit'==ja.type&&!/^submit\./i.test(Na)||
|
|
559
560
|
ta&&!/^submit\./i.test(Na))Na='submit.'+Na;'reset'!=ja.type||/^reset\./i.test(Na)||(Na='reset.'+Na);gina.events[Na]?(cancelEvent(X),triggerEvent(gina,ja,Na,X.detail)):ta&&'undefined'!=typeof this.id&&''!=this.id&&'undefined'!=typeof gina.validator.$forms[this.id]&&(gina.validator.getFormById(this.id).submit(),cancelEvent(X))}}})};D();O='validate.'+b;D=function(){addListener(gina,l,O,function(fa){cancelEvent(fa);var X=e.eventData.error||e.eventData.validation||fa.detail;G(fa.target,X.fields||X.error,
|
|
560
|
-
X.data);fa=fa.target.getAttribute('id');if('undefined'!=typeof X.isValid&&X.isValid()){var ja=
|
|
561
|
-
ja={_length:0};var Na=l.getAttribute('id'),Va='undefined'!=typeof
|
|
562
|
-
function(
|
|
561
|
+
X.data);fa=fa.target.getAttribute('id');if('undefined'!=typeof X.isValid&&X.isValid()){var ja=v.$forms[fa].target.getAttribute('data-gina-form-inherits-data')||null;ja&&(X.data=R(X.data,JSON.parse(decodeURIComponent(ja))));v.$forms[fa]?v.$forms[fa].send(X.data):e&&e.send(X.data)}})};'undefined'!=typeof gina.events[O]&&gina.events[O]=='validate.'+b&&removeListener(gina,e,O,D);D();cb=function(fa,X){/^submit\./i.test(fa)||(fa='submit.'+fa);addListener(gina,X,fa,function(ja){cancelEvent(ja);var ta={};
|
|
562
|
+
ja={_length:0};var Na=l.getAttribute('id'),Va='undefined'!=typeof v.$forms[Na]?v.$forms[Na].rules:null;v.$forms[Na].sent||(ta=db(l,Va),ja=ta.fields,ta=ta.$fields,Va=v.$forms[Na].rules,0==ja._length?(delete ja._length,ja={error:[],isValid:function(){return!0},data:Ha(ja)},triggerEvent(gina,l,'validate.'+b,ja)):(b=l.getAttribute('id'),p=(Va=l.getAttribute('data-gina-form-rule'))?Ia(Va.replace(/\-|\//g,'.')):Ia(b.replace(/\-/g,'.')),v.$forms[Na].isSubmitting=!0,v.$forms[Na].isSending=!1,ca(l,ja,ta,p,
|
|
563
|
+
function(hb){triggerEvent(gina,l,'validate.'+b,hb)})))})};ba=null;h=[];ba=[];D=null;ba=l.getElementsByTagName('button');if(0<ba.length)for(let fa=0,X=ba.length;fa<X;++fa)'submit'==ba[fa].type&&h.push(ba[fa]);ba=l.getElementsByTagName('a');if(0<ba.length)for(let fa=0,X=ba.length;fa<X;++fa)ba[fa].attributes.getNamedItem('data-gina-form-submit')?h.push(ba[fa]):ba[fa].getAttribute('id')||/gina\-popin/.test(ba[fa].className)||gina.popinIsBinded||/gina\-link/.test(ba[fa].className)||(D='link.'+ha.v4(),
|
|
563
564
|
ba[fa].id=D);D=null;Y=!1;for(let fa=0,X=h.length;fa<X;++fa){ba=h[fa];if(/button/i.test(ba.tagName)&&'undefined'!=typeof ba.type&&/submit/i.test(ba.type)||/a/i.test(ba.tagName)&&'undefined'!=typeof ba.dataset.ginaFormSubmit&&/^true$/i.test(ba.dataset.ginaFormSubmit)||/a/i.test(ba.parentNode.tagName)&&'undefined'!=typeof ba.parentNode.dataset.ginaFormSubmit&&/^true$/i.test(ba.parentNode.dataset.ginaFormSubmit)){/a/i.test(ba.parentNode.tagName)&&(ba=ba.parentNode);if('undefined'==typeof ba.id||'undefined'!=
|
|
564
|
-
typeof ba.id&&''==ba.id)ba.id='click.'+ha.v4(),ba.setAttribute('id',ba.id);/a/i.test(ba.tagName)&&'undefined'==typeof ba.form&&(ba.form={id:e.id});'undefined'==typeof ba.dataset.ginaFormSubmitTriggerFor&&'undefined'!=typeof
|
|
565
|
-
e.id)}'A'==ba.tagName&&(D=ba.getAttribute('onclick'),Y=ba.getAttribute('data-gina-form-submit'),D||Y?/return false/i.test(D)||Y||(D=/;$/.test(D)?D+'return false;':D+'; return false;'):ba.setAttribute('onclick','return false;'));ba.id?O=ba.id:(O='click.'+ha.v4(),ba.id=O,ba.setAttribute('id',O));'undefined'!=typeof gina.events[O]&&gina.events[O]==ba.id||cb(O,ba)}O='submit';addListener(gina,l,O,function(fa){var X=fa.target,ja=X.getAttribute('id'),ta=
|
|
566
|
-
'text/html').getElementById(ta.submitTrigger))&&ta.disabled&&cancelEvent(fa);if('undefined'!=typeof fa.defaultPrevented&&fa.defaultPrevented)return!1;(m||Na)&&cancelEvent(fa);fa={};Na={_length:0};ta='undefined'!=typeof gina.validator.$forms[ja]?gina.validator.$forms[ja].rules:null;for(var Va=null,
|
|
565
|
+
typeof ba.id&&''==ba.id)ba.id='click.'+ha.v4(),ba.setAttribute('id',ba.id);/a/i.test(ba.tagName)&&'undefined'==typeof ba.form&&(ba.form={id:e.id});'undefined'==typeof ba.dataset.ginaFormSubmitTriggerFor&&'undefined'!=typeof v.$forms[e.id]&&'undefined'==typeof v.$forms[e.id].submitTrigger&&'undefined'!=typeof ba.form.id&&e.id==ba.form.id&&(console.debug('attching submitTrigger: '+ba.id,' form id: '+e.id),v.$forms[e.id].submitTrigger=e.submitTrigger=ba.id||ba.getAttribute('id'),ba.dataset.ginaFormSubmitTriggerFor=
|
|
566
|
+
e.id)}'A'==ba.tagName&&(D=ba.getAttribute('onclick'),Y=ba.getAttribute('data-gina-form-submit'),D||Y?/return false/i.test(D)||Y||(D=/;$/.test(D)?D+'return false;':D+'; return false;'):ba.setAttribute('onclick','return false;'));ba.id?O=ba.id:(O='click.'+ha.v4(),ba.id=O,ba.setAttribute('id',O));'undefined'!=typeof gina.events[O]&&gina.events[O]==ba.id||cb(O,ba)}O='submit';addListener(gina,l,O,function(fa){var X=fa.target,ja=X.getAttribute('id'),ta=v.$forms[ja],Na=e.binded;(ta=(new DOMParser).parseFromString(X.innerHTML,
|
|
567
|
+
'text/html').getElementById(ta.submitTrigger))&&ta.disabled&&cancelEvent(fa);if('undefined'!=typeof fa.defaultPrevented&&fa.defaultPrevented)return!1;(m||Na)&&cancelEvent(fa);fa={};Na={_length:0};ta='undefined'!=typeof gina.validator.$forms[ja]?gina.validator.$forms[ja].rules:null;for(var Va=null,hb=null,Oa=0,sb=X.length;Oa<sb;++Oa)Va=X[Oa].getAttribute('name'),hb=X[Oa].disabled||X[Oa].getAttribute('disabled'),hb=/disabled|true/i.test(hb)?!0:!1,Va&&!hb&&('undefined'!=typeof X[Oa].type&&'radio'==X[Oa].type||
|
|
567
568
|
'undefined'!=typeof X[Oa].type&&'checkbox'==X[Oa].type?X[Oa].checked?/^(true|false)$/.test(X[Oa].value)?Na[Va]=X[Oa].value=/^true$/.test(X[Oa].value)?!0:!1:Na[Va]=X[Oa].value:ta&&'undefined'!=typeof ta[Va]&&'undefined'!=typeof ta[Va].isBoolean&&'checkbox'==X[Oa].type&&!/^(true|false)$/.test(X[Oa].value)&&(Na[Va]=!1):Na[Va]=X[Oa].value,fa[Va]=X[Oa],fa[Va].setAttribute('data-gina-form-errors',''));Na._length=Na.count();0==Na._length?(delete Na._length,fa={error:[],isValid:function(){return!0},data:Ha(Na)},
|
|
568
|
-
'undefined'!=typeof gina.events['submit.'+ja]?triggerEvent(gina,X,'submit.'+ja,fa):triggerEvent(gina,X,'validate.'+ja,fa)):(p=(ta=X.getAttribute('data-gina-form-rule'))?Ia(ta.replace(/\-|\//g,'.')):Ia(ja.replace(/\-/g,'.')),
|
|
569
|
-
0<e.rules.count())?(console.debug('silent validation mode on'),cb=db(e.target,e.rules),ca(e.target,cb.fields,cb.$fields,e.rules,function(fa){console.debug('silent validation result[isValid:'+fa.isValid()+']: ',fa);N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:b,errors:fa.error}));
|
|
570
|
-
null;l instanceof HTMLFormElement?(l=l.getAttribute('id'),$formInstance=
|
|
571
|
-
document.getElementById($formInstance.submitTrigger)&&(/true/i.test(h)?document.getElementById($formInstance.submitTrigger).disabled=!1:document.getElementById($formInstance.submitTrigger).disabled=!0)},db=function(l,h,e){'undefined'==typeof e&&(e=!1);var b={},q={},m=l.id||l.getAttribute('id');'undefined'==typeof h&&(h='undefined'!=typeof
|
|
572
|
-
0,O=l.length;p<O;++p){if(e)switch(l[p].tagName.toLowerCase()){case 'input':/^(hidden|text)$/i.test(l[p].type)&&(l[p].value=l[p].defaultValue)}if(/button/i.test(l[p].tagName)&&'undefined'!=typeof l[p].type&&/submit/i.test(l[p].type)||/a/i.test(l[p].tagName)&&'undefined'!=typeof l[p].dataset.ginaFormSubmit&&/^true$/i.test(l[p].dataset.ginaFormSubmit))/a/i.test(l[p].tagName)&&'undefined'==typeof l[p].form&&(l[p].form={id:m}),'undefined'==typeof l[p].dataset.ginaFormSubmitTriggerFor&&'undefined'!=typeof
|
|
573
|
-
'undefined'==typeof
|
|
569
|
+
'undefined'!=typeof gina.events['submit.'+ja]?triggerEvent(gina,X,'submit.'+ja,fa):triggerEvent(gina,X,'validate.'+ja,fa)):(p=(ta=X.getAttribute('data-gina-form-rule'))?Ia(ta.replace(/\-|\//g,'.')):Ia(ja.replace(/\-/g,'.')),v.$forms[ja].isValidating=!0,ca(X,Na,fa,p,function(jb){v.$forms[ja].isValidating=!1;'undefined'!=typeof gina.events['submit.'+ja]?triggerEvent(gina,X,'submit.'+ja,jb):triggerEvent(gina,X,'validate.'+ja,jb)}))});v.$forms[b].binded=!0;/^(true)$/i.test(e.target.dataset.ginaFormLiveCheckEnabled&&
|
|
570
|
+
0<e.rules.count())?(console.debug('silent validation mode on'),cb=db(e.target,e.rules),ca(e.target,cb.fields,cb.$fields,e.rules,function(fa){console.debug('silent validation result[isValid:'+fa.isValid()+']: ',fa);N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:b,errors:fa.error}));La(e,fa.isValid())})):/^(true)$/i.test(e.target.dataset.ginaFormLiveCheckEnabled)||La(e,!0)},La=function(l,h){$formInstance=
|
|
571
|
+
null;l instanceof HTMLFormElement?(l=l.getAttribute('id'),$formInstance=v.$forms[l]):$formInstance=l;'undefined'==typeof $formInstance.submitTrigger?console.warn('This might be normal, so do not worry if this form is handled by your javascript: `'+$formInstance.id+'`\nGina could not complete `updateSubmitTriggerState()`: `submitTrigger` might not be attached to form instance `'+$formInstance.id+'`\nTo disable this warning, You just need to disable `Form Live Checking on your form by adding to your <form>: `data-gina-form-live-check-enabled=false``'):
|
|
572
|
+
document.getElementById($formInstance.submitTrigger)&&(/true/i.test(h)?document.getElementById($formInstance.submitTrigger).disabled=!1:document.getElementById($formInstance.submitTrigger).disabled=!0)},db=function(l,h,e){'undefined'==typeof e&&(e=!1);var b={},q={},m=l.id||l.getAttribute('id');'undefined'==typeof h&&(h='undefined'!=typeof v.$forms[m].rules&&0<v.$forms[m].rules.count()?v.$forms[m].rules:null,h||'undefined'==typeof gina.validator.$forms[m]||(h=gina.validator.$forms[m].rules));for(var p=
|
|
573
|
+
0,O=l.length;p<O;++p){if(e)switch(l[p].tagName.toLowerCase()){case 'input':/^(hidden|text)$/i.test(l[p].type)&&(l[p].value=l[p].defaultValue)}if(/button/i.test(l[p].tagName)&&'undefined'!=typeof l[p].type&&/submit/i.test(l[p].type)||/a/i.test(l[p].tagName)&&'undefined'!=typeof l[p].dataset.ginaFormSubmit&&/^true$/i.test(l[p].dataset.ginaFormSubmit))/a/i.test(l[p].tagName)&&'undefined'==typeof l[p].form&&(l[p].form={id:m}),'undefined'==typeof l[p].dataset.ginaFormSubmitTriggerFor&&'undefined'!=typeof v.$forms[m]&&
|
|
574
|
+
'undefined'==typeof v.$forms[m].submitTrigger&&'undefined'!=typeof l[p].form.id&&m==l[p].form.id&&(v.$forms[m].submitTrigger=l[p].id||l[p].getAttribute('id'),l[p].dataset.ginaFormSubmitTriggerFor=m);var D=l[p].getAttribute('name');var aa=l[p].disabled||l[p].getAttribute('disabled');aa=/disabled|true/i.test(aa)?!0:!1;if(D&&!aa){if('undefined'!=typeof l[p].type&&'radio'==l[p].type||'undefined'!=typeof l[p].type&&'checkbox'==l[p].type)if(l[p].checked||'undefined'==typeof h[D]&&'undefined'!=l[p].value&&
|
|
574
575
|
/^(true|false)$/.test(l[p].value)||!l[p].checked&&'undefined'!=typeof h[D]&&'undefined'!=typeof h[D].isBoolean&&/^(true|false)$/.test(l[p].value))if(/^(true|false)$/.test(l[p].value))if('undefined'==typeof h[D]?h[D]={isBoolean:!0}:'undefined'!=typeof h[D]&&'undefined'==typeof h[D].isBoolean&&(h[D].isBoolean=!0,h[D].isRequired=!0),'radio'==l[p].type){if('undefined'==typeof h[D])throw Error('rule '+D+' is not defined');/^true$/.test(h[D].isBoolean)&&l[p].checked&&(q[D]=/^true$/.test(l[p].value)?!0:
|
|
575
576
|
!1)}else q[D]=l[p].value=/^true$/.test(l[p].value)?!0:!1;else q[D]=l[p].value;else h&&'undefined'!=typeof h[D]&&'undefined'!=typeof h[D].isBoolean&&'undefined'!=typeof h[D].isRequired&&!/^(true|false)$/.test(l[p].value)&&(q[D]=!1);else q[D]=l[p].value;'undefined'==typeof b[D]&&(b[D]=l[p],b[D].setAttribute('data-gina-form-errors',''))}}q._length=q.count()||0;return{$fields:b,fields:q,rules:h}},Gb=function(l,h,e,b){return'undefined'==typeof l[e]||/^(null|NaN|undefined|\s*)$/i.test(h[e])?h[e]:'undefined'!=
|
|
576
577
|
typeof l[e].isNumber||'undefined'!=typeof l[e].isInteger||'undefined'!=typeof l[e].isFloat||'undefined'!=typeof l[e].toFloat||'undefined'!=typeof l[e].toInteger?(/,/.test(h[e])&&(h[e]=h[e].replace(/,/g,'.').replace(/\s+/g,'')),h[e]):'boolean'==typeof h[e]?h[e]:l[e].isBoolean?/^true$/i.test(h[e])?!0:!1:'undefined'!=typeof b&&/^true$/i.test(b)?'\\"'+h[e]+'\\"':h[e]},Ub=function(l,h){'string'!=typeof l&&(l=JSON.stringify(JSON.clone(l)));l=JSON.parse(l.replace(/"(true|false)"/gi,'$1'));for(let e in h)h[e]=
|
|
577
|
-
Gb(l,h,e);return h},pc=function(l,h,e,b){var q=JSON.parse(l.replace(/"(true|false)"/gi,'$1')),m=JSON.stringify(q);b&&(h=e[Object.getOwnPropertyNames(e)[0]].form,e=db(h,q),delete e.fields._length,h=e.fields,e=e.$fields);b=[];var p=0;for(O in h)b[p]=O,p++;b.sort().reverse();for(let aa=0,
|
|
578
|
-
'` is used in a dynamic rule without definition. This could lead to an evaluation error. Casting `'+b[aa]+'` to `string`.');l=l.replace(O,p)}if(/\$(.*)/.test(l))for(let aa=0,
|
|
579
|
-
b[aa]+'` to `string`.'),l=l.replace(O,p||e[b[aa]].checked);return JSON.parse(l)},ca=function(l,h,e,b,q){delete h._length;var m=JSON.stringify(b);h=Ub(m,h);/\$(.*)/.test(m)&&(b=!/^form$/i.test(l.tagName)&&1==e.count()&&/true/i.test(l.form.dataset.ginaFormLiveCheckEnabled)?!0:!1,b=pc(m,h,e,b));var p=null,O=m=null,D=!1,aa=0;h.count();var
|
|
580
|
-
/^\//.test(X)&&(ka=X.match(/\/(.*)\//).pop(),
|
|
581
|
-
typeof
|
|
582
|
-
0,sb=!1;if('undefined'!=typeof gina.events[Ba]){console.debug('event `'+Ba+'` already added');H=0;break}++H;addListener(gina,ba,Ba,function(
|
|
583
|
-
|
|
584
|
-
window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:rb,errors:
|
|
585
|
-
G(
|
|
586
|
-
delete fa[Wa]}catch(
|
|
587
|
-
!0,p=l.form.getAttribute('id')||l.form.target.getAttribute('id'),m='validated.'+p,
|
|
588
|
-
ja[Oa].getAttribute('type');if(U&&'undefined'==typeof ja[Oa])console.warn('field `'+Oa+'` found for your form rule ('+Wa.id+'), but not found in $field collection.\nPlease, check your HTML or remove `'+Oa+'` declaration from your rule if this is a mistake.');else{U&&ja[Oa].getAttribute('data-gina-form-element-group')&&'undefined'!=typeof ta[Oa]&&'undefined'!=typeof ta[Oa].exclude&&ta[Oa].exclude&&!ja[Oa].disabled&&(ta[Oa].exclude=!1);var
|
|
578
|
+
Gb(l,h,e);return h},pc=function(l,h,e,b){var q=JSON.parse(l.replace(/"(true|false)"/gi,'$1')),m=JSON.stringify(q);b&&(h=e[Object.getOwnPropertyNames(e)[0]].form,e=db(h,q),delete e.fields._length,h=e.fields,e=e.$fields);b=[];var p=0;for(O in h)b[p]=O,p++;b.sort().reverse();for(let aa=0,xa=b.length;aa<xa;aa++){var O=b[aa].replace(/\-|_|@|#|\.|\[|\]/g,'\\$&');O=new RegExp('\\$'+O,'g');p='\\"'+h[b[aa]]+'\\"';var D=O.test(m);D&&'undefined'!=typeof q[b[aa]]?p=Gb(q,h,b[aa],!0):D&&console.warn('`'+b[aa]+
|
|
579
|
+
'` is used in a dynamic rule without definition. This could lead to an evaluation error. Casting `'+b[aa]+'` to `string`.');l=l.replace(O,p)}if(/\$(.*)/.test(l))for(let aa=0,xa=b.length;aa<xa;aa++)O=b[aa].replace(/\-|_|@|#|\.|\[|\]/g,'\\$&'),O=new RegExp('\\$'+O,'g'),p=''!=e[b[aa]].value?'\\"'+e[b[aa]].value+'\\"':'\\"\\"',(D=O.test(m))&&'undefined'!=typeof q[b[aa]]?p=Gb(q,h,b[aa],!0):D&&console.warn('`'+b[aa]+'` is used in a dynamic rule without definition. This could lead to an evaluation error. Casting `'+
|
|
580
|
+
b[aa]+'` to `string`.'),l=l.replace(O,p||e[b[aa]].checked);return JSON.parse(l)},ca=function(l,h,e,b,q){delete h._length;var m=JSON.stringify(b);h=Ub(m,h);/\$(.*)/.test(m)&&(b=!/^form$/i.test(l.tagName)&&1==e.count()&&/true/i.test(l.form.dataset.ginaFormLiveCheckEnabled)?!0:!1,b=pc(m,h,e,b));var p=null,O=m=null,D=!1,aa=0;h.count();var xa=!1,ba=null,oa=null,Ba=null,H=0,ka=null,wa=null,Y=null,pa=function(Wa,cb,fa){if('undefined'==typeof cb[Wa]){skipTest=!1;for(var X in cb)if(!/^_comment$/i.test(X)&&
|
|
581
|
+
/^\//.test(X)&&(ka=X.match(/\/(.*)\//).pop(),wa=X.replace('/'+ka+'/',''),ka=ka.replace(/\[/g,'\\[').replace(/\]/g,'\\]'),ka=new RegExp(ka,wa),ka.test(Wa))){skipTest=!0;cb[Wa]=cb[X];break}if('undefined'==typeof cb[Wa])return}var ja=Object.getOwnPropertyNames(cb)||[];X=0;var ta=ja.length;if(0<ta)for(;X<ta;)'undefined'!=typeof cb[ja[X]].exclude&&/^true$/i.test(cb[ja[X]].exclude)&&(ja.splice(X,1),ta--,X--),X++;for(var Na in cb[Wa])if('function'==typeof Ka[Wa][Na]){/^((is)\d+|is$)/.test(Na)&&'undefined'==
|
|
582
|
+
typeof Ka[Wa][Na]&&(Ka[Wa][Na]=function(){},Ka[Wa][Na]=S(Ka[Wa][Na],Ka[Wa][Na.replace(/\d+/,'')]),Ka[Wa][Na].setAlias=function(jb){this._currentValidatorAlias=jb}(Na));try{if(Array.isArray(cb[Wa][Na])){Y=JSON.clone(cb[Wa][Na]);if(/\$[\-\w\[\]]*/.test(Y[0])){var Va=Y[0].match(/\$[\-\w\[\]]*/g);X=0;for(var hb=Va.length;X<hb;++X)Y[0]=Y[0].replace(Va[X],Ka[Va[X].replace('$','')].value)}Ka[Wa][Na].apply(Ka[Wa],Y)}else if(/^query$/.test(Na)){ba=e[Wa];oa=ba.getAttribute('id');Ba='asyncCompleted.'+oa;var Oa=
|
|
583
|
+
0,sb=!1;if('undefined'!=typeof gina.events[Ba]){console.debug('event `'+Ba+'` already added');H=0;break}++H;addListener(gina,ba,Ba,function(jb){jb.preventDefault();Oa++;--H;var eb=Object.getOwnPropertyNames(cb[Wa]);eb[eb.length-1]==Na&&(xa=!0);eb='asyncCompleted.'+jb.target.getAttribute('id');if(!/true/.test(sb)){Ka[Wa]=jb.detail;var fb=l;/^form$/i.test(l.tagName)||(fb=l.form);var rb=fb.getAttribute('id'),kb=null;if(xa&&0>=H&&!sb){sb=!0;removeListener(gina,jb.target,eb);q._data=Ka.toData();q._errors=
|
|
584
|
+
Ka.getErrors(Wa);kb=0<q._errors.count()?!1:!0;console.debug('[A] query callback triggered ',q._errors,'isFormValid: '+kb,'\nisValidating: '+v.$forms[rb].isValidating);q._errors&&('undefined'==typeof v.$forms[rb].errors&&(v.$forms[rb].errors={}),v.$forms[rb].errors[Wa]=q._errors[Wa]);if(!kb&&/^true|false$/i.test(v.$forms[rb].isValidating)||''!=Ka[Wa].target.value)console.debug('[A] Refreshing warning/error on field '+Wa),w(Bb[Wa]),G(fb,q._errors,q._data,Wa),La(fb,kb);N&&U&&'undefined'!=typeof window.ginaToolbar&&
|
|
585
|
+
window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:rb,errors:v.$forms[rb].errors||{}}));triggerEvent(gina,fb,'validated.'+rb,q)}else jb=!1,1==ja.length||ja[ja.length-1]==Wa?(kb=0<q._errors.count()?!1:!0,!kb&&/^true|false$/i.test(v.$forms[rb].isValidating)&&(console.debug('[1] Should update error display now ',q._errors),v.$forms[rb].errors=R(q._errors,v.$forms[rb].errors),console.debug('[2] Should update error display now ',v.$forms[rb].errors),w(Bb[Wa]),
|
|
586
|
+
G(fb,q._errors,q._data,Wa),La(fb,kb)),triggerEvent(gina,fb,'validated.'+rb,q)):/^true$/i.test(v.$forms[rb].isValidating)&&1<ja.length&&ja[ja.length-1]!=Wa&&(jb=!0),jb&&ca(fb,Ab,Bb,cb,function(Mb){v.$forms[rb].isValidating=!1;kb=Mb.isValid();N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:rb,errors:Mb.error||{}}));G(fb,Mb.error,Mb.data,Wa);La(fb,kb)})}});Ka[Wa][Na](cb[Wa][Na]);continue}else Ka[Wa][Na](cb[Wa][Na]);
|
|
587
|
+
delete fa[Wa]}catch(jb){if('conditions'==Na)throw Error('[ ginaFormValidator ] could not evaluate `'+Wa+'->'+Na+'()` where `conditions` must be a `collection` (Array)\nStack:\n'+jb);throw Error('[ ginaFormValidator ] could not evaluate `'+Wa+'->'+Na+'()`\nStack:\n'+jb);}}},Ka=null,Ta={},$a=!1;U?/^form$/i.test(l.tagName)?(p=l.getAttribute('id'),m='validated.'+p,v.$forms[p].fields=h,'undefined'!=typeof l.eventData&&'undefined'!=typeof l.eventData.error&&delete l.eventData.error,Ka=new u(h,e,A)):($a=
|
|
588
|
+
!0,p=l.form.getAttribute('id')||l.form.target.getAttribute('id'),m='validated.'+p,v.$forms[p].fields=h,Ka=new u(h,e,A,v.$forms[p].fieldsSet)):Ka=new u(h,null,A);var Ab=null,Bb=null;if($a){$a=l.form.getAttribute('id');var gb=db(v.$forms[$a].target,v.$forms[$a].rules,!1);Ab=Ub(JSON.stringify(v.$forms[$a].rules),JSON.clone(gb.fields));Bb=gb.$fields}else Ab=JSON.clone(h),Bb=e;$a='undefined'!=typeof b?JSON.clone(b):{};var Hb=function(Wa,cb,fa,X,ja,ta,Na,Va){var hb=null;if('undefined'!=typeof ta)for(var Oa in X){var sb=
|
|
589
|
+
ja[Oa].getAttribute('type');if(U&&'undefined'==typeof ja[Oa])console.warn('field `'+Oa+'` found for your form rule ('+Wa.id+'), but not found in $field collection.\nPlease, check your HTML or remove `'+Oa+'` declaration from your rule if this is a mistake.');else{U&&ja[Oa].getAttribute('data-gina-form-element-group')&&'undefined'!=typeof ta[Oa]&&'undefined'!=typeof ta[Oa].exclude&&ta[Oa].exclude&&!ja[Oa].disabled&&(ta[Oa].exclude=!1);var jb='undefined'!=typeof ta['_case_'+Oa]?!0:!1;if(U&&'input'==
|
|
589
590
|
ja[Oa].tagName.toLowerCase()&&/^(checkbox)$/i.test(sb))if(!ja[Oa].checked&&'undefined'!=typeof ta[Oa]&&'undefined'!=typeof ta[Oa].isRequired&&/^(false)$/i.test(ta[Oa].isRequired)||ja[Oa].disabled)ta[Oa]={exclude:!0};else{if(!ja[Oa].checked&&'undefined'==typeof ta[Oa])continue}else U&&'input'==ja[Oa].tagName.toLowerCase()&&/^(radio)$/i.test(sb)&&console.debug('Radio: ',ja[Oa].id,ja[Oa].checked,ja[Oa].value);for(var eb in ta)if(/^_case_/.test(eb)&&'undefined'!=typeof ta[eb].conditions&&(!Array.isArray(ta[eb].conditions)||
|
|
590
|
-
ta[eb].conditions.length)&&'undefined'!=typeof ta[eb].conditions[0].rules&&'undefined'!=typeof ta[eb].conditions&&Array.isArray(ta[eb].conditions))if(
|
|
591
|
-
0,rb=ta[eb].conditions.length;
|
|
592
|
-
ka=new RegExp(ka,
|
|
593
|
-
'undefined'!=typeof ta[caseField]&&'undefined'!=typeof ta[caseField].isBoolean&&/^(true)$/i.test(ta[caseField].isBoolean)&&(sb=/^(true)$/i.test(sb)?!0:!1),'undefined'!=typeof ta[eb].conditions[
|
|
594
|
-
X)}}if(
|
|
595
|
-
typeof cb[Oa]||ja[Oa].disabled)
|
|
596
|
-
typeof X[Ib]&&'undefined'!=typeof ja[Ib]&&'undefined'!=typeof ja[Ib].value&&(X[Ib]=ja[Ib].value,U&&/(true|false)/i.test(X[Ib])&&('true'==X[Ib]?X[Ib]=!0:'false'==X[Ib]&&(X[Ib]=!1)),
|
|
597
|
-
'undefined'==typeof X[Eb]&&'undefined'!=typeof ja[Eb]&&'undefined'!=typeof ja[Eb].value&&(X[Eb]=ja[Eb].value,U&&/(true|false)/i.test(X[Eb])&&('true'==X[Eb]?X[Eb]=!0:'false'==X[Eb]&&(X[Eb]=!1)),
|
|
598
|
-
Ta[Oa].substr(0,Ta[Oa].length-1))}try{O=Ha(
|
|
599
|
-
data:O}}};U&&addListener(gina,l,m,function(Wa){Wa.preventDefault();if(!D){D=!0;
|
|
591
|
+
ta[eb].conditions.length)&&'undefined'!=typeof ta[eb].conditions[0].rules&&'undefined'!=typeof ta[eb].conditions&&Array.isArray(ta[eb].conditions))if(hb=eb.replace('_case_',''),'undefined'==typeof Bb[hb])console.warn('Found case `'+eb+'` but field `'+hb+'` is misssing in the dom.\n You should add `'+hb+'` element to your form in order to allow Validator to process this case.');else{'undefined'==typeof cb[hb]&&(cb[hb]=Bb[hb].value);sb=cb[hb];U&&('true'==X[Oa]?sb=!0:'false'==X[Oa]&&(sb=!1));for(var fb=
|
|
592
|
+
0,rb=ta[eb].conditions.length;fb<rb;++fb)if(!(Array.isArray(ta[eb].conditions[fb].case)&&-1==ta[eb].conditions[fb].case.indexOf(sb)||!Array.isArray(ta[eb].conditions[fb].case)&&ta[eb].conditions[fb].case!=sb))for(var kb in ta[eb].conditions[fb].rules)if(!/^_comment$/i.test(kb)&&kb!=hb&&ja[kb])if(Oa==kb||/^\//.test(kb)||'undefined'!=typeof X[kb]||'undefined'==typeof cb[kb])if(/^\//.test(kb)){if(ka=kb.match(/\/(.*)\//).pop(),wa=kb.replace('/'+ka+'/',''),ka=ka.replace(/\[/g,'\\[').replace(/\]/g,'\\]'),
|
|
593
|
+
ka=new RegExp(ka,wa),ka.test(Oa)){if(ta[eb].conditions[fb].case==sb||/^\//.test(ta[eb].conditions[fb].case)&&(new RegExp(ta[eb].conditions[fb].case)).test(sb))Mb='undefined'!=typeof ta[kb]?ta[kb]:{},ta[kb]=R(ta[eb].conditions[fb].rules[kb],Mb);hb!=kb&&'undefined'!=typeof ta[kb]&&pa(kb,ta,X)}}else'undefined'!=typeof ta[eb].conditions[fb].rules[kb]&&(caseField=kb,sb=X[caseField],'undefined'==typeof ja[caseField]?console.warn('ignoring case `'+caseField+'`: field `NaN'):(U&&/^(true|false)$/i.test(sb)&&
|
|
594
|
+
'undefined'!=typeof ta[caseField]&&'undefined'!=typeof ta[caseField].isBoolean&&/^(true)$/i.test(ta[caseField].isBoolean)&&(sb=/^(true)$/i.test(sb)?!0:!1),'undefined'!=typeof ta[eb].conditions[fb].rules[kb]&&(Mb='undefined'!=typeof ta[eb].conditions[fb].rules[kb]?ta[eb].conditions[fb].rules[kb]:{},ta[kb]=Mb),hb!=kb&&'undefined'!=typeof ta[kb]&&'undefined'!=typeof X[kb]&&pa(kb,ta,X)));else{X[kb]=cb[kb];var Mb='undefined'!=typeof ta[kb]?ta[kb]:{};ta[kb]=R(ta[eb].conditions[fb].rules[kb],Mb);pa(kb,ta,
|
|
595
|
+
X)}}if(hb!=Oa&&('undefined'!=typeof ta[Oa]&&pa(Oa,ta,cb),jb)){++Va;jb=ta['_case_'+Oa].conditions;if(!jb)throw Error('[ ginaFormValidator ] case `_case_'+Oa+'` found without `condition(s)` !\nPlease, check your delcaration for `_case_'+Oa+'`');for(let Kb=0,Zb=jb.length;Kb<Zb;++Kb)if(sb=cb[Oa],U&&('true'==X[Oa]?sb=!0:'false'==X[Oa]&&(sb=!1)),jb[Kb]['case']===sb||Array.isArray(jb[Kb]['case'])&&-1<jb[Kb]['case'].indexOf(sb)||/^\//.test(jb[Kb]['case'])){Mb={};if('undefined'==typeof jb[Kb].rules[Oa]&&'undefined'==
|
|
596
|
+
typeof cb[Oa]||ja[Oa].disabled)jb[Kb].rules[Oa]={exclude:!0};for(var Eb in jb[Kb].rules)if(!/^_comment$/i.test(Eb))if(/^\//.test(Eb)){ka=Eb.match(/\/(.*)\//).pop();wa=Eb.replace('/'+ka+'/','');ka=ka.replace(/\[/g,'\\[').replace(/\]/g,'\\]');ka=new RegExp(ka,wa);for(var Ib in ja)ka.test(Ib)&&(/^\//.test(jb[Kb]['case'])?(ka=jb[Kb]['case'].match(/\/(.*)\//).pop(),wa=jb[Kb]['case'].replace('/'+ka+'/',''),ka=new RegExp(ka,wa),ka.test(sb)&&(Mb[Ib]=jb[Kb].rules[Eb])):Mb[Ib]=jb[Kb].rules[Eb],'undefined'==
|
|
597
|
+
typeof X[Ib]&&'undefined'!=typeof ja[Ib]&&'undefined'!=typeof ja[Ib].value&&(X[Ib]=ja[Ib].value,U&&/(true|false)/i.test(X[Ib])&&('true'==X[Ib]?X[Ib]=!0:'false'==X[Ib]&&(X[Ib]=!1)),Ka.addField(Ib,X[Ib]),'undefined'!=typeof fa[Ib]&&(Mb[Ib]=R(Mb[Ib],fa[Ib]))))}else/^\//.test(jb[Kb]['case'])?(ka=jb[Kb]['case'].match(/\/(.*)\//).pop(),wa=jb[Kb]['case'].replace('/'+ka+'/',''),ka=ka.replace(/\[/g,'\\[').replace(/\]/g,'\\]'),ka=new RegExp(ka,wa),ka.test(sb)&&(Mb[Eb]=jb[Kb].rules[Eb])):Mb[Eb]=jb[Kb].rules[Eb],
|
|
598
|
+
'undefined'==typeof X[Eb]&&'undefined'!=typeof ja[Eb]&&'undefined'!=typeof ja[Eb].value&&(X[Eb]=ja[Eb].value,U&&/(true|false)/i.test(X[Eb])&&('true'==X[Eb]?X[Eb]=!0:'false'==X[Eb]&&(X[Eb]=!1)),Ka.addField(Eb,X[Eb]),'undefined'!=typeof fa[Eb]&&(Mb[Eb]=R(Mb[Eb],fa[Eb])));++aa;if(U)Hb(Wa,cb,fa,X,ja,Mb,Na,Va);else return Hb(Wa,cb,fa,X,ja,Mb,Na,Va)}--Va}}}--aa;if(0>=Va&&0>aa){cb=Ka.getErrors();for(Oa in cb){for(rule in cb[Oa])Ta[Oa]||(Ta[Oa]=''),0>Ta[Oa].indexOf(rule)&&(Ta[Oa]+=rule+' ');U&&ja[Oa].setAttribute('data-gina-form-errors',
|
|
599
|
+
Ta[Oa].substr(0,Ta[Oa].length-1))}try{O=Ha(Ka.toData()),N&&U&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&(gina.forms.validated||(gina.forms.validated={}),gina.forms.validated[p]||(gina.forms.validated[p]={}),window.ginaToolbar.update('forms',{id:p,validated:O}))}catch(Kb){throw Kb;}xa=!0;if(!D&&0>=H)if('undefined'!=typeof Na&&'function'===typeof Na)Na._errors=Ka.getErrors(),Na._data=Ka.toData(),triggerEvent(gina,Wa,'validated.'+p,Na);else return D=!0,{isValid:Ka.isValid,error:cb,
|
|
600
|
+
data:O}}};U&&addListener(gina,l,m,function(Wa){Wa.preventDefault();if(!D){D=!0;xa=!1;H=0;var cb=Wa.detail,fa=cb._data||Ka.toData(),X=cb._errors||Ka.getErrors()||null;console.debug('instance errors: ',v.$forms[p].errors,' VS cbErrors: ',X,Ka.isValid(),' VS d.getErrors(): ',Ka.getErrors());0<X.count()&&Ka.isValid()&&(Ka.isValid=function(){return!1});cb({isValid:Ka.isValid,error:X,data:Ha(fa)});removeListener(gina,Wa.target,'validated.'+Wa.target.id)}});if(U)Hb(l,Ab,$a,h,e,b,q,0);else return Hb(l,Ab,
|
|
600
601
|
$a,h,e,b,q,0)};return U?Qa(B):E(B,Q,V)}'undefined'!==typeof module&&module.exports?module.exports=ValidatorPlugin:'function'===typeof define&&define.amd&&define('gina/validator',['utils/events','utils/dom','utils/effects','utils/data','lib/form-validator'],function(){return ValidatorPlugin});
|
|
601
|
-
define('gina/toolbar','require jquery vendor/uuid lib/collection lib/routing gina/storage gina/validator'.split(' '),function(B){var Q=B('jquery');Q.noConflict();var V=B('lib/routing');B('lib/collection');var la=B('gina/storage');return function(){var U=null,N=!1,ha=!1,R=!1,S,u=(new la({bucket:'gina'})).Collection('plugin'),I=null,
|
|
602
|
+
define('gina/toolbar','require jquery vendor/uuid lib/collection lib/routing gina/storage gina/validator'.split(' '),function(B){var Q=B('jquery');Q.noConflict();var V=B('lib/routing');B('lib/collection');var la=B('gina/storage');return function(){var U=null,N=!1,ha=!1,R=!1,S,u=(new la({bucket:'gina'})).Collection('plugin'),I=null,v=null,za=!1,va=null,P=null,L=null,A=null,E=null,n='',y=null,z=null,F=null,w='',x=null,G=0,M=0,T=0,ra='',Ea={},W=null,ia=null,ea=null,Aa=null,ma=null,sa=null,Da=null,Qa=
|
|
602
603
|
null,Ja=null,Ia=null,Ha=null,mb=null,Fa=null,Pa=null,Ya=function(){I=Q('#gina-toolbar');if(!I.length)return!1;va=I.find('.gina-toolbar-tab > a');P=Q('#gina-toolbar-toggle');L=Q('#gina-toolbar-panels');A=L.find('.gina-toolbar-panel');y=Q('#gina-toolbar-vposition');z=Q('#gina-toolbar-hposition');F=y.add(z);x=Q('#gina-toolbar-width');I.find('.gina-toolbar-main');W=Q('#gina-toolbar-json');ia=Q('#gina-toolbar-gina-json');ea=Q('#gina-toolbar-toggle-code-raw');$forms=Q('form:not(.gina-toolbar-options, .gina-toolbar-content)');
|
|
603
|
-
Ja=Q('#gina-toolbar-data-html');Ia=Q('#gina-toolbar-view-html');Ha=Q('#gina-toolbar-forms-html');Qa=Q('#gina-toolbar-configuration-environment-html');mb=Q('#gina-toolbar-code-toggle');I.prepend('<textarea class="gina-toolbar-copy"></textarea>');Fa=I.find('.gina-toolbar-copy');
|
|
604
|
-
position:'top-right',width:'30',panelId:'#gina-toolbar-data',isCollapsed:!0,isUnfolded:[],debug:{forms:{active:!1,strategy:'frontend'}}},u.insert(
|
|
604
|
+
Ja=Q('#gina-toolbar-data-html');Ia=Q('#gina-toolbar-view-html');Ha=Q('#gina-toolbar-forms-html');Qa=Q('#gina-toolbar-configuration-environment-html');mb=Q('#gina-toolbar-code-toggle');I.prepend('<textarea class="gina-toolbar-copy"></textarea>');Fa=I.find('.gina-toolbar-copy');v=u.findOne({_name:'toolbar'});v||(v={_name:'toolbar',_version:'1.0.3',_description:'Toolbar settings',_licence:'MIT',_author:[{name:'Fabrice Delaneau',company:'Freelancer'},{name:'Martin-Luther Etouman',company:'Rhinostone'}],
|
|
605
|
+
position:'top-right',width:'30',panelId:'#gina-toolbar-data',isCollapsed:!0,isUnfolded:[],debug:{forms:{active:!1,strategy:'frontend'}}},u.insert(v),v=u.findOne({_name:'toolbar'}));'1.0.3'!=v._version&&('1.0.1'>v._version&&(v.isUnfolded||(v.isUnfolded=[]),void 0!=v.codeFolding&&delete v.codeFolding),'undefined'==typeof v.isUnfolded||Array.isArray(v.isUnfolded)||(v.isUnfolded=[]),v._version='1.0.3',v.save(!0));w=v.position;G=v.width;n=v.panelId;za=v.isCollapsed;I.removeClass('gina-toolbar-hidden');
|
|
605
606
|
qb()},pb=function(q,m,p){var O=null,D=null;try{D=W?W.text():'',''==D||'null'==D?W.text('{}'):(ma=JSON.parse(D),Da=JSON.parse(ia.text()),W.text(''),Aa||(Aa={jsonObject:JSON.clone(ma),ginaJsonObject:JSON.clone(Da)},sa={}))}catch(H){console.error('Could not load'+(q?' [ '+q+' ] ':' ')+'json\n'+H.message+'\n'+H.stack)}if(ma){m&&!p?(ma[q]||(ma[q]={}),ma[q]=Da[q]=m):'data-xhr'==q&&!m&&ma['data-xhr']?delete ma['data-xhr']:p&&(ma=m,Da=p);b(ma,'');Da.environment&&(delete Da.environment.routing,delete Da.environment.reverseRouting,
|
|
606
|
-
delete Da.environment.forms);ma.environment&&(delete ma.environment.routing,delete ma.environment.reverseRouting,delete ma.environment.forms);Qa.html(db(ma.environment,Da.environment));O=ma.data;var aa=ma.view;p=ma.forms;var
|
|
607
|
+
delete Da.environment.forms);ma.environment&&(delete ma.environment.routing,delete ma.environment.reverseRouting,delete ma.environment.forms);Qa.html(db(ma.environment,Da.environment));O=ma.data;var aa=ma.view;p=ma.forms;var xa=Da.data,ba=Da.view;D=Da.forms;ha=S=!1;var oa=null,Ba=!1;/^(view-xhr)$/.test(q)&&(oa=!0,aa=ma[q],ba=Da[q],O=ma['data-xhr'],xa=Da['data-xhr']);if(!q||/^(data)$/.test(q))Ja.html('<ul class="gina-toolbar-code">'+db(O,xa,null,oa)+'</ul>'),Ia.html('<div id="gina-toolbar-view-html-properties" class="gina-toolbar-section">\n <h2 class="gina-toolbar-section-title">properties</h2>\n <ul class="gina-toolbar-properties"></ul>\n</div>'),
|
|
607
608
|
Ia.html(Ub(aa,ba,null,oa,Ia)),O=$forms,Ha.html(''),Ha.html(ca(p,D,Ha,0,O,O.length,oa)),Ha.find('div.gina-toolbar-section > h2').off('click').on('click',function(H){H.preventDefault();Q(this).parent().find('ul').first().slideToggle()});if(/^(data-xhr|view-xhr)$/.test(q)){if('undefined'==typeof ma[q]||!ma[q]||'null'==ma[q])return!1;oa=!0;Ba='undefined'!=typeof ma[q].isXHRViewData?!0:Ba;Ba||/^(view-xhr)$/.test(q)||'undefined'==typeof ma['el-xhr']||(sa.data=JSON.clone(ma[q]));Ba&&delete ma[q].isXHRViewData;
|
|
608
609
|
/^(data-xhr)$/.test(q)?Ja.html('<ul class="gina-toolbar-code">'+db(ma[q],Da[q],null,oa)+'</ul>'):/^(view-xhr)$/.test(q)&&(Ia.html('<div id="gina-toolbar-view-html-properties" class="gina-toolbar-section">\n <h2 class="gina-toolbar-section-title">properties</h2>\n <ul class="gina-toolbar-properties"></ul>\n</div>'),Ia.html(Ub(ma[q],Da[q],null,oa,Ia)))}/^(el-xhr)$/.test(q)&&(oa=!0,O=Q('#'+m).find('form:not(.gina-toolbar-options, .gina-toolbar-content)'),Ha.html(''),Ha.html(ca(p,D,Ha,0,O,O.length,
|
|
609
610
|
oa)),Ha.find('div.gina-toolbar-section > h2').off('click').on('click',function(H){H.preventDefault();Q(this).parent().find('ul').first().slideToggle()}));/^(forms)$/.test(q)&&(ha=oa=!0,Q('#gina-toolbar-form-'+m.id).length||(O=$forms,Ha.html(''),Ha.html(ca(p,D,Ha,0,O,O.length,oa)),Ha.find('div.gina-toolbar-section > h2').off('click').on('click',function(H){H.preventDefault();Q(this).parent().find('ul').first().slideToggle()})),'undefined'!=typeof m.rules&&l(m.id,'rules',m.rules,oa),'undefined'!=typeof m.errors&&
|
|
610
|
-
0<m.errors.count()&&l(m.id,'errors',m.errors,oa),'undefined'!=typeof m.sent&&l(m.id,'sent',m.sent,oa));
|
|
611
|
-
|
|
611
|
+
0<m.errors.count()&&l(m.id,'errors',m.errors,oa),'undefined'!=typeof m.sent&&l(m.id,'sent',m.sent,oa));v.currentFile=ma.file;v.currentFile||(v.currentFile=ma.file);ma.file==v.currentFile&&Q(document).ready(function(){ha?(N=!0,0<v.isUnfolded.length&&!S&&(S=!0,setTimeout(function(){0<v.isUnfolded.length&&bb(v.isUnfolded,v.isUnfolded.length,0)},200))):oa?(N=!0,0<v.isUnfolded.length&&!S&&(S=!0,bb(v.isUnfolded,v.isUnfolded.length,0))):(N=!1,setTimeout(function(){0<v.isUnfolded.length&&bb(v.isUnfolded,
|
|
612
|
+
v.isUnfolded.length,0)},200))})}if(!q||'el-xhr'==q&&!R)R=q&&'el-xhr'==q?!0:!1,pc(q)},bb=function(q,m,p){if(p==m)return!1;var O=q[p],D=null;N&&/^xhr-/.test(O)?(O=O.replace(/^xhr-/,''),D=Q('.gina-toolbar-xhr-folding-state-'+O)):D=Q('.gina-toolbar-folding-state-'+O);xb(D,function(){p+=1;bb(q,m,p)})},qb=function(){Ja.add(Ia).off('click','a').on('click','a',function(m){m.preventDefault();xb(Q(this),null,!0)}).add(Ha).off('click','a').on('click','a',function(m){m.preventDefault();xb(Q(this),null,!0)});
|
|
612
613
|
Qa.add(Ia).off('click','a').on('click','a',function(m){m.preventDefault();xb(Q(this),null,!0)}).add(Ha).off('click','a').on('click','a',function(m){m.preventDefault();xb(Q(this),null,!0)});mb.off('click').on('click',function(m){m.preventDefault();xb('all',null,!0)});Ja.add(Ia,Ha).off('click','.gina-toolbar-value').on('click','.gina-toolbar-value',function(m){m.preventDefault();try{Pa=Q(this).text(),Fa.text(Pa),Fa.select(),document.execCommand('copy',!1,null),Fa.blur()}catch(p){alert('Please press Ctrl/Cmd+C to copy the value')}});
|
|
613
|
-
ea.off('click').on('click',function(m){ma&&window.open('','JSON RAW','width=400,height=100').document.write(JSON.stringify(ma.data))});va.off('click').on('click',function(m){m.preventDefault();va.removeClass('gina-toolbar-active');A.removeClass('gina-toolbar-active');Q(this).addClass('gina-toolbar-active');n=Q(this).attr('href');E=Q(n).addClass('gina-toolbar-active');
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
ea.off('click').on('click',function(m){ma&&window.open('','JSON RAW','width=400,height=100').document.write(JSON.stringify(ma.data))});va.off('click').on('click',function(m){m.preventDefault();va.removeClass('gina-toolbar-active');A.removeClass('gina-toolbar-active');Q(this).addClass('gina-toolbar-active');n=Q(this).attr('href');E=Q(n).addClass('gina-toolbar-active');v.panelId=n;v.save()});P.off('click').on('click',function(m){m.preventDefault();I.toggleClass('gina-toolbar-collapsed');za=I.hasClass('gina-toolbar-collapsed');
|
|
615
|
+
v.isCollapsed=za;v.save()});F.off('change').on('change',function(m){m.preventDefault();m=y.val();var p=z.val();w=m+'-'+p;Vb(w);v.position=w;v.save()});x.off('change').on('change',function(m){m.preventDefault();G=x.val();wb(G);v.width=G;v.save()});Q(window).off('resize').on('resize',function(){nb()});Q('body').off('keypress').on('keypress',function(m){if(!/INPUT|TEXTAREA/.test(m.target.tagName)){ra=m.keyCode?m.keyCode:m.which?m.which:m.charCode;m=new Date;if('undefined'!=typeof Ea.keynum&&Ea.keynum==
|
|
616
|
+
ra&&'undefined'!=typeof Ea.pressTime&&500>m.getTime()-Ea.pressTime)switch(ra){case 103:I.toggle()}Ea.pressTime=m.getTime();Ea.keynum=ra}});va.filter('[href="'+n+'"]').trigger('click');za||Q('#gina-toolbar-toggle').trigger('click');Vb(w);var q=w.split('-');y.val(q[0]);z.val(q[1]);wb(G);x.val(G);nb();q=W?W.text():'';/^\{\{ (.*) \}\}/.test(q)?e(q,pb):pb()},Vb=function(q){I.removeClass('gina-toolbar-top-left gina-toolbar-top-right gina-toolbar-bottom-left gina-toolbar-bottom-right').addClass('gina-toolbar-'+
|
|
616
617
|
q)},wb=function(q){I.removeClass('gina-toolbar-auto gina-toolbar-100 gina-toolbar-80 gina-toolbar-60 gina-toolbar-50 gina-toolbar-40 gina-toolbar-30').addClass('gina-toolbar-'+q)},nb=function(){M=window.innerHeight-32;I.find('.gina-toolbar-main').css('max-height',M+'px');var q=E.find('.gina-toolbar-main'),m=q.find('.gina-toolbar-content');T=q.height();T==M?m.addClass('gina-toolbar-content-end'):m.removeClass('gina-toolbar-content-end')},xb=function(q,m,p){'undefined'==typeof p&&(p=!1);if(void 0!=
|
|
617
|
-
q&&q.length&&'all'!=q){U=q.attr('class');var O=!1;if(/(gina-toolbar-folding-state-[a-z 0-9_-]+|gina-toolbar-xhr-folding-state-[a-z 0-9_-]+)/i.test(U))if(/gina-toolbar-folding-state-[a-z0-9_-]+/i.test(U)?U=U.match(/gina-toolbar-folding-state-[a-z0-9_-]+/i)[0].replace(/gina-toolbar-folding-state-/,''):(O=!0,'undefined'!=typeof U&&(U=U.match(/gina-toolbar-xhr-folding-state-[a-z0-9_-]+/i)[0].replace(/gina-toolbar-xhr-folding-state-/,'xhr-'))),0>
|
|
618
|
-
(q.addClass('gina-toolbar-unfolded'),q.next('ul').slideToggle('fast'));else if(-1<
|
|
619
|
-
null!=m&&m()},yb=function(q){var m={},p=null,O=[],D=0;for(p in q)q.hasOwnProperty(p)&&(O[D]=p,++D);var aa=O.length;O.sort();for(D=0;D<aa;++D)p=O[D],m[p]=q[p];return m},
|
|
620
|
-
m,p,O,D){var aa='';p='undefined'!=typeof p&&null!=p?p.replace(/[^A-Za-z0-9_-]/g,'_'):'';var
|
|
621
|
-
ba+'-folding-state-'+
|
|
618
|
+
q&&q.length&&'all'!=q){U=q.attr('class');var O=!1;if(/(gina-toolbar-folding-state-[a-z 0-9_-]+|gina-toolbar-xhr-folding-state-[a-z 0-9_-]+)/i.test(U))if(/gina-toolbar-folding-state-[a-z0-9_-]+/i.test(U)?U=U.match(/gina-toolbar-folding-state-[a-z0-9_-]+/i)[0].replace(/gina-toolbar-folding-state-/,''):(O=!0,'undefined'!=typeof U&&(U=U.match(/gina-toolbar-xhr-folding-state-[a-z0-9_-]+/i)[0].replace(/gina-toolbar-xhr-folding-state-/,'xhr-'))),0>v.isUnfolded.indexOf(U))v.isUnfolded.push(U),v.save(),q.hasClass('gina-toolbar-unfolded')||
|
|
619
|
+
(q.addClass('gina-toolbar-unfolded'),q.next('ul').slideToggle('fast'));else if(-1<v.isUnfolded.indexOf(U)&&q.hasClass('gina-toolbar-unfolded')){for(var D=new RegExp('^('+U+')'),aa=0,xa=v.isUnfolded.length;aa<xa;++aa)D.test(v.isUnfolded[aa])&&(!ha&&p||ha&&O||p)&&(v.isUnfolded.splice(aa,1),--aa);v.save(!0);0>v.isUnfolded.indexOf(U)&&(q.removeClass('gina-toolbar-unfolded'),q.next('ul').slideToggle('fast'))}else q.addClass('gina-toolbar-unfolded'),q.next('ul').slideToggle('fast')}'undefined'!=typeof m&&
|
|
620
|
+
null!=m&&m()},yb=function(q){var m={},p=null,O=[],D=0;for(p in q)q.hasOwnProperty(p)&&(O[D]=p,++D);var aa=O.length;O.sort();for(D=0;D<aa;++D)p=O[D],m[p]=q[p];return m},La=function(q,m){var p='';if('undefined'!=typeof q&&''!=q){var O=q;'string'==typeof q&&(O=q.replace(/(\]\[|\[)/g,'-').replace(/\]/,'').replace(/[^A-Za-z0-9_-]/g,'_'));p+=O+'-'}'undefined'!=typeof m&&''!=m?(q=m,'string'==typeof m&&(q=m.replace(/(\]\[|\[)/g,'-').replace(/\]/,'')),p+=q):p=p.substr(0,p.length-1);return p.trim()},db=function(q,
|
|
621
|
+
m,p,O,D){var aa='';p='undefined'!=typeof p&&null!=p?p.replace(/[^A-Za-z0-9_-]/g,'_'):'';var xa='undefined'!=typeof D&&null!=D?D:'',ba='undefined'!=typeof O&&null!=O?'-xhr':'';if(q){q=yb(q);m=yb(m);for(var oa in q)if('object'!=typeof q[oa]||Array.isArray(q[oa])||null===q[oa])if(Array.isArray(q[oa])){p+='-'+oa.replace(/[^A-Za-z0-9_-]/g,'_');var Ba=0<q[oa].length||'undefined'!=typeof m[oa]&&0<m[oa].length?'':' is-empty';aa+='<li class="gina-toolbar-collection">';aa+='<a href="#" class="gina-toolbar-key gina-toolbar'+
|
|
622
|
+
ba+'-folding-state-'+La(xa,oa.replace(/[^A-Za-z0-9_-]/g,'_'))+Ba+'">'+oa+' <span>['+q[oa].length+']</span></a>';aa+='<ul class="gina-toolbar-collection">'+Gb(q[oa],m[oa],p,O,D)+'</ul>';aa+='</li>';p=p.substr(0,p.length-oa.length)}else Ba=null===m[oa]?'null':typeof m[oa],'undefined'==Ba?(aa+='<li class="gina-toolbar-key-value">',aa+='<span class="gina-toolbar-key gina-toolbar-key-added">'+oa+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+Ba+'">'+q[oa]+'</span>'):(q[oa]!==m[oa]&&
|
|
622
623
|
(aa+='<li class="gina-toolbar-key-value gina-toolbar-is-overridden">',aa+='<span class="gina-toolbar-key">'+oa+':</span> <span class="gina-toolbar-value">'+m[oa]+'</span>',aa+='</li>'),aa+='<li class="gina-toolbar-key-value">',aa+='<span class="gina-toolbar-key">'+oa+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+Ba+'">'+q[oa]+'</span>'),aa+='</li>';else p+='-'+oa.replace(/[^A-Za-z0-9_-]/g,'_'),Ba=0<q[oa].count()||'undefined'!=typeof m[oa]&&0<m[oa].count()?'':' is-empty',aa+=
|
|
623
|
-
'<li class="gina-toolbar-object">',aa+='<a href="#" class="gina-toolbar-key gina-toolbar'+ba+'-folding-state-'+
|
|
624
|
-
Ba;++oa)'object'!=typeof q[oa]||Array.isArray(q[oa])?Array.isArray(q[oa])?(p+='-'+oa,''==
|
|
625
|
-
q[oa]+'</span></li>':(m[oa]||(m[oa]=q[oa]),p+='-'+oa,''==
|
|
626
|
-
D;for(var ba in q){var oa=ba;if('object'!=typeof q[ba]||Array.isArray(q[ba])||null===q[ba])if(Array.isArray(q[ba])){var Ba=Q('#gina-toolbar-view-'+p.substr(0,p.length-1));var H=Ba.length?!0:!1;!H||/^html/.test(p)?(Ba=Q('.'+p),H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.append('<li class="gina-toolbar-collection"><a href="#" class="gina-toolbar-key gina-toolbar'+
|
|
627
|
-
m[ba],H,Ba.find('li ul.'+p.substr(0,p.length-1)),oa)+'</ul></li>')):(H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.find('li.'+p.substr(0,p.length-1)+' ul').append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+
|
|
624
|
+
'<li class="gina-toolbar-object">',aa+='<a href="#" class="gina-toolbar-key gina-toolbar'+ba+'-folding-state-'+La(xa,oa.replace(/[^A-Za-z0-9_-]/g,'_'))+Ba+'">'+oa+' <span>{ }</span></a>',aa+='<ul class="gina-toolbar-object">'+db(q[oa],m[oa],p,O,D)+'</ul>',aa+='</li>',p=p.substr(0,p.length-oa.length);return aa}},Gb=function(q,m,p,O,D){var aa='';p='undefined'!=typeof p&&null!=p?p:'';var xa='undefined'!=typeof D&&null!=D?D:'',ba='undefined'!=typeof O&&null!=O?'-xhr':'';m||=[];for(var oa=0,Ba=q.length;oa<
|
|
625
|
+
Ba;++oa)'object'!=typeof q[oa]||Array.isArray(q[oa])?Array.isArray(q[oa])?(p+='-'+oa,''==xa&&(xa=p),aa+='<li class="gina-toolbar-collection">',aa+='<a href="#" class="gina-toolbar-key gina-toolbar'+ba+'-folding-state-'+La(xa,oa)+'">'+oa+'<span>[ ]</span></a>',aa+='<ul class="gina-toolbar-collection">'+Gb(q[oa],m[oa],p,O,D)+'</ul>',aa+='</li>',p=p.substr(0,p.length-oa.toString().length)):aa+='<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+oa+':</span> <span class="gina-toolbar-value">'+
|
|
626
|
+
q[oa]+'</span></li>':(m[oa]||(m[oa]=q[oa]),p+='-'+oa,''==xa&&(xa=p),aa+='<li class="gina-toolbar-object">',aa+='<a href="#" class="gina-toolbar-key gina-toolbar'+ba+'-folding-state-'+La(xa,oa)+'">'+oa+' <span>{ }</span></a>',aa+='<ul class="gina-toolbar-object">'+db(q[oa],m[oa],p,O,D)+'</ul>',aa+='</li>',p=p.substr(0,p.length-oa.toString().length-1));return aa},Ub=function(q,m,p,O,D,aa){p=null!=p?p.replace(/[^A-Za-z0-9_-]/g,'_'):'';var xa='undefined'!=typeof O&&null!=O?'-xhr':'';q=yb(q);m=yb(m);aa||=
|
|
627
|
+
D;for(var ba in q){var oa=ba;if('object'!=typeof q[ba]||Array.isArray(q[ba])||null===q[ba])if(Array.isArray(q[ba])){var Ba=Q('#gina-toolbar-view-'+p.substr(0,p.length-1));var H=Ba.length?!0:!1;!H||/^html/.test(p)?(Ba=Q('.'+p),H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.append('<li class="gina-toolbar-collection"><a href="#" class="gina-toolbar-key gina-toolbar'+xa+'-folding-state-'+La(ba.replace(/[^A-Za-z0-9_-]/g,'_'),H.substr(0,H.length-1))+'">'+ba+' <span>['+q[ba].length+']</span></a><ul> '+Gb(q[ba],
|
|
628
|
+
m[ba],H,Ba.find('li ul.'+p.substr(0,p.length-1)),oa)+'</ul></li>')):(H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.find('li.'+p.substr(0,p.length-1)+' ul').append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+xa+'-folding-state-'+La(ba.replace(/[^A-Za-z0-9_-]/g,'_'),H.substr(0,H.length-1))+'">'+ba+' <span>['+q[ba].length+']</span></a><ul>'+Gb(q[ba],m[ba],H,Ba.find('li ul.'+p.substr(0,p.length-1)),oa)+'</ul></li>'));p+=ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-';p=p.substr(0,
|
|
628
629
|
p.length-ba.length-1)}else if(oa=null===m[ba]?'null':typeof m[ba],'undefined'==oa)/\-$/.test(p)&&(p=p.substr(0,p.length-1)),p&&D.find('ul.'+p).append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key gina-toolbar-key-added">'+ba+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+oa+'">'+q[ba]+'</span></li>');else if(q[ba]!==m[ba]){p||(p+=ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-');try{D.find('ul.'+p).append('<li class="gina-toolbar-key-value gina-toolbar-is-overridden"><span class="gina-toolbar-key">'+
|
|
629
630
|
ba+':</span> <span class="gina-toolbar-value">'+m[ba]+'</span></li>'),D.find('ul.'+p).append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ba+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+oa+'">'+q[ba]+'</span></li>')}catch(ka){throw Error('GinaToolbarError: `ul.'+p+'` not found');}}else!p||/^html\-properties/.test(p)?aa.find('.gina-toolbar-properties').append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ba+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+
|
|
630
|
-
oa+'">'+q[ba]+'</span></li>'):aa.find('ul.'+p.substr(0,p.length-1)).append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ba+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+oa+'">'+q[ba]+'</span></li>');else Ba=Q('#gina-toolbar-view-'+p.substr(0,p.length-1)),(H=Ba.length?!0:!1)?(H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.find('ul.'+p.substr(0,p.length-1)).append('<li class="gina-toolbar-object"><a href="#" class="gina-toolbar-key gina-toolbar'+
|
|
631
|
-
|
|
631
|
+
oa+'">'+q[ba]+'</span></li>'):aa.find('ul.'+p.substr(0,p.length-1)).append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ba+':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+oa+'">'+q[ba]+'</span></li>');else Ba=Q('#gina-toolbar-view-'+p.substr(0,p.length-1)),(H=Ba.length?!0:!1)?(H=p+ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-',Ba.find('ul.'+p.substr(0,p.length-1)).append('<li class="gina-toolbar-object"><a href="#" class="gina-toolbar-key gina-toolbar'+xa+'-folding-state-'+
|
|
632
|
+
La(ba.replace(/[^A-Za-z0-9_-]/g,'_'),H.substr(0,H.length-1))+'">'+ba+' <span>{ }</span></a><ul class="gina-toolbar-object '+H.substr(0,H.length-1)+'"></ul></li>'),Ub(q[ba],m[ba],H,O,Ba.find('ul.'+p.substr(0,p.length-1)),aa),p+=ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-'):(p+=ba.replace(/[^A-Za-z0-9_-]/g,'_')+'-','params'==ba?(oa='<div id="gina-toolbar-view-'+p.substr(0,p.length-1)+'" class="gina-toolbar-section"><h2 class="gina-toolbar-section-title">'+p.substr(0,p.length-1)+'</h2><ul class="'+p.substr(0,
|
|
632
633
|
p.length-1)+'"></ul></div>',Q('#gina-toolbar-view-html-properties').before(oa)):/^html/.test(p)||(oa='<div id="gina-toolbar-view-'+p.substr(0,p.length-1)+'" class="gina-toolbar-section"><h2 class="gina-toolbar-section-title">'+p.substr(0,p.length-1)+'</h2><ul class="'+p.substr(0,p.length-1)+'"></ul></div>',D.append(oa)),Ub(q[ba],m[ba],p,O,D.find('ul.'+p.substr(0,p.length-1)),aa)),p=p.substr(0,p.length-ba.length-1)}return aa.html()},pc=function(q){q=gina.hasPopinHandler?gina.popin.getActivePopin():
|
|
633
|
-
null;var m,p=(gina.hasPopinHandler?Q('#'+q.id):Q('body')).html().match(/404:\[(.+)\](.+)@(.+)"/gm);if(p){var O=0;for(m=p.length;O<m;++O){q=p[O].replace(/"(.*)|"/g,'');var D=q.match(/\[(.*)\]/g,'')[0].replace(/\[|\]/g,'');V.getRouteByUrl(q,D)}}fLen=V.notFound.count();if(0<fLen)for(f in V.notFound)console.warn('(x'+V.notFound[f].count+') '+f+' => '+V.notFound[f].message)},ca=function(q,m,p,O,D,aa,
|
|
634
|
-
Ba+'" class="gina-toolbar-section"><h2 class="gina-toolbar-section-title">'+Ba+'</h2><ul class="gina-toolbar-section-content gina-toolbar-code" style="display: none;"><li class="gina-toolbar-form-attributes"><h3 class="gina-toolbar-sub-section-title">'+'gina-toolbar-form-attributes'.replace(/gina-toolbar-form-/,'')+'</h3><ul class="gina-toolbar-code"></ul></li></ul></div>'),ka,
|
|
635
|
-
/\s+/.test(
|
|
636
|
-
(
|
|
637
|
-
ka+':</span><span class="gina-toolbar-value">'+
|
|
638
|
-
|
|
639
|
-
Ba.replace(/-/g,'.'))}catch($a){}ba&&(oa='rules',H.find('ul.gina-toolbar-section-content').append('<li class="gina-toolbar-form-'+oa+'"><h3 class="gina-toolbar-sub-section-title">'+oa+'</h3><ul class="gina-toolbar-properties">'+db(ba,ba,Ba,
|
|
634
|
+
null;var m,p=(gina.hasPopinHandler?Q('#'+q.id):Q('body')).html().match(/404:\[(.+)\](.+)@(.+)"/gm);if(p){var O=0;for(m=p.length;O<m;++O){q=p[O].replace(/"(.*)|"/g,'');var D=q.match(/\[(.*)\]/g,'')[0].replace(/\[|\]/g,'');V.getRouteByUrl(q,D)}}fLen=V.notFound.count();if(0<fLen)for(f in V.notFound)console.warn('(x'+V.notFound[f].count+') '+f+' => '+V.notFound[f].message)},ca=function(q,m,p,O,D,aa,xa){if(!aa)return!1;for(var ba=D[O].attributes,oa,Ba=D[O].getAttribute('id')||D[O].id,H=Q('<div id="gina-toolbar-form-'+
|
|
635
|
+
Ba+'" class="gina-toolbar-section"><h2 class="gina-toolbar-section-title">'+Ba+'</h2><ul class="gina-toolbar-section-content gina-toolbar-code" style="display: none;"><li class="gina-toolbar-form-attributes"><h3 class="gina-toolbar-sub-section-title">'+'gina-toolbar-form-attributes'.replace(/gina-toolbar-form-/,'')+'</h3><ul class="gina-toolbar-code"></ul></li></ul></div>'),ka,wa,Y=null,pa=0,Ka=ba.length;pa<Ka;++pa)ka=ba[pa].name,wa=ba[pa].nodeValue,/^method$/.test(ka)&&(wa=wa.toUpperCase()),/^class$/.test(ka)&&
|
|
636
|
+
/\s+/.test(wa)&&(wa='<ul><li>'+wa.replace(/\s+/g,'</li><li>')+'</li></ul>'),/^action$/.test(ka)&&((oa='undefined'!=typeof ba.method?ba.method.nodeValue:null)||console.warn('[ ToolbarFormHelper::UndefinedMethod : form `'+(Ba||void 0)+'` method attribute cannot be left undefined !'),oa=V.getRouteByUrl(wa,oa),'undefined'!=typeof oa&&oa||(oa={name:'not found',namespace:'not found',param:{control:'not found',file:'not found'}}),wa='<ul><li><span class="gina-toolbar-key">url</span><span class="gina-toolbar-value">'+
|
|
637
|
+
(wa||'#')+'</span></li><li><span class="gina-toolbar-key">route</span><span class="gina-toolbar-value">'+oa.name+'</span></li><li><span class="gina-toolbar-key">namespace</span><span class="gina-toolbar-value">'+(oa.namespace||'root controller')+'</span></li><li><span class="gina-toolbar-key">control</span><span class="gina-toolbar-value">'+oa.param.control+'</span></li><li><span class="gina-toolbar-key">file</span><span class="gina-toolbar-value">'+oa.param.file+'</span></li><ul>',Y='<li><span class="gina-toolbar-key">'+
|
|
638
|
+
ka+':</span><span class="gina-toolbar-value">'+wa+'</span></li>'),/^data-gina-form-event/.test(ka)?(oa='events',Y=H.find('.gina-toolbar-form-attributes').find('.gina-toolbar-key-events').length?!0:!1,ka=ka.replace(/^data-gina-form-event-/,''),Y||H.find('ul.gina-toolbar-section-content').append('<li class="gina-toolbar-form-'+oa+'"><h3 class="gina-toolbar-sub-section-title">'+oa+'</h3><ul class="gina-toolbar-code"></ul></li>'),Y='<li><span class="gina-toolbar-key">'+ka+':</span><span class="gina-toolbar-value">'+
|
|
639
|
+
wa+'</span></li>',H.find('ul.gina-toolbar-section-content').find('li.gina-toolbar-form-'+oa+' > ul').append(Y)):(/^action$/.test(ka)||(Y='<li><span class="gina-toolbar-key">'+ka+':</span><span class="gina-toolbar-value">'+wa+'</span></li>'),H.find('ul.gina-toolbar-section-content').find('li.gina-toolbar-form-attributes > ul').append(Y));ba=null;try{var Ta=D[O].getAttribute('data-gina-form-rule');ba='undefined'!=typeof Ta&&null!=Ta?eval('gina.forms.rules.'+Ta.replace(/-/g,'.')):eval('gina.forms.rules.'+
|
|
640
|
+
Ba.replace(/-/g,'.'))}catch($a){}ba&&(oa='rules',H.find('ul.gina-toolbar-section-content').append('<li class="gina-toolbar-form-'+oa+'"><h3 class="gina-toolbar-sub-section-title">'+oa+'</h3><ul class="gina-toolbar-properties">'+db(ba,ba,Ba,xa,oa)+'</ul></li>'));p.append(H);++O;O<aa&&ca(q,m,p,O,D,aa,xa)},l=function(q,m,p,O){var D=Q('#gina-toolbar-form-'+q);$section=D.find('ul.gina-toolbar-section-content').find('li.gina-toolbar-form-'+m+'> ul');if(0<$section.length){if(0==p.count())return D.find('ul.gina-toolbar-section-content').find('li.gina-toolbar-form-'+
|
|
640
641
|
m).remove(),!1;$section.html(db(p,p,q,O,m))}else D.find('ul.gina-toolbar-section-content').append('<li class="gina-toolbar-form-'+m+'"><h3 class="gina-toolbar-sub-section-title">'+m+'</h3><ul class="gina-toolbar-properties">'+db(p,p,q,O,m)+'</ul></li>');q=D.find('ul.gina-toolbar-section-content');q.is(':visible')||q.slideToggle()},h=function(q,m){return q='<label class="gina-toolbar-input-file"><input type="file" multiple id="'+(q+'">')+m+'</label>'},e=function(q,m){q=h('mock','Select your JSON file');
|
|
641
|
-
Ja.html(q);W.text('');Ja.find('input').off('change').on('change',function(p){var O=Q(this)[0].files,D=p=null;if(1==O.length)p=Q(this)[0].files[0],D=new FileReader,D.addEventListener('load',function(){W.text(D.result);ia.text(D.result);m()},!1),D.readAsBinaryString(p);else{var aa=0;D=[];for(var
|
|
642
|
-
break;case /gina/.test(p.name):D[
|
|
642
|
+
Ja.html(q);W.text('');Ja.find('input').off('change').on('change',function(p){var O=Q(this)[0].files,D=p=null;if(1==O.length)p=Q(this)[0].files[0],D=new FileReader,D.addEventListener('load',function(){W.text(D.result);ia.text(D.result);m()},!1),D.readAsBinaryString(p);else{var aa=0;D=[];for(var xa=0,ba=O.length;xa<ba;++xa)switch(p=O[xa],!0){case /user/.test(p.name):D[xa]=new FileReader;D[xa].addEventListener('load',function(oa){W.text(oa.currentTarget.result);++aa;aa==O.length&&m()},!1);D[xa].readAsBinaryString(p);
|
|
643
|
+
break;case /gina/.test(p.name):D[xa]=new FileReader,D[xa].addEventListener('load',function(oa){ia.text(oa.currentTarget.result);++aa;aa==O.length&&m()},!1),D[xa].readAsBinaryString(p)}}});return!1},b=function(q,m){for(var p in q)'object'==typeof q[p]&&b(q[p],m+p+'-')};this.update=function(q,m){pb(q,m)};this.restore=function(){sa&&'undefined'!=typeof sa.data&&(Aa.jsonObject.data=sa.data);pb('data',Aa.jsonObject,Aa.ginaJsonObject);R=!1;V.notFound={}};if('undefined'!=typeof gina.validator)gina.validator.on('initialized',
|
|
643
644
|
function(){console.log('toolbar validator ready');Ya()});else Ya()}});
|
|
644
645
|
define('gina','require vendor/uuid lib/merge utils/events helpers/prototypes helpers/dateFormat gina/toolbar'.split(' '),function(B){B('utils/events');var Q=B('lib/merge'),V=B('helpers/dateFormat')();B('helpers/prototypes')({dateFormat:V});var la=B('vendor/uuid');window.process||function(U,N,ha,R,S,u,I){for(u=U[ha]||(U[ha]={});!I&&S<R.length;)I=U[R[S++]+'requestAnimationFrame'];u[N]=u[N]||I&&I.bind(U)||U.setImmediate||U.setTimeout}(window,'nextTick','process',['r','webkitR','mozR','msR','oR'],0);
|
|
645
646
|
window.getComputedStyle||(window.getComputedStyle=function(U,N){this.el=U;this.getPropertyValue=function(ha){var R=/(\-([a-z]){1})/g;'float'==ha&&(ha='styleFloat');R.test(ha)&&(ha=ha.replace(R,function(S,u,I){return I.toUpperCase()}));return U.currentStyle[ha]?U.currentStyle[ha]:null};return this});return function(U){this.plugin='gina';var N='gina-'+la.v1(),ha=document,R;document.id=N;N={id:N,isFrameworkLoaded:!1,hasValidator:!1,hasPopinHandler:!1,config:{},session:null,registeredEvents:{},events:{},
|
|
@@ -649,15 +650,15 @@ if('object'!=typeof m)break a;throw new TypeError('@@toPrimitive must return a p
|
|
|
649
650
|
Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},la(ca)}function U(ca,l){ca.prototype=Object.create(l.prototype);ca.prototype.constructor=ca;ha(ca,l)}function N(){try{var ca=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(l){}return(N=function(){return!!ca})()}function ha(ca,l){return ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,e){return h.__proto__=e,h},ha(ca,l)}function R(ca){return R=
|
|
650
651
|
'function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&'function'==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?'symbol':typeof l},R(ca)}function S(ca){var l='function'==typeof Map?new Map:void 0;return S=function(h){function e(){return function(b,q,m){if(N())return Reflect.construct.apply(null,arguments);var p=[null];p.push.apply(p,q);p=new (b.bind.apply(b,p));return m&&ha(p,m.prototype),p}(h,arguments,la(this).constructor)}if(null===
|
|
651
652
|
h||!function(b){try{return-1!==Function.toString.call(b).indexOf('[native code]')}catch(q){return'function'==typeof b}}(h))return h;if('function'!=typeof h)throw new TypeError('Super expression must either be null or a function');if(void 0!==l){if(l.has(h))return l.get(h);l.set(h,e)}return e.prototype=Object.create(h.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),ha(e,h)},S(ca)}function u(ca){return ca instanceof Uint8Array?ca:ca instanceof ArrayBuffer?new Uint8Array(ca):
|
|
652
|
-
new Uint8Array(ca.buffer,ca.byteOffset,ca.byteLength)}function I(){return new TransformStream({transform:function(ca,l){!function(h,e){M&&h.data instanceof Blob?h.data.arrayBuffer().then(u).then(e):T&&(h.data instanceof ArrayBuffer||
|
|
653
|
-
q.setUint16(1,e)}else b=new Uint8Array(9),q=new DataView(b.buffer),q.setUint8(0,127),q.setBigUint64(1,BigInt(e));ca.data&&'string'!=typeof ca.data&&(b[0]|=128);l.enqueue(b);l.enqueue(h)})}})}function
|
|
653
|
+
new Uint8Array(ca.buffer,ca.byteOffset,ca.byteLength)}function I(){return new TransformStream({transform:function(ca,l){!function(h,e){M&&h.data instanceof Blob?h.data.arrayBuffer().then(u).then(e):T&&(h.data instanceof ArrayBuffer||ra(h.data))?e(u(h.data)):Ea(h,!1,function(b){x||=new TextEncoder;e(x.encode(b))})}(ca,function(h){var e=h.length;if(126>e){var b=new Uint8Array(1);(new DataView(b.buffer)).setUint8(0,e)}else if(65536>e){b=new Uint8Array(3);var q=new DataView(b.buffer);q.setUint8(0,126);
|
|
654
|
+
q.setUint16(1,e)}else b=new Uint8Array(9),q=new DataView(b.buffer),q.setUint8(0,127),q.setBigUint64(1,BigInt(e));ca.data&&'string'!=typeof ca.data&&(b[0]|=128);l.enqueue(b);l.enqueue(h)})}})}function v(ca){return ca.reduce(function(l,h){return l+h.length},0)}function za(ca,l){if(ca[0].length===l)return ca.shift();for(var h=new Uint8Array(l),e=0,b=0;b<l;b++)h[b]=ca[0][e++],e===ca[0].length&&(ca.shift(),e=0);return ca.length&&e<ca[0].length&&(ca[0]=ca[0].slice(e)),h}function va(ca){if(ca){for(var l in va.prototype)ca[l]=
|
|
654
655
|
va.prototype[l];return ca}}function P(ca){for(var l=arguments.length,h=Array(1<l?l-1:0),e=1;e<l;e++)h[e-1]=arguments[e];return h.reduce(function(b,q){return ca.hasOwnProperty(q)&&(b[q]=ca[q]),b},{})}function L(ca,l){l.useNativeTimers?(ca.setTimeoutFn=Ha.bind(Ia),ca.clearTimeoutFn=mb.bind(Ia)):(ca.setTimeoutFn=Ia.setTimeout.bind(Ia),ca.clearTimeoutFn=Ia.clearTimeout.bind(Ia))}function A(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function E(){}function n(){for(var ca in bb.requests)bb.requests.hasOwnProperty(ca)&&
|
|
655
|
-
bb.requests[ca].abort()}function y(ca){ca=ca.xdomain;try{if('undefined'!=typeof XMLHttpRequest&&(!ca||pb))return new XMLHttpRequest}catch(l){}if(!ca)try{return new (Ia[['Active'].concat('Object').join('X')])('Microsoft.XMLHTTP')}catch(l){}}function z(ca){if(8E3<ca.length)throw'URI too long';var l=ca,h=ca.indexOf('['),e=ca.indexOf(']');-1!=h&&-1!=e&&(ca=ca.substring(0,h)+ca.substring(h,e).replace(/:/g,';')+ca.substring(e,ca.length));var b,q;ca=yb.exec(ca||'');for(var m={},p=14;p--;)m[
|
|
656
|
+
bb.requests[ca].abort()}function y(ca){ca=ca.xdomain;try{if('undefined'!=typeof XMLHttpRequest&&(!ca||pb))return new XMLHttpRequest}catch(l){}if(!ca)try{return new (Ia[['Active'].concat('Object').join('X')])('Microsoft.XMLHTTP')}catch(l){}}function z(ca){if(8E3<ca.length)throw'URI too long';var l=ca,h=ca.indexOf('['),e=ca.indexOf(']');-1!=h&&-1!=e&&(ca=ca.substring(0,h)+ca.substring(h,e).replace(/:/g,';')+ca.substring(e,ca.length));var b,q;ca=yb.exec(ca||'');for(var m={},p=14;p--;)m[La[p]]=ca[p]||
|
|
656
657
|
'';return-1!=h&&-1!=e&&(m.source=l,m.host=m.host.substring(1,m.host.length-1).replace(/;/g,':'),m.authority=m.authority.replace('[','').replace(']','').replace(/;/g,':'),m.ipv6uri=!0),m.pathNames=function(O,D){O=D.replace(/\/{2,9}/g,'/').split('/');'/'!=D.slice(0,1)&&0!==D.length||O.splice(0,1);'/'==D.slice(-1)&&O.splice(O.length-1,1);return O}(0,m.path),m.queryKey=(b=m.query,q={},b.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(O,D,aa){D&&(q[D]=aa)}),q),m}var F=Object.create(null);F.open='0';F.close=
|
|
657
|
-
'1';F.ping='2';F.pong='3';F.message='4';F.upgrade='5';F.noop='6';var
|
|
658
|
-
return M&&ca instanceof Blob?l?h(ca):W(ca,h):T&&(ca instanceof ArrayBuffer||
|
|
659
|
-
data:Da(ca,l)};var h=ca.charAt(0);if('b'===h){ca=ca.substring(1);if(ma){var e=.75*ca.length;h=ca.length;var b=0;'='===ca[ca.length-1]&&(e--,'='===ca[ca.length-2]&&e--);var q=new ArrayBuffer(e),m=new Uint8Array(q);for(e=0;e<h;e+=4){var p=ia[ca.charCodeAt(e)];var O=ia[ca.charCodeAt(e+1)];var D=ia[ca.charCodeAt(e+2)];var aa=ia[ca.charCodeAt(e+3)];m[b++]=p<<2|O>>4;m[b++]=(15&O)<<4|D>>2;m[b++]=(3&D)<<6|63&aa}l=Da(q,l)}else l={base64:!0,data:ca};l={type:'message',data:l}}else l=
|
|
660
|
-
data:ca.substring(1)}:{type:
|
|
658
|
+
'1';F.ping='2';F.pong='3';F.message='4';F.upgrade='5';F.noop='6';var w=Object.create(null);Object.keys(F).forEach(function(ca){w[F[ca]]=ca});for(var x,G={type:'error',data:'parser error'},M='function'==typeof Blob||'undefined'!=typeof Blob&&'[object BlobConstructor]'===Object.prototype.toString.call(Blob),T='function'==typeof ArrayBuffer,ra=function(ca){return'function'==typeof ArrayBuffer.isView?ArrayBuffer.isView(ca):ca&&ca.buffer instanceof ArrayBuffer},Ea=function(ca,l,h){var e=ca.type;ca=ca.data;
|
|
659
|
+
return M&&ca instanceof Blob?l?h(ca):W(ca,h):T&&(ca instanceof ArrayBuffer||ra(ca))?l?h(ca):W(new Blob([ca]),h):h(F[e]+(ca||''))},W=function(ca,l){var h=new FileReader;return h.onload=function(){var e=h.result.split(',')[1];l('b'+(e||''))},h.readAsDataURL(ca)},ia='undefined'==typeof Uint8Array?[]:new Uint8Array(256),ea=0;64>ea;ea++)ia['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charCodeAt(ea)]=ea;var Aa,ma='function'==typeof ArrayBuffer,sa=function(ca,l){if('string'!=typeof ca)return{type:'message',
|
|
660
|
+
data:Da(ca,l)};var h=ca.charAt(0);if('b'===h){ca=ca.substring(1);if(ma){var e=.75*ca.length;h=ca.length;var b=0;'='===ca[ca.length-1]&&(e--,'='===ca[ca.length-2]&&e--);var q=new ArrayBuffer(e),m=new Uint8Array(q);for(e=0;e<h;e+=4){var p=ia[ca.charCodeAt(e)];var O=ia[ca.charCodeAt(e+1)];var D=ia[ca.charCodeAt(e+2)];var aa=ia[ca.charCodeAt(e+3)];m[b++]=p<<2|O>>4;m[b++]=(15&O)<<4|D>>2;m[b++]=(3&D)<<6|63&aa}l=Da(q,l)}else l={base64:!0,data:ca};l={type:'message',data:l}}else l=w[h]?1<ca.length?{type:w[h],
|
|
661
|
+
data:ca.substring(1)}:{type:w[h]}:G;return l},Da=function(ca,l){return'blob'===l?ca instanceof Blob?ca:new Blob([ca]):ca instanceof ArrayBuffer?ca:ca.buffer},Qa=String.fromCharCode(30);va.prototype.on=va.prototype.addEventListener=function(ca,l){return this.t=this.t||{},(this.t['$'+ca]=this.t['$'+ca]||[]).push(l),this};va.prototype.once=function(ca,l){function h(){this.off(ca,h);l.apply(this,arguments)}return h.fn=l,this.on(ca,h),this};va.prototype.off=va.prototype.removeListener=va.prototype.removeAllListeners=
|
|
661
662
|
va.prototype.removeEventListener=function(ca,l){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var h,e=this.t['$'+ca];if(!e)return this;if(1==arguments.length)return delete this.t['$'+ca],this;for(var b=0;b<e.length;b++)if((h=e[b])===l||h.fn===l){e.splice(b,1);break}return 0===e.length&&delete this.t['$'+ca],this};va.prototype.emit=function(ca){this.t=this.t||{};for(var l=Array(arguments.length-1),h=this.t['$'+ca],e=1;e<arguments.length;e++)l[e-1]=arguments[e];if(h){e=0;for(var b=
|
|
662
663
|
(h=h.slice(0)).length;e<b;++e)h[e].apply(this,l)}return this};va.prototype.emitReserved=va.prototype.emit;va.prototype.listeners=function(ca){return this.t=this.t||{},this.t['$'+ca]||[]};va.prototype.hasListeners=function(ca){return!!this.listeners(ca).length};var Ja='function'==typeof Promise&&'function'==typeof Promise.resolve?function(ca){return Promise.resolve().then(ca)}:function(ca,l){return l(ca,0)},Ia='undefined'!=typeof self?self:'undefined'!=typeof window?window:Function('return this')(),
|
|
663
664
|
Ha=Ia.setTimeout,mb=Ia.clearTimeout,Fa=function(ca){function l(h,e,b){var q;return(q=ca.call(this,h)||this).description=e,q.context=b,q.type='TransportError',q}return U(l,ca),l}(S(Error));ea=function(ca){function l(e){var b;return(b=ca.call(this)||this).writable=!1,L(b,e),b.opts=e,b.query=e.query,b.socket=e.socket,b.supportsBinary=!e.forceBase64,b}U(l,ca);var h=l.prototype;return h.onError=function(e,b,q){return ca.prototype.emitReserved.call(this,'error',new Fa(e,b,q)),this},h.open=function(){return this.readyState=
|
|
@@ -665,7 +666,7 @@ Ha=Ia.setTimeout,mb=Ia.clearTimeout,Fa=function(ca){function l(h,e,b){var q;retu
|
|
|
665
666
|
ca.prototype.emitReserved.call(this,'close',e)},h.pause=function(e){},h.createUri=function(e){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return e+'://'+this.i()+this.o()+this.opts.path+this.u(b)},h.i=function(){var e=this.opts.hostname;return-1===e.indexOf(':')?e:'['+e+']'},h.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?':'+this.opts.port:''},h.u=function(e){var b='',q;for(q in e)e.hasOwnProperty(q)&&
|
|
666
667
|
(b.length&&(b+='&'),b+=encodeURIComponent(q)+'='+encodeURIComponent(e[q]));e=b;return e.length?'?'+e:''},l}(va);var Pa=function(ca){function l(){var e;return(e=ca.apply(this,arguments)||this).h=!1,e}U(l,ca);var h=l.prototype;return h.doOpen=function(){this.p()},h.pause=function(e){var b=this;this.readyState='pausing';var q=function(){b.readyState='paused';e()};if(this.h||!this.writable){var m=0;this.h&&(m++,this.once('pollComplete',function(){--m||q()}));this.writable||(m++,this.once('drain',function(){--m||
|
|
667
668
|
q()}))}else q()},h.p=function(){this.h=!0;this.doPoll();this.emitReserved('poll')},h.onData=function(e){var b=this;(function(q,m){q=q.split(Qa);for(var p=[],O=0;O<q.length;O++){var D=sa(q[O],m);if(p.push(D),'error'===D.type)break}return p})(e,this.socket.binaryType).forEach(function(q){if('opening'===b.readyState&&'open'===q.type&&b.onOpen(),'close'===q.type)return b.onClose({description:'transport closed by the server'}),!1;b.onPacket(q)});'closed'!==this.readyState&&(this.h=!1,this.emitReserved('pollComplete'),
|
|
668
|
-
'open'===this.readyState&&this.p())},h.doClose=function(){var e=this,b=function(){e.write([{type:'close'}])};'open'===this.readyState?b():this.once('open',b)},h.write=function(e){var b=this;this.writable=!1;(function(q,m){var p=q.length,O=Array(p),D=0;q.forEach(function(aa,
|
|
669
|
+
'open'===this.readyState&&this.p())},h.doClose=function(){var e=this,b=function(){e.write([{type:'close'}])};'open'===this.readyState?b():this.once('open',b)},h.write=function(e){var b=this;this.writable=!1;(function(q,m){var p=q.length,O=Array(p),D=0;q.forEach(function(aa,xa){Ea(aa,!1,function(ba){O[xa]=ba;++D===p&&m(O.join(Qa))})})})(e,function(q){b.doWrite(q,function(){b.writable=!0;b.emitReserved('drain')})})},h.uri=function(){var e=this.opts.secure?'https':'http',b=this.query||{};return!1!==
|
|
669
670
|
this.opts.timestampRequests&&(b[this.opts.timestampParam]=A()),this.supportsBinary||b.sid||(b.b64=1),this.createUri(e,b)},Q(l,[{key:'name',get:function(){return'polling'}}])}(ea),Ya=!1;try{Ya='undefined'!=typeof XMLHttpRequest&&'withCredentials'in new XMLHttpRequest}catch(ca){}var pb=Ya;Pa=function(ca){function l(e){var b;if(b=ca.call(this,e)||this,'undefined'!=typeof location){var q='https:'===location.protocol,m=location.port;m||=q?'443':'80';b.xd='undefined'!=typeof location&&e.hostname!==location.hostname||
|
|
670
671
|
m!==e.port}return b}U(l,ca);var h=l.prototype;return h.doWrite=function(e,b){var q=this;e=this.request({method:'POST',data:e});e.on('success',b);e.on('error',function(m,p){q.onError('xhr post error',m,p)})},h.doPoll=function(){var e=this,b=this.request();b.on('data',this.onData.bind(this));b.on('error',function(q,m){e.onError('xhr poll error',q,m)});this.pollXhr=b},l}(Pa);var bb=function(ca){function l(e,b,q){var m;return(m=ca.call(this)||this).createRequest=e,L(m,q),m.l=q,m.v=q.method||'GET',m.m=
|
|
671
672
|
b,m.k=void 0!==q.data?q.data:null,m.A(),m}U(l,ca);var h=l.prototype;return h.A=function(){var e,b=this,q=P(this.l,'agent','pfx','key','passphrase','cert','ca','ciphers','rejectUnauthorized','autoUnref');q.xdomain=!!this.l.xd;var m=this.j=this.createRequest(q);try{m.open(this.v,this.m,!0);try{if(this.l.extraHeaders)for(var p in m.setDisableHeaderCheck&&m.setDisableHeaderCheck(!0),this.l.extraHeaders)this.l.extraHeaders.hasOwnProperty(p)&&m.setRequestHeader(p,this.l.extraHeaders[p])}catch(O){}if('POST'===
|
|
@@ -677,10 +678,10 @@ Vb&&!h,e}return U(l,ca),l.prototype.request=function(){var h=0<arguments.length&
|
|
|
677
678
|
context:b})};this.ws.onmessage=function(b){return e.onData(b.data)};this.ws.onerror=function(b){return e.onError('websocket error',b)}},h.write=function(e){var b=this;this.writable=!1;for(var q=function(){var p=e[m],O=m===e.length-1;Ea(p,b.supportsBinary,function(D){try{b.doWrite(p,D)}catch(aa){}O&&Ja(function(){b.writable=!0;b.emitReserved('drain')},b.setTimeoutFn)})},m=0;m<e.length;m++)q()},h.doClose=function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)},h.uri=
|
|
678
679
|
function(){var e=this.opts.secure?'wss':'ws',b=this.query||{};return this.opts.timestampRequests&&(b[this.opts.timestampParam]=A()),this.supportsBinary||(b.b64=1),this.createUri(e,b)},Q(l,[{key:'name',get:function(){return'websocket'}}])}(ea);var nb=Ia.WebSocket||Ia.MozWebSocket;Pa=function(ca){function l(){return ca.apply(this,arguments)||this}U(l,ca);var h=l.prototype;return h.createSocket=function(e,b,q){return wb?new nb(e,b,q):b?new nb(e,b):new nb(e)},h.doWrite=function(e,b){this.ws.send(b)},
|
|
679
680
|
l}(Pa);ea=function(ca){function l(){return ca.apply(this,arguments)||this}U(l,ca);var h=l.prototype;return h.doOpen=function(){var e=this;try{this.M=new WebTransport(this.createUri('https'),this.opts.transportOptions[this.name])}catch(b){return this.emitReserved('error',b)}this.M.closed.then(function(){e.onClose()}).catch(function(b){e.onError('webtransport error',b)});this.M.ready.then(function(){e.M.createBidirectionalStream().then(function(b){var q=function(p,O){Aa||=new TextDecoder;var D=[],aa=
|
|
680
|
-
0,
|
|
681
|
-
|
|
681
|
+
0,xa=-1,ba=!1;return new TransformStream({transform:function(oa,Ba){for(D.push(oa);;){if(0===aa){if(1>v(D))break;oa=za(D,1);ba=!(128&~oa[0]);xa=127&oa[0];aa=126>xa?3:126===xa?1:2}else if(1===aa){if(2>v(D))break;oa=za(D,2);xa=(new DataView(oa.buffer,oa.byteOffset,oa.length)).getUint16(0);aa=3}else if(2===aa){if(8>v(D))break;oa=za(D,8);oa=new DataView(oa.buffer,oa.byteOffset,oa.length);var H=oa.getUint32(0);if(H>Math.pow(2,21)-1){Ba.enqueue(G);break}xa=H*Math.pow(2,32)+oa.getUint32(4);aa=3}else{if(v(D)<
|
|
682
|
+
xa)break;oa=za(D,xa);Ba.enqueue(sa(ba?oa:Aa.decode(oa),O));aa=0}if(0===xa||xa>p){Ba.enqueue(G);break}}}})}(Number.MAX_SAFE_INTEGER,e.socket.binaryType),m=b.readable.pipeThrough(q).getReader();q=I();q.readable.pipeTo(b.writable);e.C=q.writable.getWriter();!function O(){m.read().then(function(D){var aa=D.value;D.done||(e.onPacket(aa),O())}).catch(function(D){})}();b={type:'open'};e.query.sid&&(b.data='{"sid":"'.concat(e.query.sid,'"}'));e.C.write(b).then(function(){return e.onOpen()})})})},h.write=
|
|
682
683
|
function(e){var b=this;this.writable=!1;for(var q=function(){var p=m===e.length-1;b.C.write(e[m]).then(function(){p&&Ja(function(){b.writable=!0;b.emitReserved('drain')},b.setTimeoutFn)})},m=0;m<e.length;m++)q()},h.doClose=function(){var e;null===(e=this.M)||void 0===e||e.close()},Q(l,[{key:'name',get:function(){return'webtransport'}}])}(ea);var xb={websocket:Pa,webtransport:ea,polling:qb},yb=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
|
|
683
|
-
|
|
684
|
+
La='source protocol authority userInfo user password host port relative path directory file query anchor'.split(' '),db='function'==typeof addEventListener&&'function'==typeof removeEventListener,Gb=[];db&&addEventListener('offline',function(){Gb.forEach(function(ca){return ca()})},!1);var Ub=function(ca){function l(e,b){var q;((q=ca.call(this)||this).binaryType='arraybuffer',q.writeBuffer=[],q.L=0,q.R=-1,q.D=-1,q.P=-1,q.I=1/0,e&&'object'===R(e)&&(b=e,e=null),e)?(e=z(e),b.hostname=e.host,b.secure=
|
|
684
685
|
'https'===e.protocol||'wss'===e.protocol,b.port=e.port,e.query&&(b.query=e.query)):b.host&&(b.hostname=z(b.host).host);return L(q,b),q.secure=null!=b.secure?b.secure:'undefined'!=typeof location&&'https:'===location.protocol,b.hostname&&!b.port&&(b.port=q.secure?'443':'80'),q.hostname=b.hostname||('undefined'!=typeof location?location.hostname:'localhost'),q.port=b.port||('undefined'!=typeof location&&location.port?location.port:q.secure?'443':'80'),q.transports=[],q.$={},b.transports.forEach(function(m){var p=
|
|
685
686
|
m.prototype.name;q.transports.push(p);q.$[p]=m}),q.opts=V({path:'/engine.io',agent:!1,withCredentials:!1,upgrade:!0,timestampParam:'t',rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},b),q.opts.path=q.opts.path.replace(/\/$/,'')+(q.opts.addTrailingSlash?'/':''),'string'==typeof q.opts.query&&(q.opts.query=function(m){var p={};m=m.split('&');for(var O=0,D=m.length;O<D;O++){var aa=m[O].split('=');p[decodeURIComponent(aa[0])]=
|
|
686
687
|
decodeURIComponent(aa[1])}return p}(q.opts.query)),db&&(q.opts.closeOnBeforeunload&&(q.q=function(){q.transport&&(q.transport.removeAllListeners(),q.transport.close())},addEventListener('beforeunload',q.q,!1)),'localhost'!==q.hostname&&(q.N=function(){q.V('transport close',{description:'network connection lost'})},Gb.push(q.N))),q.opts.withCredentials&&(q.X=void 0),q.H(),q}U(l,ca);var h=l.prototype;return h.createTransport=function(e){var b=V({},this.opts.query);b.EIO=4;b.transport=e;this.id&&(b.sid=
|
|
@@ -694,8 +695,8 @@ options:q},this.emitReserved('packetCreate',e),this.writeBuffer.push(e),m&&this.
|
|
|
694
695
|
this},h.O=function(e){if(l.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&1<this.transports.length&&'opening'===this.readyState)return this.transports.shift(),this.H();this.emitReserved('error',e);this.V('transport error',e)},h.V=function(e,b){if('opening'===this.readyState||'open'===this.readyState||'closing'===this.readyState){if(this.clearTimeoutFn(this.K),this.transport.removeAllListeners('close'),this.transport.close(),this.transport.removeAllListeners(),db&&(this.q&&removeEventListener('beforeunload',
|
|
695
696
|
this.q,!1),this.N)){var q=Gb.indexOf(this.N);-1!==q&&Gb.splice(q,1)}this.readyState='closed';this.id=null;this.emitReserved('close',e,b);this.writeBuffer=[];this.L=0}},l}(va);Ub.protocol=4;var pc=function(ca){function l(h){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};e='object'===R(h)?h:e;return(!e.transports||e.transports&&'string'==typeof e.transports[0])&&(e.transports=(e.transports||['polling','websocket','webtransport']).map(function(b){return xb[b]}).filter(function(b){return!!b})),
|
|
696
697
|
ca.call(this,h,e)||this}return U(l,ca),l}(function(ca){function l(){var e;return(e=ca.apply(this,arguments)||this)._=[],e}U(l,ca);var h=l.prototype;return h.onOpen=function(){if(ca.prototype.onOpen.call(this),'open'===this.readyState&&this.opts.upgrade)for(var e=0;e<this._.length;e++)this.tt(this._[e])},h.tt=function(e){function b(){aa||(aa=!0,oa(),D.close(),D=null)}function q(){ba('transport closed')}function m(){ba('socket closed')}function p(Ba){D&&Ba.name!==D.name&&b()}var O=this,D=this.createTransport(e),
|
|
697
|
-
aa=!1;Ub.priorWebsocketSuccess=!1;var
|
|
698
|
-
Ba)}))},ba=function(Ba){Ba=Error('probe error: '+Ba);Ba.transport=D.name;b();O.emitReserved('upgradeError',Ba)},oa=function(){D.removeListener('open',
|
|
698
|
+
aa=!1;Ub.priorWebsocketSuccess=!1;var xa=function(){aa||(D.send([{type:'ping',data:'probe'}]),D.once('packet',function(Ba){if(!aa)if('pong'===Ba.type&&'probe'===Ba.data){if(O.upgrading=!0,O.emitReserved('upgrading',D),D)Ub.priorWebsocketSuccess='websocket'===D.name,O.transport.pause(function(){aa||'closed'!==O.readyState&&(oa(),O.setTransport(D),D.send([{type:'upgrade'}]),O.emitReserved('upgrade',D),D=null,O.upgrading=!1,O.flush())})}else Ba=Error('probe error'),Ba.transport=D.name,O.emitReserved('upgradeError',
|
|
699
|
+
Ba)}))},ba=function(Ba){Ba=Error('probe error: '+Ba);Ba.transport=D.name;b();O.emitReserved('upgradeError',Ba)},oa=function(){D.removeListener('open',xa);D.removeListener('error',ba);D.removeListener('close',q);O.off('close',m);O.off('upgrading',p)};D.once('open',xa);D.once('error',ba);D.once('close',q);this.once('close',m);this.once('upgrading',p);-1!==this._.indexOf('webtransport')&&'webtransport'!==e?this.setTimeoutFn(function(){aa||D.open()},200):D.open()},h.onHandshake=function(e){this._=this.nt(e.upgrades);
|
|
699
700
|
ca.prototype.onHandshake.call(this,e)},h.nt=function(e){for(var b=[],q=0;q<e.length;q++)~this.transports.indexOf(e[q])&&b.push(e[q]);return b},l}(Ub));return function(ca,l){return new pc(ca,l)}});
|
|
700
701
|
function BindingHelper(B){var Q={};'undefined'!=typeof B&&(Q=B);Q.process=function(V,la,U){if('undefined'==typeof V||!Array.isArray(V))throw Error('`bindings` must be a defined array');'undefined'==typeof la&&(la=V.length,U=0);if(V[U]){var N=V[U];if('undefined'==typeof N.call)throw Error('`bindings.['+U+'].call` is required !');if('function'!=typeof Q[N.call])throw Error('`bindingContext.'+N.call+'` is not a function');var ha=N.call;delete N.call;try{if('undefined'!=typeof N.handler){if(!window[N.handler])throw Error('`'+
|
|
701
702
|
N.handler+'` could not be reached. You must expose it to the `window` do object before any call.');var R=N.handler;delete N.handler;window[R].apply(this,Object.values(N));N.handler=R}else Q[ha].apply(this,Object.values(N));N.call=ha}catch(S){console.error('BindingHelper encountered error while trying to execute `'+ha+'`'+S.stack||S)}Q.process(V,la,U+1)}};return Q}define('helpers/binding',[],function(){return BindingHelper});
|
|
@@ -704,27 +705,27 @@ function Domain(B,Q){var V='undefined'!==typeof module&&module.exports?!1:!0,la=
|
|
|
704
705
|
typeof P[A]&&(P[A]=U[A]);V||(P.filename=__dirname+'/'+P.filename);V&&P.isCachingRequired&&(console.warn('[DOMAIN] `options.isCachingRequired` is only available for backend'),P.isCachingRequired=!1);N=P;if(L)return u(P,function(A){A?L(A):(console.debug('[DOMAIN] PSL Loaded'),L(A,va))});u(P);console.debug('[DOMAIN] PSL Loaded');return va},S=function(){},u=async function(va,P){var L=V||va.isCachingRequired?va.url:va.filename,A='undefined'!=typeof va.isUpdating?va.isUpdating:!1,E=null;if(V)if(ha&&!A)P(!1);
|
|
705
706
|
else if(window.fetch){E=A=null;try{A=await fetch(L),ha=E=await A.text()}catch(y){E=Error('[DOMAIN] Could not load PSL\n'+(y.stack||y.message||y));P(E);return}va.isUpdating=!1;P(!1)}else E=Error('[DOMAIN] Fetch API not supported'),P(E);else{L=!1;if('undefined'!=typeof fs.accessSync)try{fs.accessSync(va.filename,fs.constants.F_OK),L=!0}catch(y){L=!1;try{fs.lstatSync(va.filename).isSymbolicLink()&&(L=!0)}catch(z){}}else L=fs.existsSync(va.filename);L||(va.isCachingRequired=!0);if(va.isCachingRequired){L=
|
|
706
707
|
'curl -o '+va.filename+' '+va.url+' >/dev/null 2>&1';console.debug('[DOMAIN] Running: '+L);try{execSync(L)}catch(y){console.warn('[DOMAIN] could not fetch from `'+va.url+'`. Trying with `'+va.alternativeUrl+'`');L='curl -o '+va.filename+' '+va.alternativeUrl+' >/dev/null 2>&1';try{execSync(L)}catch(z){P(z);return}}var n=!1;nIntervId=setInterval(()=>{if('undefined'!=typeof fs.accessSync)try{fs.accessSync(va.filename,fs.constants.F_OK),n=!0}catch(y){n=!1;try{fs.lstatSync(va.filename).isSymbolicLink()&&
|
|
707
|
-
(n=!0)}catch(z){}}else n=fs.existsSync(va.filename);n&&(clearInterval(nIntervId),ha=fs.readFileSync(va.filename).toString(),P(!1))},200)}try{ha=fs.readFileSync(va.filename).toString(),P&&P(!1)}catch(y){console.warn('[DOMAIN] could not read from `'+va.filename+'`'),u(B,P)}}},I=function(va){N.isUpdating=!0;u(N,va)},
|
|
708
|
+
(n=!0)}catch(z){}}else n=fs.existsSync(va.filename);n&&(clearInterval(nIntervId),ha=fs.readFileSync(va.filename).toString(),P(!1))},200)}try{ha=fs.readFileSync(va.filename).toString(),P&&P(!1)}catch(y){console.warn('[DOMAIN] could not read from `'+va.filename+'`'),u(B,P)}}},I=function(va){N.isUpdating=!0;u(N,va)},v=async function(va){va='undefined'!=typeof va&&''!=va?va:os.hostname();if(/\./.test(va))return va;console.debug('[DOMAIN][getFQDN] FQDN: '+va);var P=null,L=null;P=await promisify(dns.lookup)(va,
|
|
708
709
|
{hints:dns.ADDRCONFIG||dns.V4MAPPED}).then(function(A){console.debug('[DOMAIN][getFQDN] IP: '+A.address);console.debug('[DOMAIN][getFQDN] FAMILY: '+A.family);return A}).catch(function(A){L=A});if(L)throw L;va=await promisify(dns.lookupService)(P.address,0).then(function(A){console.debug('[DOMAIN][getFQDN] FQDN: '+A.hostname);console.debug('[DOMAIN][getFQDN] Service: '+A.service);return A.hostname}).catch(function(A){});if(L)throw L;if(!/\./.test(va))throw Error('[DOMAIN][getFQDN] `'+va+'` is not a FQDN !');
|
|
709
|
-
return va},
|
|
710
|
-
(A=A.replace(/:(.*)$/,'')),(A=L||!L&&-1<z.indexOf(A)?!0:!1)?1<y&&!L?(n.splice(2),E=n.reverse().join('.')):E+='.'+n.reverse().join('.'):1<y?(n.splice(2),E=n.reverse().join('.')):E+='.'+n.reverse().join('.'));/:(.*)$/.test(E)&&(E=E.replace(/:(.*)$/,''));console.debug('[DOMAIN] isSLD: '+L,va,' -> ',E);/^true$/i.test(P);return{value:E,isSLD:L,isRegisteredTldOrSld:A}}};V?
|
|
711
|
-
la.src='https://cdn.jsdelivr.net/npm/promise-polyfill@8.1.3/dist/polyfill.min.js',S=document.createElement('script'),S.type='text/javascript',S.src='https://cdn.jsdelivr.net/npm/whatwg-fetch@3.4.0/dist/fetch.umd.min.js',document.head.appendChild(la),document.head.appendChild(S),setTimeout(()=>R(
|
|
712
|
-
define('gina/link','require jquery vendor/uuid lib/domain lib/merge utils/events'.split(' '),function(B){B('jquery').noConflict();var Q=B('vendor/uuid'),V=B('lib/domain'),la=null,U=B('lib/merge');B('utils/events');return function(N){function ha(n,y){var z=A(n),F=z.id,
|
|
713
|
-
window.location.protocol+'//'+window.location.host)).test(n)){var x=la.getRootDomain(window.location.hostname).value,G=la.getRootDomain(n).value;x=x===G?!0:!1;gina.config.envIsDev&&(console.debug('Checking CORS from Popin plugin...TODO - local CORS Proxy'),console.debug('Is request from same domain ? ',x));x||(n=n.match(/^(https|http):/)[0]+'//corsacme.herokuapp.com/?'+n)}y.url=n;z&&'undefined'!=typeof z.options&&(y=U(z.options,y));y.withCredentials?'withCredentials'in
|
|
714
|
-
y.url,y.isSynchrone):
|
|
715
|
-
n.options=U(y,S.options);y=document.getElementById(n.id)||null;if('undefined'==typeof u.$links[n.id]){if(-1<va.indexOf(n.id))throw Error('`link '+n.id+'` already exists !');if(!gina.events[evt]){addListener(gina,y,evt,function(
|
|
710
|
+
return va},za={getRootDomain:function(va,P){'undefined'==typeof P&&(P=!1);va=va.trim();var L=!1,A=!1,E=va.replace(/^(.*):\/\/|\/(.*)/g,''),n=E.split(/\./g).reverse(),y=n.length?n.length-1:0,z=ha.replace(/\/\/\s*(.*)\n|^\s*\n/gm,'').split(/\n/).filter(function(F,w,x){/[^a-z 0-9.]+/.test(F)&&(F=F.replace(/[^a-z 0-9.]+/g,'').replace(/^\./g,''));return/\./.test(F)&&!L&&(new RegExp('.'+F+'$')).test(E)?(L=!0,y=F.split(/\./g).length,x.splice(0,x.length),!1):F});E=n[y];0<y&&(n=n.splice(0,y),A=n[0],/:(.*)$/.test(A)&&
|
|
711
|
+
(A=A.replace(/:(.*)$/,'')),(A=L||!L&&-1<z.indexOf(A)?!0:!1)?1<y&&!L?(n.splice(2),E=n.reverse().join('.')):E+='.'+n.reverse().join('.'):1<y?(n.splice(2),E=n.reverse().join('.')):E+='.'+n.reverse().join('.'));/:(.*)$/.test(E)&&(E=E.replace(/:(.*)$/,''));console.debug('[DOMAIN] isSLD: '+L,va,' -> ',E);/^true$/i.test(P);return{value:E,isSLD:L,isRegisteredTldOrSld:A}}};V?za.onReady=S:(za.updatePSL=I,za.getFQDN=v);return V&&la&&!window.fetch?(la=document.createElement('script'),la.type='text/javascript',
|
|
712
|
+
la.src='https://cdn.jsdelivr.net/npm/promise-polyfill@8.1.3/dist/polyfill.min.js',S=document.createElement('script'),S.type='text/javascript',S.src='https://cdn.jsdelivr.net/npm/whatwg-fetch@3.4.0/dist/fetch.umd.min.js',document.head.appendChild(la),document.head.appendChild(S),setTimeout(()=>R(za,B,Q),500)):R(za,B,Q)}'undefined'!==typeof module&&module.exports?module.exports=Domain:'function'===typeof define&&define.amd&&define('lib/domain',[],function(){return Domain});
|
|
713
|
+
define('gina/link','require jquery vendor/uuid lib/domain lib/merge utils/events'.split(' '),function(B){B('jquery').noConflict();var Q=B('vendor/uuid'),V=B('lib/domain'),la=null,U=B('lib/merge');B('utils/events');return function(N){function ha(n,y){var z=A(n),F=z.id,w=document.getElementById(F)||null;(w.getAttribute('data-gina-link-event-on-success')||w.getAttribute('data-gina-link-event-on-error'))&&listenToXhrEvents(z);y='undefined'==typeof y?za:U(y,za);if(/^(http|https):/.test(n)&&!(new RegExp('^'+
|
|
714
|
+
window.location.protocol+'//'+window.location.host)).test(n)){var x=la.getRootDomain(window.location.hostname).value,G=la.getRootDomain(n).value;x=x===G?!0:!1;gina.config.envIsDev&&(console.debug('Checking CORS from Popin plugin...TODO - local CORS Proxy'),console.debug('Is request from same domain ? ',x));x||(n=n.match(/^(https|http):/)[0]+'//corsacme.herokuapp.com/?'+n)}y.url=n;z&&'undefined'!=typeof z.options&&(y=U(z.options,y));y.withCredentials?'withCredentials'in v?y.isSynchrone?v.open(y.method,
|
|
715
|
+
y.url,y.isSynchrone):v.open(y.method,y.url):'undefined'!=typeof XDomainRequest?(v=new XDomainRequest,v.open(y.method,y.url)):(v=null,triggerEvent(gina,w,'error.'+F,'CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ')):y.isSynchrone?v.open(y.method,y.url,y.isSynchrone):v.open(y.method,y.url);if(!v)throw Error('No `xhr` object initiated');y.$link=z;handleXhr(v,w,y,B);v.send()}function R(n,y){if('object'!=typeof y)throw Error('`options` must be an object');
|
|
716
|
+
n.options=U(y,S.options);y=document.getElementById(n.id)||null;if('undefined'==typeof u.$links[n.id]){if(-1<va.indexOf(n.id))throw Error('`link '+n.id+'` already exists !');if(!gina.events[evt]){addListener(gina,y,evt,function(w){cancelEvent(w);w=L(w.target.id);var x=w.url;'undefined'==typeof w.options.isSynchrone&&(w.options.isSynchrone=!1);'undefined'==typeof w.options.withCredentials&&(w.options.withCredentials=!1);ha(x,w.options)});var z=y.childNodes,F=0;lLen=z.length;if(0<lLen)for(;F<lLen;++F)'undefined'!=
|
|
716
717
|
typeof z[F].tagName&&P(z[F],y,evt)}n.request=ha;n.getLinkById=L;n.getLinkByUrl=A;u.$links[n.id]=n}}this.plugin='link';registerEvents(this.plugin,'loaded ready open close destroy success error progress'.split(' '));var S={options:{url:void 0,'class':'gina-link-default'},authorizedEvents:['ready','success','error'],events:{}},u={plugin:this.plugin,id:'gina-links-'+Q.v4(),on,eventData:{},$links:{},target:document,isReady:!1,initialized:!1},I={plugin:this.plugin,on,eventData:{},target:document,url:null,
|
|
717
|
-
request:null,$forms:[]},
|
|
718
|
-
typeof n&&(n=u.target);var z,F=null;n=n.getElementsByTagName('a');for(var
|
|
719
|
-
(F=z.getAttribute('onclick'));F?'undefined'==typeof F||/return false/.test(F)||(F=/;$/.test(F)?F+'return false;':F+'; return false;',z.setAttribute('onclick',F)):z.setAttribute('onclick','return false;');'undefined'==typeof u.$links[G.id]&&(G.target=z,z=U(G,I),R(z,y))}};new V(function(n,y){if(n)throw n;la=y});return function(n){u.bindLinks=E;u.request=ha;u.getLinkById=L;u.getLinkByUrl=A;u.on('init',function(y){if(window.XMLHttpRequest)
|
|
718
|
+
request:null,$forms:[]},v=null,za={url:'',method:'GET',isSynchrone:!1,withCredentials:!0,headers:{'X-Requested-With':'XMLHttpRequest'}},va=[],P=function(n,y,z){addListener(gina,n,'click',function(F){cancelEvent(F);triggerEvent(gina,y,z)})},L=function(n){return'undefined'!=typeof u.$links[n]?u.$links[n]:null},A=function(n){var y=null,z;for(z in gina.link.$links)if('undefined'!=typeof gina.link.$links[z].url&&gina.link.$links[z].url==n){y=gina.link.$links[z];break}return y},E=function(n,y){'undefined'==
|
|
719
|
+
typeof n&&(n=u.target);var z,F=null;n=n.getElementsByTagName('a');for(var w=0,x=n.length;w<x;++w)if(((z=n[w].getAttribute('data-gina-link'))||''==z)&&!/^false$/i.test(z)){z=n[w];var G={type:'a',method:'GET'};var M=z.getAttribute('data-gina-link-url');G.url='undefined'!=typeof M&&null!=M?M:z.getAttribute('href');M=z.getAttribute('id');if('undefined'==typeof M||null==M||''==M||/popin\.link/.test(M))M='link.click.gina-link-'+u.id+'-'+Q.v4();z.id=M;evt=G.id=M;z.setAttribute('id',evt);'A'==z.tagName&&
|
|
720
|
+
(F=z.getAttribute('onclick'));F?'undefined'==typeof F||/return false/.test(F)||(F=/;$/.test(F)?F+'return false;':F+'; return false;',z.setAttribute('onclick',F)):z.setAttribute('onclick','return false;');'undefined'==typeof u.$links[G.id]&&(G.target=z,z=U(G,I),R(z,y))}};new V(function(n,y){if(n)throw n;la=y});return function(n){u.bindLinks=E;u.request=ha;u.getLinkById=L;u.getLinkByUrl=A;u.on('init',function(y){if(window.XMLHttpRequest)v=new XMLHttpRequest;else if(window.ActiveXObject)try{v=new ActiveXObject('Msxml2.XMLHTTP')}catch(z){try{v=
|
|
720
721
|
new ActiveXObject('Microsoft.XMLHTTP')}catch(F){}}evt='click';addListener(gina,u.target,evt,function(z){'undefined'==typeof z.target.id&&(z.target.setAttribute('id',evt+'.'+Q.v4()),z.target.id=z.target.getAttribute('id'));if(/^link\.click\./.test(z.target.id)){cancelEvent(z);var F=z.target.id;(new RegExp('^link.click.gina-link-'+u.id)).test(F)&&triggerEvent(gina,z.target,F,z.detail)}});'undefined'==typeof n&&(n={});u.options=n;E(u.target,n);gina.linkIsBinded=!0;u.isReady=!0;gina.hasLinkHandler=!0;
|
|
721
722
|
gina.link=U(gina.link,u);triggerEvent(gina,u.target,'ready.'+u.id,u)});u.initialized=!0;return u}(N)}});
|
|
722
723
|
define('gina/popin','require vendor/uuid jquery lib/domain lib/merge utils/events'.split(' '),function(B){B('jquery').noConflict();var Q=B('vendor/uuid'),V=B('lib/domain'),la=null,U=B('lib/merge');B('utils/events');return function(N){function ha(){var W=null,ia;for(ia in gina.popin.$popins)if('undefined'!=typeof gina.popin.$popins[ia].isOpen&&gina.popin.$popins[ia].isOpen){W=gina.popin.$popins[ia];break}!W&&gina.popin.activePopinId&&(W=gina.popin.$popins[gina.popin.activePopinId]);return W}function R(W,
|
|
723
|
-
ia){var ea=W.target,Aa=W.type;'undefined'!=typeof W.detail&&'function'==typeof W.detail.trim&&(ea.innerHTML=W.detail.trim());W=function(wb,nb,xb){var yb=xb.getAttribute('data-gina-popin-is-link');yb=/^true$/i.test(yb)?!0:!1;'link'!=wb||yb||(wb='action');addListener(gina,xb,nb,function(
|
|
724
|
-
Gb=U(ia.options,Gb);u(ia.name,xb.href,Gb)}removeListener(gina,
|
|
725
|
-
|
|
724
|
+
ia){var ea=W.target,Aa=W.type;'undefined'!=typeof W.detail&&'function'==typeof W.detail.trim&&(ea.innerHTML=W.detail.trim());W=function(wb,nb,xb){var yb=xb.getAttribute('data-gina-popin-is-link');yb=/^true$/i.test(yb)?!0:!1;'link'!=wb||yb||(wb='action');addListener(gina,xb,nb,function(La){cancelEvent(La);if('close'!=wb){var db=!1,Gb='loaded.'+ia.id;'undefined'==typeof gina.events[Gb]&&addListener(gina,ea,Gb,function(Ub){Ub.preventDefault();db||(db=!0,I(Ub.detail))});Gb={isSynchrone:!1,withCredentials:!1};
|
|
725
|
+
Gb=U(ia.options,Gb);u(ia.name,xb.href,Gb)}removeListener(gina,La.target,La.type)});addListener(gina,xb,'click',function(La){cancelEvent(La);if(null!=La.target.getAttribute('disabled')&&'false'!=La.target.getAttribute('disabled'))return!1;if('link'==wb){var db=La.target.getAttribute('href')||null,Gb=La.target.getAttribute('target');null!=Gb&&''!=Gb?window.open(db,Gb):triggerEvent(gina,La.target,La.currentTarget.id,ia)}else'undefined'==typeof La.target.id&&(La.target.setAttribute('id',nb+'.'+Q.v4()),
|
|
726
|
+
La.target.id=La.target.getAttribute('id')),/^popin\.close\./.test(La.target.id)&&(cancelEvent(La),ia.isRedirecting=!1,L(ia.name)),/^popin\.click\./.test(La.target.id)&&(cancelEvent(La),db=La.target.id,(new RegExp('^popin.click.gina-popin-'+n.id)).test(db)&&triggerEvent(gina,La.target,db,La.detail))})};gina.popinIsBinded=!0;var ma=null,sa=null,Da=null;if(!ia.isOpen&&E.options.cancelOnOverlayClick){var Qa=ia.target;if(!E.options.useDialogMode||gina.config.envIsDev)Qa=n.target.childNodes[0];addListener(gina,
|
|
726
727
|
Qa,'mousedown',function(wb){if(/gina-popin-is-active/.test(wb.target.className)){removeListener(gina,wb.target,'mousedown');wb=[];ma=0;var nb=ea.getElementsByTagName('button');sa=0;Da=nb.length;if(0<Da)for(;sa<Da;++sa)/gina-popin-close/.test(nb[sa].className)&&(wb[ma]=nb[sa],++ma);nb=ea.getElementsByTagName('div');sa=0;Da=nb.length;if(0<Da)for(;sa<Da;++sa)/gina-popin-close/.test(nb[sa].className)&&(wb[ma]=nb[sa],++ma);nb=ea.getElementsByTagName('a');sa=0;Da=nb.length;if(0<Da)for(;sa<Da;++sa)/gina-popin-close/.test(nb[sa].className)&&
|
|
727
|
-
(wb[ma]=nb[sa],++ma);sa=0;for(Da=wb.length;sa<Da;++sa){nb=wb[sa];let xb=nb.getAttribute('id');for(let yb=0,
|
|
728
|
+
(wb[ma]=nb[sa],++ma);sa=0;for(Da=wb.length;sa<Da;++sa){nb=wb[sa];let xb=nb.getAttribute('id');for(let yb=0,La=A.length;yb<La;yb++){let db=A[yb];'undefined'!=typeof gina.events[db]&&gina.events[db]==xb&&removeListener(gina,nb,db);'undefined'!=typeof gina.events[xb]&&gina.events[xb]==xb&&removeListener(gina,nb,xb);'undefined'!=typeof gina.events[db+'.'+xb]&&gina.events[db+'.'+xb]==xb&&removeListener(gina,nb,db+'.'+xb);'undefined'!=typeof gina.events[db+'.'+xb]&&gina.events[db+'.'+xb]==db+'.'+xb&&removeListener(gina,
|
|
728
729
|
nb,db+'.'+xb)}}ia.isRedirecting=!1;L(ia.name)}})}/<form/i.test(ea.innerHTML)&&'undefined'!=typeof z&&z&&(ia.hasForm=!0);var Ja=[],Ia=[];Qa=[];Ia=ea.getElementsByTagName('button');sa=ma=0;Da=Ia.length;if(0<Ia.length)for(;sa<Da;++sa)/gina-popin-close/.test(Ia[sa].className)&&(Ja[ma]=Ia[sa],++ma);Ia=ea.getElementsByTagName('div');sa=0;Da=Ia.length;if(0<Da)for(;sa<Da;++sa)/gina-popin-close/.test(Ia[sa].className)&&(Ja[ma]=Ia[sa],++ma);Ia=ea.getElementsByTagName('a');sa=0;Da=Ia.length;if(0<Da)for(;sa<
|
|
729
730
|
Da;++sa)/gina-popin-close/.test(Ia[sa].className)?(Ja[ma]=Ia[sa],++ma):('undefined'==typeof Ia[sa]||/(#|#.*)$/.test(Ia[sa].href)||Ia[sa].id)&&('undefined'==typeof Ia[sa]||/(#|#.*)$/.test(Ia[sa].href)||/^(click\.|popin\.link)/.test(Ia[sa].id))||Qa.push(Ia[sa]);var Ha=null;Ia=null;sa=0;for(Da=Ja.length;sa<Da;++sa)'A'==Ja[sa].tagName&&(Ha=Ja[sa].getAttribute('onclick')),Ha?'undefined'==typeof Ha||/return false/.test(Ha)||(Ha=/;$/.test(Ha)?Ha+'return false;':Ha+'; return false;'):Ja[sa].setAttribute('onclick',
|
|
730
731
|
'return false;'),Ja[sa].id?Ia=Ja[sa].id:(Ia='popin.close.'+Q.v4(),Ja[sa].id=Ia,Ja[sa].setAttribute('id',Ia)),'undefined'!=typeof gina.events[Ia]&&gina.events[Ia]==Ja[sa].id||W('close',Ia,Ja[sa]);ma=0;Da=Qa.length;var mb=null,Fa=null,Pa=null,Ya={},pb=null,bb=new DOMParser,qb=null,Vb=null;for(Ia=Ja=Ja=null;ma<Da;++ma)null==Qa[ma].getAttribute('disabled')&&(Qa[ma].id=/^null$/i.test(Qa[ma].getAttribute('id'))?null:Qa[ma].getAttribute('id'),Qa[ma].id&&/^popin\.link/.test(Qa[ma].id)&&/^popin\.click/.test(Qa[ma].id)?
|
|
@@ -744,24 +745,24 @@ Aa.close();var Ya=Ha.popin.reload?Ha.popin.reload:!1;Ha.popin.location||Ha.popin
|
|
|
744
745
|
return}if('undefined'!=typeof Ha.reload){document.location.reload();return}'undefined'!=typeof Ha.popin&&'undefined'!=typeof Ha.popin.close&&(Aa.isRedirecting=!1,L(Aa.name))}if(!Fa){GINA_ENV_IS_DEV&&S(Ha);triggerEvent(gina,sa,'loaded.'+ma,Ha);return}GINA_ENV_IS_DEV&&S(Ha);triggerEvent(gina,$forms[0],'success.'+ma,Ha)}GINA_ENV_IS_DEV&&S(Ha)}catch(pb){Ja=!1,Ha={status:422,error:pb.description||pb.stack},/application\/json/.test(F.getResponseHeader('Content-Type'))&&(Ha.error=JSON.parse(F.responseText),
|
|
745
746
|
Ja=!0),n.eventData.error=Ha,GINA_ENV_IS_DEV&&S(Ha,Ja),triggerEvent(gina,sa,'error.'+ma,Ha)}else Ja=!1,Ha={status:F.status,error:F.responseText},/application\/json/.test(F.getResponseHeader('Content-Type'))&&(Ha.error=JSON.parse(F.responseText),Ja=!0),n.eventData.error=Ha,GINA_ENV_IS_DEV&&S(Ha,Ja),triggerEvent(gina,sa,'error.'+ma,Ha)};F.send();return{open:function(){var Ha=!1;addListener(gina,sa,'loaded.'+ma,function(mb){mb.preventDefault();Ha||(Ha=!0,n.activePopinId=Aa.id,R(mb,Aa),va(Aa.name))})}}}}
|
|
746
747
|
function I(W,ia){var ea=ha();if(ea){if(!ea.isOpen)throw Error('Popin `'+ea.name+'` is not open !');ea.isRedirecting='undefined'!=typeof ia?ia:!1;ia=ea.target;ia.innerHTML=W.trim();P(ea.name,!0);R({target:ia,type:'loaded.'+ea.id},ea);if(!E.options.useDialogMode&&/safari/i.test(window.navigator.userAgent))for(W=document.getElementsByTagName('link'),ia=0;ia<W.length;ia++)if('stylesheet'==W[ia].getAttribute('rel')){var Aa=W[ia].getAttribute('href').split('?')[0];/gina\.min\.css|gina\.css/.test(Aa)&&(Aa=
|
|
747
|
-
Aa+'?version='+(new Date).getMilliseconds(),W[ia].setAttribute('href',Aa))}ea.isRedirecting?triggerEvent(gina,n.target,'loaded.'+ea.id,ea):triggerEvent(gina,n.target,'open.'+ea.id,ea);if(gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar)try{ginaToolbar.update('el-xhr',ea.id)}catch(ma){throw ma;}}}function
|
|
748
|
+
Aa+'?version='+(new Date).getMilliseconds(),W[ia].setAttribute('href',Aa))}ea.isRedirecting?triggerEvent(gina,n.target,'loaded.'+ea.id,ea):triggerEvent(gina,n.target,'open.'+ea.id,ea);if(gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar)try{ginaToolbar.update('el-xhr',ea.id)}catch(ma){throw ma;}}}function v(W){var ia=setupXhr();ia.open('GET',W,!0);ia.setRequestHeader('Content-Type','text/javascript');ia.onload=function(){eval(ia.response)};ia.send()}function za(W){var ia=setupXhr();
|
|
748
749
|
ia.open('GET',W,!0);ia.setRequestHeader('Content-Type','text/css');ia.onload=function(){eval(ia.response)};ia.send()}function va(W){var ia='undefined'!=typeof W?T(W):M(this.id);if(!ia)throw Error('Popin name `'+W+'` not found !');W=document.getElementById(ia.id);var ea=ia.parentScripts,Aa=W.getElementsByTagName('script'),ma=ia.parentStyles,sa=W.getElementsByTagName('link'),Da=0,Qa=Aa.length,Ja=gina.config.hostname.replace(/(https|http|):\/\//,'').replace(/:\d+$/,'');for(Ja=new RegExp(Ja+':\\d+|'+
|
|
749
|
-
Ja);Da<Qa;++Da){if('undefined'==typeof Aa[Da].src||''==Aa[Da].src)continue;let Ia=Aa[Da].src.replace(/(https|http|):\/\//,'').replace(Ja,'');-1<ea.indexOf(Ia)||
|
|
750
|
+
Ja);Da<Qa;++Da){if('undefined'==typeof Aa[Da].src||''==Aa[Da].src)continue;let Ia=Aa[Da].src.replace(/(https|http|):\/\//,'').replace(Ja,'');-1<ea.indexOf(Ia)||v(Aa[Da].src)}Da=0;for(Qa=sa.length;Da<Qa;++Da)'undefined'!=typeof sa[Da].href&&''!=sa[Da].href&&(ea=sa[Da].href.replace(/(https|http|):\/\//,'').replace(Ja,''),-1<ma.indexOf(ea)||za(sa[Da].href));R({target:W,type:'loaded.'+ia.id},ia);/gina-popin-is-active/.test(W.className)||(W.className+=' gina-popin-is-active');if(!E.options.useDialogMode||
|
|
750
751
|
gina.config.envIsDev)/gina-popin-is-active/.test(n.target.firstChild.className)||(n.target.firstChild.className+=' gina-popin-is-active'),/gina-popin-is-active/.test(n.target.firstChild.className)&&removeListener(gina,n.target,'open.'+ia.id);E.options.useDialogMode&&!W.getAttribute('open')&&('function'===typeof W.showModal?gina.config.envIsDev?W.show():W.showModal():W.setAttribute('open',!0));ia.isOpen=!0;ia.target=W;n.activePopinId=ia.id;if(gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar)try{ginaToolbar.update('el-xhr',
|
|
751
752
|
ia.id)}catch(Ia){throw Ia;}triggerEvent(gina,n.target,'open.'+ia.id,ia)}function P(W,ia){var ea='undefined'!=typeof W?T(W):ha();if(!ea&&'undefined'!=typeof W)throw Error('Popin `'+W+'` not found !');if('undefined'!=typeof ea&&null!=ea&&(W=ea.target,ia='undefined'!=typeof ia?ia:!1,null!=W&&/gina-popin-is-active/.test(W.className))){ia||(n.target.firstChild.className=n.target.firstChild.className.replace(/\sgina-popin-is-active|gina-popin-is-active|gina-popin-is-active\s/,''),W.className=W.className.replace(/\sgina-popin-is-active|gina-popin-is-active|gina-popin-is-active\s/,
|
|
752
753
|
''),W.innerHTML='');if(z&&(ia=0,W=ea.$forms.length,z.$forms&&0<W))for(;ia<W;++ia)'undefined'!=typeof z.$forms[ea.$forms[ia]]&&z.$forms[ea.$forms[ia]].destroy(),ea.$forms.splice(ia,1);gina.popinIsBinded=!1;removeListener(gina,ea.target,'loaded.'+ea.id)}}function L(W){if('undefined'==typeof W&&/^true$/.test(this.isOpen)){W=this.name;var ia=this}else{ia=T(W)||ha();if(!ia)return;W=ia.name}if(!ia&&'undefined'!=typeof W)throw Error('Popin `'+W+'` not found !');if(ia.isOpen&&'undefined'!=typeof ia&&null!=
|
|
753
754
|
ia&&!ia.isRedirecting){var ea=ia.target;'function'===typeof ea.close?ea.close():ea.removeAttribute('open');removeListener(gina,ia.target,'ready.'+n.id);ia.hasForm&&(ia.hasForm=!1);if(null!=ea&&/gina-popin-is-active/.test(ea.className)){P(W);ia.isOpen=!1;gina.popinIsBinded=!1;GINA_ENV_IS_DEV&&gina&&'undefined'!=typeof window.ginaToolbar&&window.ginaToolbar&&ginaToolbar.restore();n.activePopinId=null;if(0<ia.$headers.length){W=0;ea=ia.$headers.length;try{for(;W<ea;++W)document.getElementById(ia.$headers[W].id).remove()}catch(Aa){console.warn('Could not remove script `'+
|
|
754
755
|
ia.$headers[W].id+'`\n'+Aa.stack)}ia.$headers=[]}triggerEvent(gina,ia.target,'close.'+ia.id,ia)}}}this.plugin='popin';var A='init loaded ready open close click destroy success error progress'.split(' ');registerEvents(this.plugin,A);var E={options:{name:void 0,'class':'gina-popin-default',useDialogMode:!0,cancelOnOverlayClick:!1},authorizedEvents:['ready','error'],events:{}},n={plugin:this.plugin,id:'gina-popins-'+Q.v4(),on,eventData:{},$popins:{},activePopinId:null,getActivePopin:null,target:document,
|
|
755
|
-
isReady:!1,initialized:!1},y={plugin:this.plugin,on,eventData:{},target:document,name:null,load:null,loadContent:null,open:null,isOpen:!1,isRedirecting:!1,close:null,$forms:[],hasForm:!1,$headers:[]},z=null,F=null,
|
|
756
|
-
W.appendChild(ia)}document.body.appendChild(W);n.target=W;n.on=on;gina.popinContainer=n.id},G=function(W,ia,ea){addListener(gina,W,'click',function(Aa){cancelEvent(Aa);triggerEvent(gina,ia,ea)})},M=function(W){return'undefined'!=typeof n.$popins[W]?n.$popins[W]:null},T=function(W){var ia=null,ea;for(ea in n.$popins)if(n.$popins[ea].name===W){ia=n.$popins[ea];break}return ia},
|
|
756
|
+
isReady:!1,initialized:!1},y={plugin:this.plugin,on,eventData:{},target:document,name:null,load:null,loadContent:null,open:null,isOpen:!1,isRedirecting:!1,close:null,$forms:[],hasForm:!1,$headers:[]},z=null,F=null,w=[],x=function(){var W=document.createElement('div');W.id=n.id;W.setAttribute('id',n.id);W.setAttribute('class','gina-popins');if(!E.options.useDialogMode||gina.config.envIsDev){var ia=document.createElement('div');ia.setAttribute('id','gina-popins-overlay');ia.setAttribute('class','gina-popins-overlay');
|
|
757
|
+
W.appendChild(ia)}document.body.appendChild(W);n.target=W;n.on=on;gina.popinContainer=n.id},G=function(W,ia,ea){addListener(gina,W,'click',function(Aa){cancelEvent(Aa);triggerEvent(gina,ia,ea)})},M=function(W){return'undefined'!=typeof n.$popins[W]?n.$popins[W]:null},T=function(W){var ia=null,ea;for(ea in n.$popins)if(n.$popins[ea].name===W){ia=n.$popins[ea];break}return ia},ra=function(W,ia){ia=getElementsByAttribute('data-gina-popin-name');var ea=null,Aa=null,ma=null,sa=null,Da=null,Qa=null;Da=
|
|
757
758
|
0;for(Qa=ia.length;Da<Qa;++Da){ea=ia[Da];Aa=ea.getAttribute('data-gina-popin-name');'A'==ea.tagName&&(ma=ea.getAttribute('href'),''==ma||'#'==ma||/#/.test(ma))&&(ma=null);ma||'undefined'==typeof ea.getAttribute('data-gina-popin-url')||(ma=ea.getAttribute('data-gina-popin-url'));if(!ma)throw Error('Found `data-gina-popin-name` without `url` !');ea.url||(ea.url=ma);ea.popinName||(ea.popinName=Aa);if(Aa==W.name&&(sa='popin.click.gina-popin-'+n.id+'-'+Q.v4()+'-'+Aa,ea.id=sa,ea.setAttribute('id',sa),!gina.events[sa])){addListener(gina,
|
|
758
759
|
ea,sa,function(Ia){cancelEvent(Ia);var Ha=!1;addListener(gina,W.target,'loaded.'+W.id,function(Fa){Fa.preventDefault();Ha||(Ha=!0,console.debug('active popin should be ',W.id),gina.popin.activePopinId=W.id,R(Fa,W),W.isOpen||va(W.name))});Ia={isSynchrone:!1,withCredentials:!1};Ia=U(W.options,Ia);var mb=this.getAttribute('data-gina-popin-url')||this.getAttribute('href');if(!mb)throw Error('Popin `url` not defined, please check value for `data-gina-popin-url`');u(W.name,mb,Ia)});Aa=ea.childNodes;var Ja=
|
|
759
760
|
0;lLen=Aa.length;if(0<lLen)for(;Ja<lLen;++Ja)'undefined'!=typeof Aa[Ja].tagName&&G(Aa[Ja],ea,sa)}}sa='click';addListener(gina,document,sa,function(Ia){if(null!=Ia.target.getAttribute('disabled')&&'false'!=Ia.target.getAttribute('disabled'))return!1;'undefined'==typeof Ia.target.id&&(Ia.target.setAttribute('id',sa+'.'+Q.v4()),Ia.target.id=Ia.target.getAttribute('id'));if(/^popin\.close\./.test(Ia.target.id)){cancelEvent(Ia);var Ha=Ia.target.id;triggerEvent(gina,Ia.target,Ha,Ia.detail)}/^popin\.click\./.test(Ia.target.id)&&
|
|
760
761
|
(cancelEvent(Ia),Ha=Ia.target.id,(new RegExp('^popin.click.gina-popin-'+n.id)).test(Ha)&&triggerEvent(gina,Ia.target,Ha,Ia.detail))});gina.popinIsBinded=!1},Ea={url:'',method:'GET',isSynchrone:!1,withCredentials:!0,headers:{'X-Requested-With':'XMLHttpRequest'}};gina.hasPopinHandler?(n.target=document.getElementById(gina.popinContainer),n.on=on):x();new V(function(W,ia){if(W)throw W;la=ia});return function(W){n.getPopinById=M;n.getPopinByName=T;n.load=u;n.loadContent=I;n.getActivePopin=ha;n.open=va;
|
|
761
|
-
n.close=L;addListener(gina,n.target,'init.'+n.id,function(ia){ia=null;if('undefined'==typeof n.$popins['gina-popin-'+n.id+'-'+W.name]){var ea=ia=U({},y);if('object'!=typeof W)throw Error('`options` must be an object');ea.options=U(W,E.options);ea.id='gina-popin-'+n.id+'-'+ea.options.name;if('undefined'==typeof n.$popins[ea.id]){if('string'!=typeof ea.options.name||''==ea.options.name)throw Error('`options.name` can not be left `empty` or `undefined`');if(-1<
|
|
762
|
+
n.close=L;addListener(gina,n.target,'init.'+n.id,function(ia){ia=null;if('undefined'==typeof n.$popins['gina-popin-'+n.id+'-'+W.name]){var ea=ia=U({},y);if('object'!=typeof W)throw Error('`options` must be an object');ea.options=U(W,E.options);ea.id='gina-popin-'+n.id+'-'+ea.options.name;if('undefined'==typeof n.$popins[ea.id]){if('string'!=typeof ea.options.name||''==ea.options.name)throw Error('`options.name` can not be left `empty` or `undefined`');if(-1<w.indexOf(ea.options.name))throw Error('`popin '+
|
|
762
763
|
ea.options.name+'` already exists !');'undefined'!=typeof ea.options.validator&&(z=ea.options.validator,ea.validateFormById=z.validateFormById);ea.options['class']='gina-popin-container '+ea.options['class'];ea.name=ea.options.name;ea.target=n.target;ea.load=u;ea.loadContent=I;ea.open=va;ea.close=L;GINA_ENV_IS_DEV&&(ea.updateToolbar=S);ea.parentScripts=[];ea.parentStyles=[];var Aa=gina.config.hostname.replace(/(https|http|):\/\//,'').replace(/:\d+$/,'');Aa=new RegExp(Aa+':\\d+|'+Aa);var ma=document.getElementsByTagName('script');
|
|
763
764
|
for(let Da=0,Qa=ma.length;Da<Qa;Da++)if(ma[Da].src&&''!=ma[Da].src){var sa=ma[Da].src.replace(/(https|http|):\/\//,'').replace(Aa,'');ea.parentScripts[Da]=sa}ma=document.getElementsByTagName('link');for(let Da=0,Qa=ma.length;Da<Qa;Da++)'undefined'!=typeof ma[Da].rel&&/stylesheet/i.test(ma[Da].rel)&&(sa=ma[Da].href.replace(/(https|http|):\/\//,'').replace(Aa,''),ea.parentStyles[Da]=sa);n.$popins[ea.id]=ea;if(window.XMLHttpRequest)F=new XMLHttpRequest;else if(window.ActiveXObject)try{F=new ActiveXObject('Msxml2.XMLHTTP')}catch(Da){try{F=
|
|
764
|
-
new ActiveXObject('Microsoft.XMLHTTP')}catch(Qa){}}
|
|
765
|
+
new ActiveXObject('Microsoft.XMLHTTP')}catch(Qa){}}ra(ea)}}n.isReady=!0;gina.hasPopinHandler=!0;gina.popin=U(gina.popin,n);triggerEvent(gina,n.target,'ready.'+n.id,ia)});n.initialized=!0;return n}(N)}});
|
|
765
766
|
'function'!==typeof Object.assign&&Object.defineProperty(Object,'assign',{value:function(B,Q){if(null===B||void 0===B)throw new TypeError('Cannot convert undefined or null to object');for(var V=Object(B),la=1;la<arguments.length;la++){var U=arguments[la];if(null!==U&&void 0!==U)for(var N in U)Object.prototype.hasOwnProperty.call(U,N)&&(V[N]=U[N])}return V},writable:!0,configurable:!0});
|
|
766
767
|
if('undefined'==typeof JSON.clone){var clone=function(B,Q){if(null==B||'object'!=typeof B||B.constructor!=Object&&B.constructor!=Array)return B;if(B.constructor==Date||B.constructor==RegExp||B.constructor==Function||B.constructor==String||B.constructor==Number||B.constructor==Boolean)return new B.constructor(B);Q=Q||new B.constructor;for(var V=0,la=Object.getOwnPropertyNames(B).length||0,U=Object.keys(B);V<la;)Q[U[V]]='undefined'==typeof Q[U[V]]?clone(B[U[V]],null):Q[U[V]],V++;return Q};JSON.clone=
|
|
767
768
|
clone}if('undefined'==typeof JSON.escape){var escape=function(B){try{return B.replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/\t/g,'\\t')}catch(Q){throw Q;}};JSON.escape=escape}define('utils/polyfill',function(){});
|