[TASK] Upgrade grunt-contrib-uglify 2.0.0 ❯ 3.3.0 32/55932/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 28 Feb 2018 06:48:52 +0000 (07:48 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Wed, 28 Feb 2018 10:22:55 +0000 (11:22 +0100)
Commands:
yarn upgrade grunt-contrib-uglify --latest

Upgrades:
uglify-js 2.7.5 > 3.3.12

Change-Id: I082a92d87ef1616488c0d8ddcf3801617a37eb50
Resolves: #84075
Releases: master
Reviewed-on: https://review.typo3.org/55932
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
241 files changed:
Build/Gruntfile.js
Build/package.json
Build/yarn.lock
typo3/sysext/backend/Resources/Public/JavaScript/BackendException.js
typo3/sysext/backend/Resources/Public/JavaScript/ColorPicker.js
typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
typo3/sysext/backend/Resources/Public/JavaScript/DateTimePicker.js
typo3/sysext/backend/Resources/Public/JavaScript/DebugConsole.js
typo3/sysext/backend/Resources/Public/JavaScript/DocumentHeader.js
typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js
typo3/sysext/backend/Resources/Public/JavaScript/Enum/KeyTypes.js
typo3/sysext/backend/Resources/Public/JavaScript/Enum/Severity.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/ClientRequest.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/Consumable.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/ConsumerScope.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/InteractionRequest.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/InteractionRequestAssignment.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/InteractionRequestMap.js
typo3/sysext/backend/Resources/Public/JavaScript/Event/TriggerRequest.js
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineReview.js
typo3/sysext/backend/Resources/Public/JavaScript/GridEditor.js
typo3/sysext/backend/Resources/Public/JavaScript/Icons.js
typo3/sysext/backend/Resources/Public/JavaScript/ImageManipulation.js
typo3/sysext/backend/Resources/Public/JavaScript/InfoWindow.js
typo3/sysext/backend/Resources/Public/JavaScript/Login.js
typo3/sysext/backend/Resources/Public/JavaScript/Modal.js
typo3/sysext/backend/Resources/Public/JavaScript/NewMultiplePages.js
typo3/sysext/backend/Resources/Public/JavaScript/Notification.js
typo3/sysext/backend/Resources/Public/JavaScript/PageActions.js
typo3/sysext/backend/Resources/Public/JavaScript/Popover.js
typo3/sysext/backend/Resources/Public/JavaScript/RenameFile.js
typo3/sysext/backend/Resources/Public/JavaScript/Severity.js
typo3/sysext/backend/Resources/Public/JavaScript/SplitButtons.js
typo3/sysext/backend/Resources/Public/JavaScript/Storage.js
typo3/sysext/backend/Resources/Public/JavaScript/Storage/Client.js
typo3/sysext/backend/Resources/Public/JavaScript/Storage/Persistent.js
typo3/sysext/backend/Resources/Public/JavaScript/Tabs.js
typo3/sysext/backend/Resources/Public/JavaScript/ToggleSearchToolbox.js
typo3/sysext/backend/Resources/Public/JavaScript/Toolbar.js
typo3/sysext/backend/Resources/Public/JavaScript/UserPassLogin.js
typo3/sysext/backend/Resources/Public/JavaScript/Utility.js
typo3/sysext/backend/Resources/Public/JavaScript/Wizard/NewContentElement.js
typo3/sysext/backend/Tests/JavaScript/BackendExceptionTest.js
typo3/sysext/backend/Tests/JavaScript/GridEditorTest.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap-datetimepicker.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/core.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/draggable.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/droppable.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/mouse.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/position.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/resizable.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/selectable.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui/widget.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/nprogress.js
typo3/sysext/core/Resources/Public/JavaScript/Contrib/require.js
typo3/sysext/install/Resources/Public/JavaScript/chosen.jquery.min.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/comment/comment.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/comment/continuecomment.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/dialog/dialog.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/autorefresh.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/fullscreen.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/panel.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/placeholder.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/rulers.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/closebrackets.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/closetag.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/continuelist.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/matchbrackets.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/matchtags.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/trailingspace.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/brace-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/comment-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/foldcode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/foldgutter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/indent-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/markdown-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/xml-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/anyword-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/css-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/html-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/javascript-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/show-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/sql-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/xml-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/coffeescript-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/css-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/html-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/javascript-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/json-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/yaml-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/merge/merge.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/loadmode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/multiplex.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/multiplex_test.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/overlay.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/simple.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/colorize.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode-standalone.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode.node.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/annotatescrollbar.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/scrollpastend.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/simplescrollbars.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/jump-to-line.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/match-highlighter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/matchesonscrollbar.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/search.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/searchcursor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/active-line.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/mark-selection.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/selection-pointer.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/tern/tern.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/tern/worker.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/wrap/hardwrap.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/emacs.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/sublime.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/vim.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/lib/codemirror.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/apl/apl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asciiarmor/asciiarmor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asn.1/asn.1.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asterisk/asterisk.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/brainfuck/brainfuck.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/clike/clike.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/clojure/clojure.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cmake/cmake.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cobol/cobol.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/coffeescript/coffeescript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/commonlisp/commonlisp.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/crystal/crystal.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/css/css.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cypher/cypher.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/d/d.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dart/dart.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/diff/diff.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/django/django.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dockerfile/dockerfile.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dtd/dtd.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dylan/dylan.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ebnf/ebnf.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ecl/ecl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/eiffel/eiffel.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/elm/elm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/erlang/erlang.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/factor/factor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/fcl/fcl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/forth/forth.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/fortran/fortran.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gas/gas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gfm/gfm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gherkin/gherkin.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/go/go.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/groovy/groovy.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haml/haml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/handlebars/handlebars.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haskell-literate/haskell-literate.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haskell/haskell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haxe/haxe.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/htmlembedded/htmlembedded.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/htmlmixed/htmlmixed.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/http/http.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/idl/idl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/javascript/javascript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/jinja2/jinja2.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/jsx/jsx.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/julia/julia.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/livescript/livescript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/lua/lua.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/markdown/markdown.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mathematica/mathematica.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mbox/mbox.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/meta.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mirc/mirc.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mllike/mllike.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/modelica/modelica.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mscgen/mscgen.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mumps/mumps.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/nginx/nginx.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/nsis/nsis.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ntriples/ntriples.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/octave/octave.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/oz/oz.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pascal/pascal.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pegjs/pegjs.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/perl/perl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/php/php.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pig/pig.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/powershell/powershell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/properties/properties.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/protobuf/protobuf.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pug/pug.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/puppet/puppet.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/python/python.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/q/q.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/r/r.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rpm/rpm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rst/rst.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ruby/ruby.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rust/rust.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sas/sas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sass/sass.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/scheme/scheme.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/shell/shell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sieve/sieve.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/slim/slim.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/smalltalk/smalltalk.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/smarty/smarty.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/solr/solr.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/soy/soy.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sparql/sparql.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/spreadsheet/spreadsheet.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sql/sql.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/stex/stex.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/stylus/stylus.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/swift/swift.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tcl/tcl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/textile/textile.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiddlywiki/tiddlywiki.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiki/tiki.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/toml/toml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tornado/tornado.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/troff/troff.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ttcn-cfg/ttcn-cfg.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ttcn/ttcn.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/turtle/turtle.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/twig/twig.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vb/vb.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vbscript/vbscript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/velocity/velocity.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/verilog/verilog.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vhdl/vhdl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vue/vue.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/webidl/webidl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/xml/xml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/xquery/xquery.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yacas/yacas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yaml-frontmatter/yaml-frontmatter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yaml/yaml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/z80/z80.js
typo3/sysext/t3editor/Resources/Public/JavaScript/T3editor.js

index 9eb05d3..f371bc4 100644 (file)
@@ -524,8 +524,7 @@ module.exports = function (grunt) {
           ' *\n' +
           ' * The TYPO3 project - inspiring people to share!' +
           '\n' +
-          ' */' +
-          '\n'
+          ' */'
         },
         // Generated by copy:ts_files task
         files: {}
index 0a248d9..cc419ce 100644 (file)
@@ -33,7 +33,7 @@
     "font-awesome": "^4.7.0",
     "grunt": "~1.0.1",
     "grunt-contrib-copy": "^1.0.0",
-    "grunt-contrib-uglify": "2.0.0",
+    "grunt-contrib-uglify": "3.3.0",
     "grunt-contrib-watch": "~1.0.0",
     "grunt-exec": "^2.0.0",
     "grunt-npm-install": "^0.3.1",
index 431895b..4c23a01 100644 (file)
@@ -268,10 +268,6 @@ async@1.x, async@^1.4.0, async@^1.5.0, async@~1.5.2:
   version "1.5.2"
   resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
 
-async@~0.2.6:
-  version "0.2.10"
-  resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
-
 asynckit@^0.4.0:
   version "0.4.0"
   resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -703,7 +699,7 @@ commander@^2.12.1:
   version "2.13.0"
   resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
 
-commander@^2.9.0:
+commander@^2.9.0, commander@~2.14.1:
   version "2.14.1"
   resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
 
@@ -1835,14 +1831,13 @@ grunt-contrib-copy@^1.0.0:
     chalk "^1.1.1"
     file-sync-cmp "^0.1.0"
 
-grunt-contrib-uglify@2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/grunt-contrib-uglify/-/grunt-contrib-uglify-2.0.0.tgz#8c9970d690936cde6d25aa1193549bd929016930"
+grunt-contrib-uglify@3.3.0:
+  version "3.3.0"
+  resolved "https://registry.yarnpkg.com/grunt-contrib-uglify/-/grunt-contrib-uglify-3.3.0.tgz#dcc29bee1dd4768698930e46fb8bff8e8d37fb08"
   dependencies:
     chalk "^1.0.0"
-    lodash.assign "^4.0.9"
     maxmin "^1.1.0"
-    uglify-js "~2.7.0"
+    uglify-js "~3.3.0"
     uri-path "^1.0.0"
 
 grunt-contrib-watch@~1.0.0:
@@ -2675,7 +2670,7 @@ lodash._root@~3.0.0:
   version "3.0.1"
   resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
 
-lodash.assign@^4.0.9, lodash.assign@^4.2.0:
+lodash.assign@^4.2.0:
   version "4.2.0"
   resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
 
@@ -4168,7 +4163,7 @@ source-map@^0.4.2, source-map@^0.4.4:
   dependencies:
     amdefine ">=0.0.4"
 
-source-map@^0.6.1:
+source-map@^0.6.1, source-map@~0.6.1:
   version "0.6.1"
   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
 
@@ -4659,14 +4654,12 @@ uglify-js@^2.6:
   optionalDependencies:
     uglify-to-browserify "~1.0.0"
 
-uglify-js@~2.7.0:
-  version "2.7.5"
-  resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
+uglify-js@~3.3.0:
+  version "3.3.12"
+  resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.12.tgz#efd87c16a1f4c674a8a5ede571001ef634dcc883"
   dependencies:
-    async "~0.2.6"
-    source-map "~0.5.1"
-    uglify-to-browserify "~1.0.0"
-    yargs "~3.10.0"
+    commander "~2.14.1"
+    source-map "~0.6.1"
 
 uglify-to-browserify@~1.0.0:
   version "1.0.2"
index 49c589e..b6f85a9 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){function a(a,b){void 0===a&&(a=""),void 0===b&&(b=0),this.message=a,this.code=b}return a}();b.BackendException=c});
\ No newline at end of file
+define(["require","exports"],function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var t=function(e,i){void 0===e&&(e=""),void 0===i&&(i=0),this.message=e,this.code=i};i.BackendException=t});
\ No newline at end of file
index 775814a..02a7e86 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","TYPO3/CMS/Core/Contrib/jquery.minicolors"],function(a,b,c){"use strict";var d=function(){function a(){this.selector=".t3js-color-picker"}return a.prototype.initialize=function(){c(this.selector).minicolors({format:"hex",position:"bottom left",theme:"bootstrap"}),c(document).on("change",".t3js-colorpicker-value-trigger",function(a){var b=c(a.target);""!==b.val()&&(b.closest(".t3js-formengine-field-item").find(".t3js-color-picker").val(b.val()).trigger("paste"),b.val(""))})},a}();return new d});
\ No newline at end of file
+define(["require","exports","jquery","TYPO3/CMS/Core/Contrib/jquery.minicolors"],function(t,e,o){"use strict";return new(function(){function t(){this.selector=".t3js-color-picker"}return t.prototype.initialize=function(){o(this.selector).minicolors({format:"hex",position:"bottom left",theme:"bootstrap"}),o(document).on("change",".t3js-colorpicker-value-trigger",function(t){var e=o(t.target);""!==e.val()&&(e.closest(".t3js-formengine-field-item").find(".t3js-color-picker").val(e.val()).trigger("paste"),e.val(""))})},t}())});
\ No newline at end of file
index bf9be08..d8b8821 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Popover","bootstrap"],function(a,b,c,d){"use strict";var e=function(){function a(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".t3-help-link",this.initialize()}return a.resolveBackend=function(){return"undefined"!=typeof window.opener&&null!==window.opener?window.opener.top:top},a.prototype.initialize=function(){var b=this,e=a.resolveBackend();"undefined"!=typeof e.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=e.TYPO3.settings.ContextHelp.moduleUrl),"undefined"==typeof TYPO3.ShortcutMenu&&"undefined"==typeof e.TYPO3.ShortcutMenu&&c(".icon-actions-system-shortcut-new").closest(".btn").hide();var f="&nbsp;";"undefined"!=typeof e.TYPO3.lang&&(f=e.TYPO3.lang.csh_tooltip_loading);var g=c(this.selector);g.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",f).attr("data-placement",this.placement).attr("data-trigger",this.trigger),d.popover(g),c(document).on("show.bs.popover",this.selector,function(a){var e=c(a.currentTarget),f=e.data("description");"undefined"!=typeof f&&""!==f?d.setOptions(e,{title:e.data("title"),content:f}):"false"===e.attr("data-loaded")&&e.data("table")&&b.loadHelp(e),e.closest(".t3js-module-docheader").length&&d.setOption(e,"placement","bottom")}).on("shown.bs.popover",this.selector,function(a){var b=c(a.target).data("bs.popover").$tip;b.find(".popover-title").is(":visible")||b.addClass("no-title")}).on("click",".tipIsLinked",function(a){c(".popover").each(function(d,e){var f=c(e);f.has(a.target).length&&(console.log(f.data("bs.popover")),b.showHelpPopup(f.data("bs.popover").$element))})}).on("click","body",function(a){c(b.selector).each(function(b,e){var f=c(e);f.is(a.target)||0!==f.has(a.target).length||0!==c(".popover").has(a.target).length||d.hide(f)})})},a.prototype.showHelpPopup=function(a){try{var b=window.open(this.helpModuleUrl+"&tx_documentation_help_documentationcshmanual[table]="+a.data("table")+"&tx_documentation_help_documentationcshmanual[field]="+a.data("field"),"ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return b.focus(),d.hide(a),b}catch(a){}},a.prototype.loadHelp=function(a){var b=a.data("table"),e=a.data("field");b&&c.getJSON(this.ajaxUrl,{params:{action:"getContextHelp",table:b,field:e}}).done(function(b){var c=b.title||"",e=b.content||"<p></p>";d.setOptions(a,{title:c,content:e}),a.attr("data-loaded","true").one("hidden.bs.popover",function(){d.show(a)}),d.hide(a)})},a}();return new e});
\ No newline at end of file
+define(["require","exports","jquery","./Popover","bootstrap"],function(t,e,o,n){"use strict";return new(function(){function t(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".t3-help-link",this.initialize()}return t.resolveBackend=function(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top},t.prototype.initialize=function(){var e=this,a=t.resolveBackend();void 0!==a.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=a.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===a.TYPO3.ShortcutMenu&&o(".icon-actions-system-shortcut-new").closest(".btn").hide();var i="&nbsp;";void 0!==a.TYPO3.lang&&(i=a.TYPO3.lang.csh_tooltip_loading);var r=o(this.selector);r.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",i).attr("data-placement",this.placement).attr("data-trigger",this.trigger),n.popover(r),o(document).on("show.bs.popover",this.selector,function(t){var a=o(t.currentTarget),i=a.data("description");void 0!==i&&""!==i?n.setOptions(a,{title:a.data("title"),content:i}):"false"===a.attr("data-loaded")&&a.data("table")&&e.loadHelp(a),a.closest(".t3js-module-docheader").length&&n.setOption(a,"placement","bottom")}).on("shown.bs.popover",this.selector,function(t){var e=o(t.target).data("bs.popover").$tip;e.find(".popover-title").is(":visible")||e.addClass("no-title")}).on("click",".tipIsLinked",function(t){o(".popover").each(function(n,a){var i=o(a);i.has(t.target).length&&(console.log(i.data("bs.popover")),e.showHelpPopup(i.data("bs.popover").$element))})}).on("click","body",function(t){o(e.selector).each(function(e,a){var i=o(a);i.is(t.target)||0!==i.has(t.target).length||0!==o(".popover").has(t.target).length||n.hide(i)})})},t.prototype.showHelpPopup=function(t){try{var e=window.open(this.helpModuleUrl+"&tx_documentation_help_documentationcshmanual[table]="+t.data("table")+"&tx_documentation_help_documentationcshmanual[field]="+t.data("field"),"ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return e.focus(),n.hide(t),e}catch(t){}},t.prototype.loadHelp=function(t){var e=t.data("table"),a=t.data("field");e&&o.getJSON(this.ajaxUrl,{params:{action:"getContextHelp",table:e,field:a}}).done(function(e){var o=e.title||"",a=e.content||"<p></p>";n.setOptions(t,{title:o,content:a}),t.attr("data-loaded","true").one("hidden.bs.popover",function(){n.show(t)}),n.hide(t)})},t}())});
\ No newline at end of file
index c8155e9..7364eb8 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","moment","./Storage/Persistent"],function(a,b,c,d,e){"use strict";var f=function(){function b(){var a=this;this.fieldSelector=".t3js-datetimepicker",this.format=(null!=opener&&"undefined"!=typeof opener.top.TYPO3?opener.top:top).TYPO3.settings.DateTimePicker.DateFormat,c(function(){a.initialize()})}return b.formatDateForHiddenField=function(a,b){return"time"!==b&&"timesec"!==b||a.year(1970).month(0).date(1),a.format()},b.prototype.initialize=function(){var f=this,g=c(this.fieldSelector).filter(function(a,b){return"undefined"==typeof c(b).data("DateTimePicker")});g.length>0&&a(["twbs/bootstrap-datetimepicker"],function(){var a=e.get("lang");"ch"===a&&(a="zh-cn");var h=!!a&&d.locale(a);g.each(function(a,b){f.initializeField(c(b),h)}),g.on("blur",function(a){var e=c(a.currentTarget),f=e.parent().parent().find('input[type="hidden"]');if(""===e.val())f.val("");else{var g=e.data("dateType"),h=e.data("DateTimePicker").format(),i=d.utc(e.val(),h);i.isValid()?f.val(b.formatDateForHiddenField(i,g)):e.val(b.formatDateForHiddenField(d.utc(f.val()),g))}}),g.on("dp.change",function(a){var d=c(a.currentTarget),e=d.parent().parent().find("input[type=hidden]"),g=d.data("dateType"),h="";""!==d.val()&&(h=b.formatDateForHiddenField(a.date.utc(),g)),e.val(h),c(document).trigger("formengine.dp.change",[c(f)])})})},b.prototype.initializeField=function(a,b){var c=this.format,e=a.data("dateType"),f={format:"",locale:"",sideBySide:!0,showTodayButton:!0,toolbarPlacement:"bottom",icons:{time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-calendar-o",clear:"fa fa-trash"}};switch(e){case"datetime":f.format=c[1];break;case"date":f.format=c[0];break;case"time":f.format="HH:mm";break;case"timesec":f.format="HH:mm:ss";break;case"year":f.format="YYYY"}a.data("dateMindate")&&a.data("dateMindate",d.unix(a.data("dateMindate")).format(f.format)),a.data("dateMaxdate")&&a.data("dateMaxdate",d.unix(a.data("dateMaxdate")).format(f.format)),b&&(f.locale=b),a.datetimepicker(f)},b}();return new f});
\ No newline at end of file
+define(["require","exports","jquery","moment","./Storage/Persistent"],function(e,t,a,i,r){"use strict";return new(function(){function t(){var e=this;this.fieldSelector=".t3js-datetimepicker",this.format=(null!=opener&&void 0!==opener.top.TYPO3?opener.top:top).TYPO3.settings.DateTimePicker.DateFormat,a(function(){e.initialize()})}return t.formatDateForHiddenField=function(e,t){return"time"!==t&&"timesec"!==t||e.year(1970).month(0).date(1),e.format()},t.prototype.initialize=function(){var n=this,o=a(this.fieldSelector).filter(function(e,t){return void 0===a(t).data("DateTimePicker")});o.length>0&&e(["twbs/bootstrap-datetimepicker"],function(){var e=r.get("lang");"ch"===e&&(e="zh-cn");var d=!!e&&i.locale(e);o.each(function(e,t){n.initializeField(a(t),d)}),o.on("blur",function(e){var r=a(e.currentTarget),n=r.parent().parent().find('input[type="hidden"]');if(""===r.val())n.val("");else{var o=r.data("dateType"),d=r.data("DateTimePicker").format(),f=i.utc(r.val(),d);f.isValid()?n.val(t.formatDateForHiddenField(f,o)):r.val(t.formatDateForHiddenField(i.utc(n.val()),o))}}),o.on("dp.change",function(e){var i=a(e.currentTarget),r=i.parent().parent().find("input[type=hidden]"),o=i.data("dateType"),d="";""!==i.val()&&(d=t.formatDateForHiddenField(e.date.utc(),o)),r.val(d),a(document).trigger("formengine.dp.change",[a(n)])})})},t.prototype.initializeField=function(e,t){var a=this.format,r={format:"",locale:"",sideBySide:!0,showTodayButton:!0,toolbarPlacement:"bottom",icons:{time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-calendar-o",clear:"fa fa-trash"}};switch(e.data("dateType")){case"datetime":r.format=a[1];break;case"date":r.format=a[0];break;case"time":r.format="HH:mm";break;case"timesec":r.format="HH:mm:ss";break;case"year":r.format="YYYY"}e.data("dateMindate")&&e.data("dateMindate",i.unix(e.data("dateMindate")).format(r.format)),e.data("dateMaxdate")&&e.data("dateMaxdate",i.unix(e.data("dateMaxdate")).format(r.format)),t&&(r.locale=t),e.datetimepicker(r)},t}())});
\ No newline at end of file
index 6fda0a1..e48abca 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d=function(){function a(){var a=this;this.settings={autoscroll:!0},c(function(){a.createDom()})}return a.incrementInactiveTabCounter=function(a){if(!a.hasClass("active")){var b=a.find(".badge"),c=parseInt(b.text(),10);isNaN(c)&&(c=0),b.text(++c)}},a.prototype.add=function(b,d,e){this.attachToViewport();var f=c("<p />").html(b);"undefined"!=typeof d&&d.length>0&&f.prepend(c("<strong />").text(d)),"undefined"!=typeof e&&0!==e.length||(e="Debug");var g="debugtab-"+e.toLowerCase().replace(/\W+/g,"-"),h=this.$consoleDom.find(".t3js-debuggroups"),i=this.$consoleDom.find(".t3js-debugcontent"),j=this.$consoleDom.find(".t3js-debuggroups li[data-identifier="+g+"]");0===j.length&&(j=c("<li />",{role:"presentation","data-identifier":g}).append(c("<a />",{"aria-controls":g,"data-toggle":"tab",href:"#"+g,role:"tab"}).text(e+" ").append(c("<span />",{class:"badge"}))).on("shown.bs.tab",function(a){c(a.currentTarget).find(".badge").text("")}),h.append(j),i.append(c("<div />",{role:"tabpanel",class:"tab-pane",id:g}).append(c("<div />",{class:"t3js-messages messages"})))),0===h.find(".active").length&&h.find("a:first").tab("show"),a.incrementInactiveTabCounter(j),this.incrementUnreadMessagesIfCollapsed();var k=c("#"+g+" .t3js-messages"),l=k.parent().hasClass("active");k.append(f),this.settings.autoscroll&&l&&k.scrollTop(k.prop("scrollHeight"))},a.prototype.createDom=function(){var a=this;"undefined"==typeof this.$consoleDom&&(this.$consoleDom=c("<div />",{id:"typo3-debug-console"}).append(c("<div />",{class:"t3js-topbar topbar"}).append(c("<p />",{class:"pull-left"}).text(" TYPO3 Debug Console").prepend(c("<span />",{class:"fa fa-terminal topbar-icon"})).append(c("<span />",{class:"badge"})),c("<div />",{class:"t3js-buttons btn-group pull-right"})),c("<div />").append(c("<div />",{role:"tabpanel"}).append(c("<ul />",{class:"nav nav-tabs t3js-debuggroups",role:"tablist"})),c("<div />",{class:"tab-content t3js-debugcontent"}))),this.addButton(c("<button />",{class:"btn btn-default btn-sm "+(this.settings.autoscroll?"active":""),title:TYPO3.lang["debuggerconsole.autoscroll"]}).append(c("<span />",{class:"t3-icon fa fa-magnet"})),function(){c(a).button("toggle"),a.settings.autoscroll=!a.settings.autoscroll}).addButton(c("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.toggle.collapse"]}).append(c("<span />",{class:"t3-icon fa fa-chevron-down"})),function(b){var d=c(b.currentTarget),e=d.find(".t3-icon"),f=a.$consoleDom.find(".t3js-topbar").next();f.toggle(),f.is(":visible")?(d.attr("title",TYPO3.lang["debuggerconsole.toggle.collapse"]),e.toggleClass("fa-chevron-down",!0).toggleClass("fa-chevron-up",!1),a.resetGlobalUnreadCounter()):(d.attr("title",TYPO3.lang["debuggerconsole.toggle.expand"]),e.toggleClass("fa-chevron-down",!1).toggleClass("fa-chevron-up",!0))}).addButton(c("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.clear"]}).append(c("<span />",{class:"t3-icon fa fa-undo"})),function(){a.flush()}).addButton(c("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.close"]}).append(c("<span />",{class:"t3-icon fa fa-times"})),function(){a.destroy(),a.createDom()}))},a.prototype.addButton=function(a,b){return a.on("click",b),this.$consoleDom.find(".t3js-buttons").append(a),this},a.prototype.attachToViewport=function(){var a=c(".t3js-scaffold-content");0===a.has(this.$consoleDom).length&&a.append(this.$consoleDom)},a.prototype.incrementUnreadMessagesIfCollapsed=function(){var a=this.$consoleDom.find(".t3js-topbar"),b=a.next();if(b.is(":hidden")){var c=a.find(".badge"),d=parseInt(c.text(),10);isNaN(d)&&(d=0),c.text(++d)}},a.prototype.resetGlobalUnreadCounter=function(){this.$consoleDom.find(".t3js-topbar").find(".badge").text("")},a.prototype.flush=function(){var a=this.$consoleDom.find(".t3js-debuggroups"),b=this.$consoleDom.find(".t3js-debugcontent");a.children().remove(),b.children().remove()},a.prototype.destroy=function(){this.$consoleDom.remove(),this.$consoleDom=void 0},a}(),e=new d;return TYPO3.DebugConsole=e,e});
\ No newline at end of file
+define(["require","exports","jquery"],function(t,e,n){"use strict";var o=new(function(){function t(){var t=this;this.settings={autoscroll:!0},n(function(){t.createDom()})}return t.incrementInactiveTabCounter=function(t){if(!t.hasClass("active")){var e=t.find(".badge"),n=parseInt(e.text(),10);isNaN(n)&&(n=0),e.text(++n)}},t.prototype.add=function(e,o,s){this.attachToViewport();var a=n("<p />").html(e);void 0!==o&&o.length>0&&a.prepend(n("<strong />").text(o)),void 0!==s&&0!==s.length||(s="Debug");var l="debugtab-"+s.toLowerCase().replace(/\W+/g,"-"),i=this.$consoleDom.find(".t3js-debuggroups"),r=this.$consoleDom.find(".t3js-debugcontent"),c=this.$consoleDom.find(".t3js-debuggroups li[data-identifier="+l+"]");0===c.length&&(c=n("<li />",{role:"presentation","data-identifier":l}).append(n("<a />",{"aria-controls":l,"data-toggle":"tab",href:"#"+l,role:"tab"}).text(s+" ").append(n("<span />",{class:"badge"}))).on("shown.bs.tab",function(t){n(t.currentTarget).find(".badge").text("")}),i.append(c),r.append(n("<div />",{role:"tabpanel",class:"tab-pane",id:l}).append(n("<div />",{class:"t3js-messages messages"})))),0===i.find(".active").length&&i.find("a:first").tab("show"),t.incrementInactiveTabCounter(c),this.incrementUnreadMessagesIfCollapsed();var d=n("#"+l+" .t3js-messages"),p=d.parent().hasClass("active");d.append(a),this.settings.autoscroll&&p&&d.scrollTop(d.prop("scrollHeight"))},t.prototype.createDom=function(){var t=this;void 0===this.$consoleDom&&(this.$consoleDom=n("<div />",{id:"typo3-debug-console"}).append(n("<div />",{class:"t3js-topbar topbar"}).append(n("<p />",{class:"pull-left"}).text(" TYPO3 Debug Console").prepend(n("<span />",{class:"fa fa-terminal topbar-icon"})).append(n("<span />",{class:"badge"})),n("<div />",{class:"t3js-buttons btn-group pull-right"})),n("<div />").append(n("<div />",{role:"tabpanel"}).append(n("<ul />",{class:"nav nav-tabs t3js-debuggroups",role:"tablist"})),n("<div />",{class:"tab-content t3js-debugcontent"}))),this.addButton(n("<button />",{class:"btn btn-default btn-sm "+(this.settings.autoscroll?"active":""),title:TYPO3.lang["debuggerconsole.autoscroll"]}).append(n("<span />",{class:"t3-icon fa fa-magnet"})),function(){n(t).button("toggle"),t.settings.autoscroll=!t.settings.autoscroll}).addButton(n("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.toggle.collapse"]}).append(n("<span />",{class:"t3-icon fa fa-chevron-down"})),function(e){var o=n(e.currentTarget),s=o.find(".t3-icon"),a=t.$consoleDom.find(".t3js-topbar").next();a.toggle(),a.is(":visible")?(o.attr("title",TYPO3.lang["debuggerconsole.toggle.collapse"]),s.toggleClass("fa-chevron-down",!0).toggleClass("fa-chevron-up",!1),t.resetGlobalUnreadCounter()):(o.attr("title",TYPO3.lang["debuggerconsole.toggle.expand"]),s.toggleClass("fa-chevron-down",!1).toggleClass("fa-chevron-up",!0))}).addButton(n("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.clear"]}).append(n("<span />",{class:"t3-icon fa fa-undo"})),function(){t.flush()}).addButton(n("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.close"]}).append(n("<span />",{class:"t3-icon fa fa-times"})),function(){t.destroy(),t.createDom()}))},t.prototype.addButton=function(t,e){return t.on("click",e),this.$consoleDom.find(".t3js-buttons").append(t),this},t.prototype.attachToViewport=function(){var t=n(".t3js-scaffold-content");0===t.has(this.$consoleDom).length&&t.append(this.$consoleDom)},t.prototype.incrementUnreadMessagesIfCollapsed=function(){var t=this.$consoleDom.find(".t3js-topbar");if(t.next().is(":hidden")){var e=t.find(".badge"),n=parseInt(e.text(),10);isNaN(n)&&(n=0),e.text(++n)}},t.prototype.resetGlobalUnreadCounter=function(){this.$consoleDom.find(".t3js-topbar").find(".badge").text("")},t.prototype.flush=function(){var t=this.$consoleDom.find(".t3js-debuggroups"),e=this.$consoleDom.find(".t3js-debugcontent");t.children().remove(),e.children().remove()},t.prototype.destroy=function(){this.$consoleDom.remove(),this.$consoleDom=void 0},t}());return TYPO3.DebugConsole=o,o});
\ No newline at end of file
index 20a8ac0..3c83317 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d=function(){function a(){var a=this;this.$documentHeader=null,this.$documentHeaderBars=null,this.$documentHeaderNavigationBar=null,this.$documentHeaderSearchBar=null,this.$moduleBody=null,this.direction="down",this.reactionRange=300,this.lastPosition=0,this.currentPosition=0,this.changedPosition=0,this.settings={margin:24,offset:100,selectors:{moduleDocumentHeader:".t3js-module-docheader",moduleDocheaderBar:".t3js-module-docheader-bar",moduleNavigationBar:".t3js-module-docheader-bar-navigation",moduleButtonBar:".t3js-module-docheader-bar-buttons",moduleSearchBar:".t3js-module-docheader-bar-search",moduleBody:".t3js-module-body"}},this.reposition=function(){a.$documentHeader.css("height","auto"),a.$documentHeaderBars.css("height","auto"),a.$moduleBody.css("padding-top",a.$documentHeader.outerHeight()+a.settings.margin)},this.scroll=function(b){a.currentPosition=c(b.currentTarget).scrollTop(),a.currentPosition>a.lastPosition?"down"!==a.direction&&(a.direction="down",a.changedPosition=a.currentPosition):a.currentPosition<a.lastPosition&&"up"!==a.direction&&(a.direction="up",a.changedPosition=a.currentPosition),"up"===a.direction&&a.changedPosition-a.reactionRange<a.currentPosition&&a.$documentHeader.css("margin-top",0),"down"===a.direction&&a.changedPosition+a.reactionRange<a.currentPosition&&a.$documentHeader.css("margin-top",(a.$documentHeaderNavigationBar.outerHeight()+4)*-1),a.lastPosition=a.currentPosition},c(function(){a.initialize()})}return a.prototype.initialize=function(){this.$documentHeader=c(this.settings.selectors.moduleDocumentHeader),this.$documentHeader.length>0&&(this.$documentHeaderBars=c(this.settings.selectors.moduleDocheaderBar),this.$documentHeaderNavigationBar=c(this.settings.selectors.moduleNavigationBar),this.$documentHeaderSearchBar=c(this.settings.selectors.moduleSearchBar).remove(),this.$documentHeaderSearchBar.length>0&&this.$documentHeader.append(this.$documentHeaderSearchBar),this.$moduleBody=c(this.settings.selectors.moduleBody),this.start())},a.prototype.start=function(){this.reposition(),c(window).on("resize",this.reposition),c(".t3js-module-docheader + .t3js-module-body").on("scroll",this.scroll)},a}();return new d});
\ No newline at end of file
+define(["require","exports","jquery"],function(e,t,o){"use strict";return new(function(){function e(){var e=this;this.$documentHeader=null,this.$documentHeaderBars=null,this.$documentHeaderNavigationBar=null,this.$documentHeaderSearchBar=null,this.$moduleBody=null,this.direction="down",this.reactionRange=300,this.lastPosition=0,this.currentPosition=0,this.changedPosition=0,this.settings={margin:24,offset:100,selectors:{moduleDocumentHeader:".t3js-module-docheader",moduleDocheaderBar:".t3js-module-docheader-bar",moduleNavigationBar:".t3js-module-docheader-bar-navigation",moduleButtonBar:".t3js-module-docheader-bar-buttons",moduleSearchBar:".t3js-module-docheader-bar-search",moduleBody:".t3js-module-body"}},this.reposition=function(){e.$documentHeader.css("height","auto"),e.$documentHeaderBars.css("height","auto"),e.$moduleBody.css("padding-top",e.$documentHeader.outerHeight()+e.settings.margin)},this.scroll=function(t){e.currentPosition=o(t.currentTarget).scrollTop(),e.currentPosition>e.lastPosition?"down"!==e.direction&&(e.direction="down",e.changedPosition=e.currentPosition):e.currentPosition<e.lastPosition&&"up"!==e.direction&&(e.direction="up",e.changedPosition=e.currentPosition),"up"===e.direction&&e.changedPosition-e.reactionRange<e.currentPosition&&e.$documentHeader.css("margin-top",0),"down"===e.direction&&e.changedPosition+e.reactionRange<e.currentPosition&&e.$documentHeader.css("margin-top",-1*(e.$documentHeaderNavigationBar.outerHeight()+4)),e.lastPosition=e.currentPosition},o(function(){e.initialize()})}return e.prototype.initialize=function(){this.$documentHeader=o(this.settings.selectors.moduleDocumentHeader),this.$documentHeader.length>0&&(this.$documentHeaderBars=o(this.settings.selectors.moduleDocheaderBar),this.$documentHeaderNavigationBar=o(this.settings.selectors.moduleNavigationBar),this.$documentHeaderSearchBar=o(this.settings.selectors.moduleSearchBar).remove(),this.$documentHeaderSearchBar.length>0&&this.$documentHeader.append(this.$documentHeaderSearchBar),this.$moduleBody=o(this.settings.selectors.moduleBody),this.start())},e.prototype.start=function(){this.reposition(),o(window).on("resize",this.reposition),o(".t3js-module-docheader + .t3js-module-body").on("scroll",this.scroll)},e}())});
\ No newline at end of file
index 349247f..ee6f795 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity","jquery","moment","nprogress","./Modal","./Notification"],function(a,b,c,d,e,f,g,h){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var i;!function(a){a.OVERRIDE="replace",a.RENAME="rename",a.SKIP="cancel",a.USE_EXISTING="useExisting"}(i||(i={}));var j=function(){function a(a){var b=this;this.askForOverride=[],this.percentagePerFile=1,this.dragFileIntoDocument=function(a){return a.stopPropagation(),a.preventDefault(),d(a.currentTarget).addClass("drop-in-progress"),b.showDropzone(),!1},this.dragAborted=function(a){return a.stopPropagation(),a.preventDefault(),d(a.currentTarget).removeClass("drop-in-progress"),!1},this.ignoreDrop=function(a){return a.stopPropagation(),a.preventDefault(),b.dragAborted(a),!1},this.handleDrop=function(a){b.ignoreDrop(a),b.processFiles(a.originalEvent.dataTransfer.files),b.$dropzone.removeClass("drop-status-ok")},this.fileInDropzone=function(){b.$dropzone.addClass("drop-status-ok")},this.fileOutOfDropzone=function(){b.$dropzone.removeClass("drop-status-ok")},this.$body=d("body"),this.$element=d(a);var c=void 0!==this.$element.data("dropzoneTrigger");this.$trigger=d(this.$element.data("dropzoneTrigger")),this.$dropzone=d("<div />").addClass("dropzone").hide(),this.irreObjectUid=this.$element.data("fileIrreObject");var e=this.$element.data("dropzoneTarget");return this.irreObjectUid&&0!==this.$element.nextAll(e).length?(this.dropZoneInsertBefore=!0,this.$dropzone.insertBefore(e)):(this.dropZoneInsertBefore=!1,this.$dropzone.insertAfter(e)),this.$dropzoneMask=d("<div />").addClass("dropzone-mask").appendTo(this.$dropzone),this.fileInput=document.createElement("input"),this.fileInput.setAttribute("type","file"),this.fileInput.setAttribute("multiple","multiple"),this.fileInput.setAttribute("name","files[]"),this.fileInput.classList.add("upload-file-picker"),this.$body.append(this.fileInput),this.$fileList=d(this.$element.data("progress-container")),this.fileListColumnCount=d("thead tr:first th",this.$fileList).length,this.filesExtensionsAllowed=this.$element.data("file-allowed"),this.fileDenyPattern=this.$element.data("file-deny-pattern")?new RegExp(this.$element.data("file-deny-pattern"),"i"):null,this.maxFileSize=parseInt(this.$element.data("max-file-size"),10),this.target=this.$element.data("target-folder"),this.browserCapabilities={fileReader:"undefined"!=typeof FileReader,DnD:"draggable"in document.createElement("span"),Progress:"upload"in new XMLHttpRequest},this.browserCapabilities.DnD?(this.$body.on("dragover",this.dragFileIntoDocument),this.$body.on("dragend",this.dragAborted),this.$body.on("drop",this.ignoreDrop),this.$dropzone.on("dragenter",this.fileInDropzone),this.$dropzoneMask.on("dragenter",this.fileInDropzone),this.$dropzoneMask.on("dragleave",this.fileOutOfDropzone),this.$dropzoneMask.on("drop",function(a){return b.handleDrop(a)}),this.$dropzone.prepend('<div class="dropzone-hint"><div class="dropzone-hint-media"><div class="dropzone-hint-icon"></div></div><div class="dropzone-hint-body"><h3 class="dropzone-hint-title">'+TYPO3.lang["file_upload.dropzonehint.title"]+'</h3><p class="dropzone-hint-message">'+TYPO3.lang["file_upload.dropzonehint.message"]+"</p></div></div>").click(function(){b.fileInput.click()}),d("<span />").addClass("dropzone-close").click(this.hideDropzone).appendTo(this.$dropzone),0===this.$fileList.length&&(this.$fileList=d("<table />").attr("id","typo3-filelist").addClass("table table-striped table-hover upload-queue").html("<tbody></tbody>").hide(),this.dropZoneInsertBefore?this.$fileList.insertAfter(this.$dropzone):this.$fileList.insertBefore(this.$dropzone),this.fileListColumnCount=7),this.fileInput.addEventListener("change",function(){b.processFiles(Array.apply(null,b.fileInput.files))}),void this.bindUploadButton(c===!0?this.$trigger:this.$element)):void console.warn("Browser has no Drag and drop capabilities; cannot initialize DragUploader")}return a.prototype.showDropzone=function(){this.$dropzone.show()},a.prototype.hideDropzone=function(a){a.stopPropagation(),a.preventDefault(),this.$dropzone.hide()},a.prototype.processFiles=function(a){var b=this;this.queueLength=a.length,this.$fileList.is(":visible")||this.$fileList.show(),f.start(),this.percentagePerFile=1/a.length;var c=[];d.each(a,function(a,e){c[parseInt(a,10)]=d.ajax({url:TYPO3.settings.ajaxUrls.file_exists,data:{fileName:e.name,fileTarget:b.target},cache:!1,success:function(a){var c="undefined"!=typeof a.uid;if(c)b.askForOverride.push({original:a,uploaded:e,action:b.irreObjectUid?i.USE_EXISTING:i.SKIP}),f.inc(b.percentagePerFile);else{new k(b,e,i.SKIP)}}})}),d.when.apply(d,c).done(function(){b.drawOverrideModal(),f.done()}),this.fileInput.value=""},a.prototype.bindUploadButton=function(a){var b=this;a.click(function(a){a.preventDefault(),b.fileInput.click(),b.showDropzone()})},a.prototype.decrementQueueLength=function(){this.queueLength>0&&(this.queueLength--,0===this.queueLength&&d.ajax({url:TYPO3.settings.ajaxUrls.flashmessages_render,cache:!1,success:function(a){d.each(a,function(a,b){h.showMessage(b.title,b.message,b.severity)})}}))},a.prototype.drawOverrideModal=function(){var a=this,b=Object.keys(this.askForOverride).length;if(0!==b){for(var f=d("<div/>").append(d("<p/>").text(TYPO3.lang["file_upload.existingfiles.description"]),d("<table/>",{class:"table"}).append(d("<thead/>").append(d("<tr />").append(d("<th/>"),d("<th/>").text(TYPO3.lang["file_upload.header.originalFile"]),d("<th/>").text(TYPO3.lang["file_upload.header.uploadedFile"]),d("<th/>").text(TYPO3.lang["file_upload.header.action"]))))),h=0;h<b;++h){var j=d("<tr />").append(d("<td />").append(""!==this.askForOverride[h].original.thumbUrl?d("<img />",{src:this.askForOverride[h].original.thumbUrl,height:40}):d(this.askForOverride[h].original.icon)),d("<td />").html(this.askForOverride[h].uploaded.name+" ("+l.fileSizeAsString(this.askForOverride[h].uploaded.size)+")<br>"+e(this.askForOverride[h].uploaded.lastModifiedDate,"x").format("YYYY-MM-DD HH:mm")),d("<td />").html(this.askForOverride[h].uploaded.name+" ("+l.fileSizeAsString(this.askForOverride[h].original.size)+")<br>"+e(this.askForOverride[h].original.mtime,"X").format("YYYY-MM-DD HH:mm")),d("<td />").append(d("<select />",{class:"form-control t3js-actions","data-override":h}).append(this.irreObjectUid?d("<option/>").val(i.USE_EXISTING).text(TYPO3.lang["file_upload.actions.use_existing"]):"",d("<option />").val(i.SKIP).text(TYPO3.lang["file_upload.actions.skip"]),d("<option />").val(i.RENAME).text(TYPO3.lang["file_upload.actions.rename"]),d("<option />").val(i.OVERRIDE).text(TYPO3.lang["file_upload.actions.override"]))));f.find("table").append("<tbody />").append(j)}var m=g.confirm(TYPO3.lang["file_upload.existingfiles.title"],f,c.SeverityEnum.warning,[{text:d(this).data("button-close-text")||TYPO3.lang["file_upload.button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:d(this).data("button-ok-text")||TYPO3.lang["file_upload.button.continue"]||"Continue with selected actions",btnClass:"btn-warning",name:"continue"}],["modal-inner-scroll"]);m.find(".modal-dialog").addClass("modal-lg"),m.find(".modal-footer").prepend(d("<span/>").addClass("form-inline").append(d("<label/>").text(TYPO3.lang["file_upload.actions.all.label"]),d("<select/>",{class:"form-control t3js-actions-all"}).append(d("<option/>").val("").text(TYPO3.lang["file_upload.actions.all.empty"]),this.irreObjectUid?d("<option/>").val(i.USE_EXISTING).text(TYPO3.lang["file_upload.actions.all.use_existing"]):"",d("<option/>").val(i.SKIP).text(TYPO3.lang["file_upload.actions.all.skip"]),d("<option/>").val(i.RENAME).text(TYPO3.lang["file_upload.actions.all.rename"]),d("<option/>").val(i.OVERRIDE).text(TYPO3.lang["file_upload.actions.all.override"]))));var n=this;m.on("change",".t3js-actions-all",function(){var a=d(this),b=a.val();""!==b?m.find(".t3js-actions").each(function(a,c){var e=d(c),f=parseInt(e.data("override"),10);e.val(b).prop("disabled","disabled"),n.askForOverride[f].action=e.val()}):m.find(".t3js-actions").removeProp("disabled")}).on("change",".t3js-actions",function(){var a=d(this),b=parseInt(a.data("override"),10);n.askForOverride[b].action=a.val()}).on("button.clicked",function(a){"cancel"===a.target.name?(n.askForOverride=[],g.dismiss()):"continue"===a.target.name&&(d.each(n.askForOverride,function(a,b){if(b.action===i.USE_EXISTING)l.addFileToIrre(n.irreObjectUid,b.original);else if(b.action!==i.SKIP){new k(n,b.uploaded,b.action)}}),n.askForOverride=[],g.dismiss())}).on("hidden.bs.modal",function(){a.askForOverride=[]})}},a}(),k=function(){function a(a,b,c){var e=this;if(this.dragUploader=a,this.file=b,this.override=c,this.$row=d("<tr />").addClass("upload-queue-item uploading"),this.$iconCol=d("<td />").addClass("col-icon").appendTo(this.$row),this.$fileName=d("<td />").text(b.name).appendTo(this.$row),this.$progress=d("<td />").attr("colspan",this.dragUploader.fileListColumnCount-2).appendTo(this.$row),this.$progressContainer=d("<div />").addClass("upload-queue-progress").appendTo(this.$progress),this.$progressBar=d("<div />").addClass("upload-queue-progress-bar").appendTo(this.$progressContainer),this.$progressPercentage=d("<span />").addClass("upload-queue-progress-percentage").appendTo(this.$progressContainer),this.$progressMessage=d("<span />").addClass("upload-queue-progress-message").appendTo(this.$progressContainer),0===d("tbody tr.upload-queue-item",this.dragUploader.$fileList).length?(this.$row.prependTo(d("tbody",this.dragUploader.$fileList)),this.$row.addClass("last")):this.$row.insertBefore(d("tbody tr.upload-queue-item:first",this.dragUploader.$fileList)),this.$iconCol.html('<span class="t3-icon t3-icon-mimetypes t3-icon-other-other">&nbsp;</span>'),this.dragUploader.maxFileSize>0&&this.file.size>this.dragUploader.maxFileSize)this.updateMessage(TYPO3.lang["file_upload.maxFileSizeExceeded"].replace(/\{0\}/g,this.file.name).replace(/\{1\}/g,l.fileSizeAsString(this.dragUploader.maxFileSize))),this.$row.addClass("error");else if(this.dragUploader.fileDenyPattern&&this.file.name.match(this.dragUploader.fileDenyPattern))this.updateMessage(TYPO3.lang["file_upload.fileNotAllowed"].replace(/\{0\}/g,this.file.name)),this.$row.addClass("error");else if(this.checkAllowedExtensions()){this.updateMessage("- "+l.fileSizeAsString(this.file.size));var f=new FormData;f.append("data[upload][1][target]",this.dragUploader.target),f.append("data[upload][1][data]","1"),f.append("overwriteExistingFiles",this.override),f.append("redirect",""),f.append("upload_1",this.file);var g=d.extend(!0,{},d.ajaxSettings,{url:TYPO3.settings.ajaxUrls.file_process,contentType:!1,processData:!1,data:f,cache:!1,type:"POST",success:function(a){return e.uploadSuccess(a)},error:function(a){return e.uploadError(a)}});g.xhr=function(){var a=d.ajaxSettings.xhr();return a.upload.addEventListener("progress",function(a){return e.updateProgress(a)}),a},this.upload=d.ajax(g)}else this.updateMessage(TYPO3.lang["file_upload.fileExtensionExpected"].replace(/\{0\}/g,this.dragUploader.filesExtensionsAllowed)),this.$row.addClass("error")}return a.prototype.updateMessage=function(a){this.$progressMessage.text(a)},a.prototype.removeProgress=function(){this.$progress&&this.$progress.remove()},a.prototype.uploadStart=function(){this.$progressPercentage.text("(0%)"),this.$progressBar.width("1%"),this.dragUploader.$trigger.trigger("uploadStart",[this])},a.prototype.uploadError=function(a){this.updateMessage(TYPO3.lang["file_upload.uploadFailed"].replace(/\{0\}/g,this.file.name));var b=d(a.responseText);b.is("t3err")?this.$progressPercentage.text(b.text()):this.$progressPercentage.text("("+a.statusText+")"),this.$row.addClass("error"),this.dragUploader.decrementQueueLength(),this.dragUploader.$trigger.trigger("uploadError",[this,a])},a.prototype.updateProgress=function(a){var b=Math.round(a.loaded/a.total*100)+"%";this.$progressBar.outerWidth(b),this.$progressPercentage.text(b),this.dragUploader.$trigger.trigger("updateProgress",[this,b,a])},a.prototype.uploadSuccess=function(a){var b=this;a.upload&&(this.dragUploader.decrementQueueLength(),this.$row.removeClass("uploading"),this.$fileName.text(a.upload[0].name),this.$progressPercentage.text(""),this.$progressMessage.text("100%"),this.$progressBar.outerWidth("100%"),a.upload[0].icon&&this.$iconCol.html('<a href="#" class="t3js-contextmenutrigger" data-uid="'+a.upload[0].id+'" data-table="sys_file">'+a.upload[0].icon+"&nbsp;</span></a>"),this.dragUploader.irreObjectUid?(l.addFileToIrre(this.dragUploader.irreObjectUid,a.upload[0]),setTimeout(function(){b.$row.remove(),0===d("tr",b.dragUploader.$fileList).length&&(b.dragUploader.$fileList.hide(),b.dragUploader.$trigger.trigger("uploadSuccess",[b,a]))},3e3)):setTimeout(function(){b.showFileInfo(a.upload[0]),b.dragUploader.$trigger.trigger("uploadSuccess",[b,a])},3e3))},a.prototype.showFileInfo=function(a){this.removeProgress();for(var b=7;b<this.dragUploader.fileListColumnCount;b++)d("<td />").text("").appendTo(this.$row);d("<td />").text(a.extension.toUpperCase()).appendTo(this.$row),d("<td />").text(a.date).appendTo(this.$row),d("<td />").text(l.fileSizeAsString(a.size)).appendTo(this.$row);var c="";a.permissions.read&&(c+='<strong class="text-danger">'+TYPO3.lang["permissions.read"]+"</strong>"),a.permissions.write&&(c+='<strong class="text-danger">'+TYPO3.lang["permissions.write"]+"</strong>"),d("<td />").html(c).appendTo(this.$row),d("<td />").text("-").appendTo(this.$row)},a.prototype.checkAllowedExtensions=function(){if(!this.dragUploader.filesExtensionsAllowed)return!0;var a=this.file.name.split(".").pop(),b=this.dragUploader.filesExtensionsAllowed.split(",");return d.inArray(a.toLowerCase(),b)!==-1},a}(),l=function(){function a(){}return a.fileSizeAsString=function(a){var b=a/1024,c="";return c=b>1024?(b/1024).toFixed(1)+" MB":b.toFixed(1)+" KB"},a.addFileToIrre=function(a,b){window.inline.delayedImportElement(a,"sys_file",b.uid,"file")},a.init=function(){var a=this,b=a.options;d.fn.extend({dragUploader:function(a){return this.each(function(b,c){var e=d(c),f=e.data("DragUploaderPlugin");f||e.data("DragUploaderPlugin",f=new j(c)),"string"==typeof a&&f[a]()})}}),d(function(){d(".t3js-drag-uploader").dragUploader(b)})},a}();b.initialize=function(){l.init(),"undefined"!=typeof TYPO3.settings&&"undefined"!=typeof TYPO3.settings.RequireJS&&"undefined"!=typeof TYPO3.settings.RequireJS.PostInitializationModules&&"undefined"!=typeof TYPO3.settings.RequireJS.PostInitializationModules["TYPO3/CMS/Backend/DragUploader"]&&d.each(TYPO3.settings.RequireJS.PostInitializationModules["TYPO3/CMS/Backend/DragUploader"],function(b,c){a([c])})},b.initialize()});
\ No newline at end of file
+define(["require","exports","./Enum/Severity","jquery","moment","nprogress","./Modal","./Notification"],function(e,t,i,r,a,o,s,n){"use strict";var l,d;Object.defineProperty(t,"__esModule",{value:!0}),(d=l||(l={})).OVERRIDE="replace",d.RENAME="rename",d.SKIP="cancel",d.USE_EXISTING="useExisting";var p=function(){function e(e){var t=this;this.askForOverride=[],this.percentagePerFile=1,this.dragFileIntoDocument=function(e){return e.stopPropagation(),e.preventDefault(),r(e.currentTarget).addClass("drop-in-progress"),t.showDropzone(),!1},this.dragAborted=function(e){return e.stopPropagation(),e.preventDefault(),r(e.currentTarget).removeClass("drop-in-progress"),!1},this.ignoreDrop=function(e){return e.stopPropagation(),e.preventDefault(),t.dragAborted(e),!1},this.handleDrop=function(e){t.ignoreDrop(e),t.processFiles(e.originalEvent.dataTransfer.files),t.$dropzone.removeClass("drop-status-ok")},this.fileInDropzone=function(){t.$dropzone.addClass("drop-status-ok")},this.fileOutOfDropzone=function(){t.$dropzone.removeClass("drop-status-ok")},this.$body=r("body"),this.$element=r(e);var i=void 0!==this.$element.data("dropzoneTrigger");this.$trigger=r(this.$element.data("dropzoneTrigger")),this.$dropzone=r("<div />").addClass("dropzone").hide(),this.irreObjectUid=this.$element.data("fileIrreObject");var a=this.$element.data("dropzoneTarget");this.irreObjectUid&&0!==this.$element.nextAll(a).length?(this.dropZoneInsertBefore=!0,this.$dropzone.insertBefore(a)):(this.dropZoneInsertBefore=!1,this.$dropzone.insertAfter(a)),this.$dropzoneMask=r("<div />").addClass("dropzone-mask").appendTo(this.$dropzone),this.fileInput=document.createElement("input"),this.fileInput.setAttribute("type","file"),this.fileInput.setAttribute("multiple","multiple"),this.fileInput.setAttribute("name","files[]"),this.fileInput.classList.add("upload-file-picker"),this.$body.append(this.fileInput),this.$fileList=r(this.$element.data("progress-container")),this.fileListColumnCount=r("thead tr:first th",this.$fileList).length,this.filesExtensionsAllowed=this.$element.data("file-allowed"),this.fileDenyPattern=this.$element.data("file-deny-pattern")?new RegExp(this.$element.data("file-deny-pattern"),"i"):null,this.maxFileSize=parseInt(this.$element.data("max-file-size"),10),this.target=this.$element.data("target-folder"),this.browserCapabilities={fileReader:"undefined"!=typeof FileReader,DnD:"draggable"in document.createElement("span"),Progress:"upload"in new XMLHttpRequest},this.browserCapabilities.DnD?(this.$body.on("dragover",this.dragFileIntoDocument),this.$body.on("dragend",this.dragAborted),this.$body.on("drop",this.ignoreDrop),this.$dropzone.on("dragenter",this.fileInDropzone),this.$dropzoneMask.on("dragenter",this.fileInDropzone),this.$dropzoneMask.on("dragleave",this.fileOutOfDropzone),this.$dropzoneMask.on("drop",function(e){return t.handleDrop(e)}),this.$dropzone.prepend('<div class="dropzone-hint"><div class="dropzone-hint-media"><div class="dropzone-hint-icon"></div></div><div class="dropzone-hint-body"><h3 class="dropzone-hint-title">'+TYPO3.lang["file_upload.dropzonehint.title"]+'</h3><p class="dropzone-hint-message">'+TYPO3.lang["file_upload.dropzonehint.message"]+"</p></div></div>").click(function(){t.fileInput.click()}),r("<span />").addClass("dropzone-close").click(this.hideDropzone).appendTo(this.$dropzone),0===this.$fileList.length&&(this.$fileList=r("<table />").attr("id","typo3-filelist").addClass("table table-striped table-hover upload-queue").html("<tbody></tbody>").hide(),this.dropZoneInsertBefore?this.$fileList.insertAfter(this.$dropzone):this.$fileList.insertBefore(this.$dropzone),this.fileListColumnCount=7),this.fileInput.addEventListener("change",function(){t.processFiles(Array.apply(null,t.fileInput.files))}),this.bindUploadButton(!0===i?this.$trigger:this.$element)):console.warn("Browser has no Drag and drop capabilities; cannot initialize DragUploader")}return e.prototype.showDropzone=function(){this.$dropzone.show()},e.prototype.hideDropzone=function(e){e.stopPropagation(),e.preventDefault(),this.$dropzone.hide()},e.prototype.processFiles=function(e){var t=this;this.queueLength=e.length,this.$fileList.is(":visible")||this.$fileList.show(),o.start(),this.percentagePerFile=1/e.length;var i=[];r.each(e,function(e,a){i[parseInt(e,10)]=r.ajax({url:TYPO3.settings.ajaxUrls.file_exists,data:{fileName:a.name,fileTarget:t.target},cache:!1,success:function(e){if(void 0!==e.uid)t.askForOverride.push({original:e,uploaded:a,action:t.irreObjectUid?l.USE_EXISTING:l.SKIP}),o.inc(t.percentagePerFile);else new h(t,a,l.SKIP)}})}),r.when.apply(r,i).done(function(){t.drawOverrideModal(),o.done()}),this.fileInput.value=""},e.prototype.bindUploadButton=function(e){var t=this;e.click(function(e){e.preventDefault(),t.fileInput.click(),t.showDropzone()})},e.prototype.decrementQueueLength=function(){this.queueLength>0&&(this.queueLength--,0===this.queueLength&&r.ajax({url:TYPO3.settings.ajaxUrls.flashmessages_render,cache:!1,success:function(e){r.each(e,function(e,t){n.showMessage(t.title,t.message,t.severity)})}}))},e.prototype.drawOverrideModal=function(){var e=this,t=Object.keys(this.askForOverride).length;if(0!==t){for(var o=r("<div/>").append(r("<p/>").text(TYPO3.lang["file_upload.existingfiles.description"]),r("<table/>",{class:"table"}).append(r("<thead/>").append(r("<tr />").append(r("<th/>"),r("<th/>").text(TYPO3.lang["file_upload.header.originalFile"]),r("<th/>").text(TYPO3.lang["file_upload.header.uploadedFile"]),r("<th/>").text(TYPO3.lang["file_upload.header.action"]))))),n=0;n<t;++n){var d=r("<tr />").append(r("<td />").append(""!==this.askForOverride[n].original.thumbUrl?r("<img />",{src:this.askForOverride[n].original.thumbUrl,height:40}):r(this.askForOverride[n].original.icon)),r("<td />").html(this.askForOverride[n].uploaded.name+" ("+u.fileSizeAsString(this.askForOverride[n].uploaded.size)+")<br>"+a(this.askForOverride[n].uploaded.lastModifiedDate,"x").format("YYYY-MM-DD HH:mm")),r("<td />").html(this.askForOverride[n].uploaded.name+" ("+u.fileSizeAsString(this.askForOverride[n].original.size)+")<br>"+a(this.askForOverride[n].original.mtime,"X").format("YYYY-MM-DD HH:mm")),r("<td />").append(r("<select />",{class:"form-control t3js-actions","data-override":n}).append(this.irreObjectUid?r("<option/>").val(l.USE_EXISTING).text(TYPO3.lang["file_upload.actions.use_existing"]):"",r("<option />").val(l.SKIP).text(TYPO3.lang["file_upload.actions.skip"]),r("<option />").val(l.RENAME).text(TYPO3.lang["file_upload.actions.rename"]),r("<option />").val(l.OVERRIDE).text(TYPO3.lang["file_upload.actions.override"]))));o.find("table").append("<tbody />").append(d)}var p=s.confirm(TYPO3.lang["file_upload.existingfiles.title"],o,i.SeverityEnum.warning,[{text:r(this).data("button-close-text")||TYPO3.lang["file_upload.button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:r(this).data("button-ok-text")||TYPO3.lang["file_upload.button.continue"]||"Continue with selected actions",btnClass:"btn-warning",name:"continue"}],["modal-inner-scroll"]);p.find(".modal-dialog").addClass("modal-lg"),p.find(".modal-footer").prepend(r("<span/>").addClass("form-inline").append(r("<label/>").text(TYPO3.lang["file_upload.actions.all.label"]),r("<select/>",{class:"form-control t3js-actions-all"}).append(r("<option/>").val("").text(TYPO3.lang["file_upload.actions.all.empty"]),this.irreObjectUid?r("<option/>").val(l.USE_EXISTING).text(TYPO3.lang["file_upload.actions.all.use_existing"]):"",r("<option/>").val(l.SKIP).text(TYPO3.lang["file_upload.actions.all.skip"]),r("<option/>").val(l.RENAME).text(TYPO3.lang["file_upload.actions.all.rename"]),r("<option/>").val(l.OVERRIDE).text(TYPO3.lang["file_upload.actions.all.override"]))));var g=this;p.on("change",".t3js-actions-all",function(){var e=r(this).val();""!==e?p.find(".t3js-actions").each(function(t,i){var a=r(i),o=parseInt(a.data("override"),10);a.val(e).prop("disabled","disabled"),g.askForOverride[o].action=a.val()}):p.find(".t3js-actions").removeProp("disabled")}).on("change",".t3js-actions",function(){var e=r(this),t=parseInt(e.data("override"),10);g.askForOverride[t].action=e.val()}).on("button.clicked",function(e){"cancel"===e.target.name?(g.askForOverride=[],s.dismiss()):"continue"===e.target.name&&(r.each(g.askForOverride,function(e,t){if(t.action===l.USE_EXISTING)u.addFileToIrre(g.irreObjectUid,t.original);else if(t.action!==l.SKIP)new h(g,t.uploaded,t.action)}),g.askForOverride=[],s.dismiss())}).on("hidden.bs.modal",function(){e.askForOverride=[]})}},e}(),h=function(){function e(e,t,i){var a=this;if(this.dragUploader=e,this.file=t,this.override=i,this.$row=r("<tr />").addClass("upload-queue-item uploading"),this.$iconCol=r("<td />").addClass("col-icon").appendTo(this.$row),this.$fileName=r("<td />").text(t.name).appendTo(this.$row),this.$progress=r("<td />").attr("colspan",this.dragUploader.fileListColumnCount-2).appendTo(this.$row),this.$progressContainer=r("<div />").addClass("upload-queue-progress").appendTo(this.$progress),this.$progressBar=r("<div />").addClass("upload-queue-progress-bar").appendTo(this.$progressContainer),this.$progressPercentage=r("<span />").addClass("upload-queue-progress-percentage").appendTo(this.$progressContainer),this.$progressMessage=r("<span />").addClass("upload-queue-progress-message").appendTo(this.$progressContainer),0===r("tbody tr.upload-queue-item",this.dragUploader.$fileList).length?(this.$row.prependTo(r("tbody",this.dragUploader.$fileList)),this.$row.addClass("last")):this.$row.insertBefore(r("tbody tr.upload-queue-item:first",this.dragUploader.$fileList)),this.$iconCol.html('<span class="t3-icon t3-icon-mimetypes t3-icon-other-other">&nbsp;</span>'),this.dragUploader.maxFileSize>0&&this.file.size>this.dragUploader.maxFileSize)this.updateMessage(TYPO3.lang["file_upload.maxFileSizeExceeded"].replace(/\{0\}/g,this.file.name).replace(/\{1\}/g,u.fileSizeAsString(this.dragUploader.maxFileSize))),this.$row.addClass("error");else if(this.dragUploader.fileDenyPattern&&this.file.name.match(this.dragUploader.fileDenyPattern))this.updateMessage(TYPO3.lang["file_upload.fileNotAllowed"].replace(/\{0\}/g,this.file.name)),this.$row.addClass("error");else if(this.checkAllowedExtensions()){this.updateMessage("- "+u.fileSizeAsString(this.file.size));var o=new FormData;o.append("data[upload][1][target]",this.dragUploader.target),o.append("data[upload][1][data]","1"),o.append("overwriteExistingFiles",this.override),o.append("redirect",""),o.append("upload_1",this.file);var s=r.extend(!0,{},r.ajaxSettings,{url:TYPO3.settings.ajaxUrls.file_process,contentType:!1,processData:!1,data:o,cache:!1,type:"POST",success:function(e){return a.uploadSuccess(e)},error:function(e){return a.uploadError(e)}});s.xhr=function(){var e=r.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){return a.updateProgress(e)}),e},this.upload=r.ajax(s)}else this.updateMessage(TYPO3.lang["file_upload.fileExtensionExpected"].replace(/\{0\}/g,this.dragUploader.filesExtensionsAllowed)),this.$row.addClass("error")}return e.prototype.updateMessage=function(e){this.$progressMessage.text(e)},e.prototype.removeProgress=function(){this.$progress&&this.$progress.remove()},e.prototype.uploadStart=function(){this.$progressPercentage.text("(0%)"),this.$progressBar.width("1%"),this.dragUploader.$trigger.trigger("uploadStart",[this])},e.prototype.uploadError=function(e){this.updateMessage(TYPO3.lang["file_upload.uploadFailed"].replace(/\{0\}/g,this.file.name));var t=r(e.responseText);t.is("t3err")?this.$progressPercentage.text(t.text()):this.$progressPercentage.text("("+e.statusText+")"),this.$row.addClass("error"),this.dragUploader.decrementQueueLength(),this.dragUploader.$trigger.trigger("uploadError",[this,e])},e.prototype.updateProgress=function(e){var t=Math.round(e.loaded/e.total*100)+"%";this.$progressBar.outerWidth(t),this.$progressPercentage.text(t),this.dragUploader.$trigger.trigger("updateProgress",[this,t,e])},e.prototype.uploadSuccess=function(e){var t=this;e.upload&&(this.dragUploader.decrementQueueLength(),this.$row.removeClass("uploading"),this.$fileName.text(e.upload[0].name),this.$progressPercentage.text(""),this.$progressMessage.text("100%"),this.$progressBar.outerWidth("100%"),e.upload[0].icon&&this.$iconCol.html('<a href="#" class="t3js-contextmenutrigger" data-uid="'+e.upload[0].id+'" data-table="sys_file">'+e.upload[0].icon+"&nbsp;</span></a>"),this.dragUploader.irreObjectUid?(u.addFileToIrre(this.dragUploader.irreObjectUid,e.upload[0]),setTimeout(function(){t.$row.remove(),0===r("tr",t.dragUploader.$fileList).length&&(t.dragUploader.$fileList.hide(),t.dragUploader.$trigger.trigger("uploadSuccess",[t,e]))},3e3)):setTimeout(function(){t.showFileInfo(e.upload[0]),t.dragUploader.$trigger.trigger("uploadSuccess",[t,e])},3e3))},e.prototype.showFileInfo=function(e){this.removeProgress();for(var t=7;t<this.dragUploader.fileListColumnCount;t++)r("<td />").text("").appendTo(this.$row);r("<td />").text(e.extension.toUpperCase()).appendTo(this.$row),r("<td />").text(e.date).appendTo(this.$row),r("<td />").text(u.fileSizeAsString(e.size)).appendTo(this.$row);var i="";e.permissions.read&&(i+='<strong class="text-danger">'+TYPO3.lang["permissions.read"]+"</strong>"),e.permissions.write&&(i+='<strong class="text-danger">'+TYPO3.lang["permissions.write"]+"</strong>"),r("<td />").html(i).appendTo(this.$row),r("<td />").text("-").appendTo(this.$row)},e.prototype.checkAllowedExtensions=function(){if(!this.dragUploader.filesExtensionsAllowed)return!0;var e=this.file.name.split(".").pop(),t=this.dragUploader.filesExtensionsAllowed.split(",");return-1!==r.inArray(e.toLowerCase(),t)},e}(),u=function(){function e(){}return e.fileSizeAsString=function(e){var t=e/1024;return t>1024?(t/1024).toFixed(1)+" MB":t.toFixed(1)+" KB"},e.addFileToIrre=function(e,t){window.inline.delayedImportElement(e,"sys_file",t.uid,"file")},e.init=function(){var e=this.options;r.fn.extend({dragUploader:function(e){return this.each(function(t,i){var a=r(i),o=a.data("DragUploaderPlugin");o||a.data("DragUploaderPlugin",o=new p(i)),"string"==typeof e&&o[e]()})}}),r(function(){r(".t3js-drag-uploader").dragUploader(e)})},e}();t.initialize=function(){u.init(),void 0!==TYPO3.settings&&void 0!==TYPO3.settings.RequireJS&&void 0!==TYPO3.settings.RequireJS.PostInitializationModules&&void 0!==TYPO3.settings.RequireJS.PostInitializationModules["TYPO3/CMS/Backend/DragUploader"]&&r.each(TYPO3.settings.RequireJS.PostInitializationModules["TYPO3/CMS/Backend/DragUploader"],function(t,i){e([i])})},t.initialize()});
\ No newline at end of file
index 0f8ac5e..119e5d3 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c;!function(a){a[a.ENTER=13]="ENTER",a[a.ESCAPE=27]="ESCAPE"}(c=b.KeyTypesEnum||(b.KeyTypesEnum={}))});
\ No newline at end of file
+define(["require","exports"],function(e,E){"use strict";var r;Object.defineProperty(E,"__esModule",{value:!0}),(r=E.KeyTypesEnum||(E.KeyTypesEnum={}))[r.ENTER=13]="ENTER",r[r.ESCAPE=27]="ESCAPE"});
\ No newline at end of file
index 753e968..e81c3bd 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c;!function(a){a[a.notice=-2]="notice",a[a.info=-1]="info",a[a.ok=0]="ok",a[a.warning=1]="warning",a[a.error=2]="error"}(c=b.SeverityEnum||(b.SeverityEnum={}))});
\ No newline at end of file
+define(["require","exports"],function(e,r){"use strict";var n;Object.defineProperty(r,"__esModule",{value:!0}),(n=r.SeverityEnum||(r.SeverityEnum={}))[n.notice=-2]="notice",n[n.info=-1]="info",n[n.ok=0]="ok",n[n.warning=1]="warning",n[n.error=2]="error"});
\ No newline at end of file
index cdb24d5..0a86681 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();define(["require","exports","./InteractionRequest"],function(a,b,c){"use strict";var d=function(a){function b(b,c){void 0===c&&(c=null);var d=a.call(this,b)||this;return d.clientEvent=c,d}return __extends(b,a),b}(c);return d});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();define(["require","exports","./InteractionRequest"],function(t,n,e){"use strict";return function(t){function n(n,e){void 0===e&&(e=null);var r=t.call(this,n)||this;return r.clientEvent=e,r}return __extends(n,t),n}(e)});
\ No newline at end of file
index e462d79..d580a28 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0})});
\ No newline at end of file
+define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
\ No newline at end of file
index 98307e9..6416d91 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d=function(){function a(){this.consumers=[]}return a.prototype.getConsumers=function(){return this.consumers},a.prototype.hasConsumer=function(a){return this.consumers.indexOf(a)!==-1},a.prototype.attach=function(a){this.hasConsumer(a)||this.consumers.push(a)},a.prototype.detach=function(a){this.consumers=this.consumers.filter(function(b){return b!==a})},a.prototype.invoke=function(a){var b=[];return this.consumers.forEach(function(c){var d=c.consume.call(c,a);d&&b.push(d)}),c.when.apply(c,b)},a}();return new d});
\ No newline at end of file
+define(["require","exports","jquery"],function(n,t,e){"use strict";return new(function(){function n(){this.consumers=[]}return n.prototype.getConsumers=function(){return this.consumers},n.prototype.hasConsumer=function(n){return-1!==this.consumers.indexOf(n)},n.prototype.attach=function(n){this.hasConsumer(n)||this.consumers.push(n)},n.prototype.detach=function(n){this.consumers=this.consumers.filter(function(t){return t!==n})},n.prototype.invoke=function(n){var t=[];return this.consumers.forEach(function(e){var r=e.consume.call(e,n);r&&t.push(r)}),e.when.apply(e,t)},n}())});
\ No newline at end of file
index 4f654e9..c159bd1 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";var c=function(){function a(a,b){void 0===b&&(b=null),this.processed=!1,this.processedData=null,this.type=a,this.parentRequest=b}return Object.defineProperty(a.prototype,"outerMostRequest",{get:function(){for(var b=this;b.parentRequest instanceof a;)b=b.parentRequest;return b},enumerable:!0,configurable:!0}),a.prototype.isProcessed=function(){return this.processed},a.prototype.getProcessedData=function(){return this.processedData},a.prototype.setProcessedData=function(a){void 0===a&&(a=null),this.processed=!0,this.processedData=a},a}();return c});
\ No newline at end of file
+define(["require","exports"],function(e,t){"use strict";return function(){function e(e,t){void 0===t&&(t=null),this.processed=!1,this.processedData=null,this.type=e,this.parentRequest=t}return Object.defineProperty(e.prototype,"outerMostRequest",{get:function(){for(var t=this;t.parentRequest instanceof e;)t=t.parentRequest;return t},enumerable:!0,configurable:!0}),e.prototype.isProcessed=function(){return this.processed},e.prototype.getProcessedData=function(){return this.processedData},e.prototype.setProcessedData=function(e){void 0===e&&(e=null),this.processed=!0,this.processedData=e},e}()});
\ No newline at end of file
index e462d79..d580a28 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0})});
\ No newline at end of file
+define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
\ No newline at end of file
index ccbf077..d8aa8e0 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";var c=function(){function a(){this.assignments=[]}return a.prototype.attachFor=function(a,b){var c=this.getFor(a);null===c&&(c={request:a,deferreds:[]},this.assignments.push(c)),c.deferreds.push(b)},a.prototype.detachFor=function(a){var b=this.getFor(a);this.assignments=this.assignments.filter(function(a){return a===b})},a.prototype.getFor=function(a){var b=null;return this.assignments.some(function(c){return c.request===a&&(b=c,!0)}),b},a.prototype.resolveFor=function(a){var b=this.getFor(a);return null!==b&&(b.deferreds.forEach(function(a){return a.resolve()}),this.detachFor(a),!0)},a.prototype.rejectFor=function(a){var b=this.getFor(a);return null!==b&&(b.deferreds.forEach(function(a){return a.reject()}),this.detachFor(a),!0)},a}();return new c});
\ No newline at end of file
+define(["require","exports"],function(t,e){"use strict";return new(function(){function t(){this.assignments=[]}return t.prototype.attachFor=function(t,e){var r=this.getFor(t);null===r&&(r={request:t,deferreds:[]},this.assignments.push(r)),r.deferreds.push(e)},t.prototype.detachFor=function(t){var e=this.getFor(t);this.assignments=this.assignments.filter(function(t){return t===e})},t.prototype.getFor=function(t){var e=null;return this.assignments.some(function(r){return r.request===t&&(e=r,!0)}),e},t.prototype.resolveFor=function(t){var e=this.getFor(t);return null!==e&&(e.deferreds.forEach(function(t){return t.resolve()}),this.detachFor(t),!0)},t.prototype.rejectFor=function(t){var e=this.getFor(t);return null!==e&&(e.deferreds.forEach(function(t){return t.reject()}),this.detachFor(t),!0)},t}())});
\ No newline at end of file
index a0923b0..0b91c0d 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();define(["require","exports","./InteractionRequest"],function(a,b,c){"use strict";var d=function(a){function b(b,c){return void 0===c&&(c=null),a.call(this,b,c)||this}return __extends(b,a),b.prototype.concerns=function(a){if(this===a)return!0;for(var b=this;b.parentRequest instanceof c;)if(b=b.parentRequest,b===a)return!0;return!1},b.prototype.concernsTypes=function(a){if(a.indexOf(this.type)!==-1)return!0;for(var b=this;b.parentRequest instanceof c;)if(b=b.parentRequest,a.indexOf(b.type)!==-1)return!0;return!1},b}(c);return d});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./InteractionRequest"],function(t,e,n){"use strict";return function(t){function e(e,n){return void 0===n&&(n=null),t.call(this,e,n)||this}return __extends(e,t),e.prototype.concerns=function(t){if(this===t)return!0;for(var e=this;e.parentRequest instanceof n;)if((e=e.parentRequest)===t)return!0;return!1},e.prototype.concernsTypes=function(t){if(-1!==t.indexOf(this.type))return!0;for(var e=this;e.parentRequest instanceof n;)if(e=e.parentRequest,-1!==t.indexOf(e.type))return!0;return!1},e}(n)});
\ No newline at end of file
index 6a32397..9d21dba 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","TYPO3/CMS/Backend/FormEngine","bootstrap"],function(a,b,c,d){"use strict";var e=function(){function a(){var b=this;this.checkForReviewableField=function(){var d=b,e=a.findInvalidField(),f=c("."+b.toggleButtonClass);if(e.length>0){var g=c("<div />",{class:"list-group"});e.each(function(){var a=c(this),b=a.find("[data-formengine-validation-rules]"),e=b.attr("id");"undefined"==typeof e&&(e=b.parent().children("[id]").first().attr("id")),g.append(c("<a />",{class:"list-group-item "+d.fieldListItemClass,"data-field-id":e,href:"#"}).text(a.find(d.labelSelector).text()))}),f.removeClass("hidden");var h=f.data("bs.popover");h&&(h.options.content=g.wrapAll("<div>").parent().html(),h.setContent(),h.$tip.addClass(h.options.placement))}else f.addClass("hidden").popover("hide")},this.switchToField=function(a){a.preventDefault();var b=c(a.currentTarget),d=b.data("fieldId"),e=c("#"+d);e.parents('[id][role="tabpanel"]').each(function(){c('[aria-controls="'+c(this).attr("id")+'"]').tab("show")}),e.focus()},this.toggleButtonClass="t3js-toggle-review-panel",this.fieldListItemClass="t3js-field-item",this.labelSelector=".t3js-formengine-label",this.initialize()}return a.findInvalidField=function(){return c(document).find(".tab-content ."+d.Validation.errorClass)},a.attachButtonToModuleHeader=function(a){var b=c(".t3js-module-docheader-bar-buttons").children().last().find('[role="toolbar"]'),d=c("<a />",{class:"btn btn-danger btn-sm hidden "+a.toggleButtonClass,href:"#",title:TYPO3.lang["buttons.reviewFailedValidationFields"]}).append(c("<span />",{class:"fa fa-fw fa-info"}));d.popover({container:"body",html:!0,placement:"bottom"}),b.prepend(d)},a.prototype.initialize=function(){var b=this,d=c(document);c(function(){a.attachButtonToModuleHeader(b)}),d.on("click","."+this.fieldListItemClass,this.switchToField),d.on("t3-formengine-postfieldvalidation",this.checkForReviewableField)},a}();return new e});
\ No newline at end of file
+define(["require","exports","jquery","TYPO3/CMS/Backend/FormEngine","bootstrap"],function(t,e,i,n){"use strict";return new(function(){function t(){var e=this;this.checkForReviewableField=function(){var n=e,a=t.findInvalidField(),o=i("."+e.toggleButtonClass);if(a.length>0){var l=i("<div />",{class:"list-group"});a.each(function(){var t=i(this),e=t.find("[data-formengine-validation-rules]"),a=e.attr("id");void 0===a&&(a=e.parent().children("[id]").first().attr("id")),l.append(i("<a />",{class:"list-group-item "+n.fieldListItemClass,"data-field-id":a,href:"#"}).text(t.find(n.labelSelector).text()))}),o.removeClass("hidden");var s=o.data("bs.popover");s&&(s.options.content=l.wrapAll("<div>").parent().html(),s.setContent(),s.$tip.addClass(s.options.placement))}else o.addClass("hidden").popover("hide")},this.switchToField=function(t){t.preventDefault();var e=i(t.currentTarget).data("fieldId"),n=i("#"+e);n.parents('[id][role="tabpanel"]').each(function(){i('[aria-controls="'+i(this).attr("id")+'"]').tab("show")}),n.focus()},this.toggleButtonClass="t3js-toggle-review-panel",this.fieldListItemClass="t3js-field-item",this.labelSelector=".t3js-formengine-label",this.initialize()}return t.findInvalidField=function(){return i(document).find(".tab-content ."+n.Validation.errorClass)},t.attachButtonToModuleHeader=function(t){var e=i(".t3js-module-docheader-bar-buttons").children().last().find('[role="toolbar"]'),n=i("<a />",{class:"btn btn-danger btn-sm hidden "+t.toggleButtonClass,href:"#",title:TYPO3.lang["buttons.reviewFailedValidationFields"]}).append(i("<span />",{class:"fa fa-fw fa-info"}));n.popover({container:"body",html:!0,placement:"bottom"}),e.prepend(n)},t.prototype.initialize=function(){var e=this,n=i(document);i(function(){t.attachButtonToModuleHeader(e)}),n.on("click","."+this.fieldListItemClass,this.switchToField),n.on("t3-formengine-postfieldvalidation",this.checkForReviewableField)},t}())});
\ No newline at end of file
index 727c20a..e84d33e 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __values=this&&this.__values||function(a){var b="function"==typeof Symbol&&a[Symbol.iterator],c=0;return b?b.call(a):{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}}};define(["require","exports","./Enum/Severity","jquery","./Modal","bootstrap"],function(a,b,c,d,e){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var f=function(){function a(a){void 0===a&&(a=null);var b=this;this.colCount=1,this.rowCount=1,this.nameLabel="name",this.columnLabel="columen label",this.defaultCell={spanned:0,rowspan:1,colspan:1,name:"",colpos:"",column:void 0},this.selectorEditor=".t3js-grideditor",this.selectorAddColumn=".t3js-grideditor-addcolumn",this.selectorRemoveColumn=".t3js-grideditor-removecolumn",this.selectorAddRowTop=".t3js-grideditor-addrow-top",this.selectorRemoveRowTop=".t3js-grideditor-removerow-top",this.selectorAddRowBottom=".t3js-grideditor-addrow-bottom",this.selectorRemoveRowBottom=".t3js-grideditor-removerow-bottom",this.selectorLinkEditor=".t3js-grideditor-link-editor",this.selectorLinkExpandRight=".t3js-grideditor-link-expand-right",this.selectorLinkShrinkLeft=".t3js-grideditor-link-shrink-left",this.selectorLinkExpandDown=".t3js-grideditor-link-expand-down",this.selectorLinkShrinkUp=".t3js-grideditor-link-shrink-up",this.selectorDocHeaderSave=".t3js-grideditor-savedok",this.selectorDocHeaderSaveClose=".t3js-grideditor-savedokclose",this.selectorConfigPreview=".t3js-grideditor-preview-config",this.selectorConfigPreviewButton=".t3js-grideditor-preview-button",this.modalButtonClickHandler=function(a){var c=a.target;"cancel"===c.name?e.currentModal.trigger("modal-dismiss"):"ok"===c.name&&(b.setName(e.currentModal.find(".t3js-grideditor-field-name").val(),e.currentModal.data("col"),e.currentModal.data("row")),b.setColumn(e.currentModal.find(".t3js-grideditor-field-colpos").val(),e.currentModal.data("col"),e.currentModal.data("row")),b.drawTable(),b.writeConfig(b.export2LayoutRecord()),e.currentModal.trigger("modal-dismiss"))},this.addColumnHandler=function(a){a.preventDefault(),b.addColumn(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.removeColumnHandler=function(a){a.preventDefault(),b.removeColumn(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.addRowTopHandler=function(a){a.preventDefault(),b.addRowTop(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.addRowBottomHandler=function(a){a.preventDefault(),b.addRowBottom(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.removeRowTopHandler=function(a){a.preventDefault(),b.removeRowTop(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.removeRowBottomHandler=function(a){a.preventDefault(),b.removeRowBottom(),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.linkEditorHandler=function(a){a.preventDefault();var c=d(a.target);b.showOptions(c.data("col"),c.data("row"))},this.linkExpandRightHandler=function(a){a.preventDefault();var c=d(a.target);b.addColspan(c.data("col"),c.data("row")),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.linkShrinkLeftHandler=function(a){a.preventDefault();var c=d(a.target);b.removeColspan(c.data("col"),c.data("row")),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.linkExpandDownHandler=function(a){a.preventDefault();var c=d(a.target);b.addRowspan(c.data("col"),c.data("row")),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.linkShrinkUpHandler=function(a){a.preventDefault();var c=d(a.target);b.removeRowspan(c.data("col"),c.data("row")),b.drawTable(),b.writeConfig(b.export2LayoutRecord())},this.configPreviewButtonHandler=function(a){a.preventDefault();var c=d(b.selectorConfigPreview),e=d(b.selectorConfigPreviewButton);c.is(":visible")?(e.empty().append(TYPO3.lang["button.showPageTsConfig"]),d(b.selectorConfigPreview).slideUp()):(e.empty().append(TYPO3.lang["button.hidePageTsConfig"]),d(b.selectorConfigPreview).slideDown())};var c=d(this.selectorEditor);this.colCount=c.data("colcount"),this.rowCount=c.data("rowcount"),this.field=d('input[name="'+c.data("field")+'"]'),this.data=c.data("data"),this.nameLabel=null!==a?a.nameLabel:"Name",this.columnLabel=null!==a?a.columnLabel:"Column",this.targetElement=d(this.selectorEditor),d(this.selectorConfigPreview).hide(),d(this.selectorConfigPreviewButton).empty().append(TYPO3.lang["button.showPageTsConfig"]),this.initializeEvents(),this.drawTable(),this.writeConfig(this.export2LayoutRecord())}return a.stripMarkup=function(a){return a=a.replace(/<(.*)>/gi,""),d("<p>"+a+"</p>").text()},a.prototype.initializeEvents=function(){d(document).on("click",this.selectorAddColumn,this.addColumnHandler),d(document).on("click",this.selectorRemoveColumn,this.removeColumnHandler),d(document).on("click",this.selectorAddRowTop,this.addRowTopHandler),d(document).on("click",this.selectorAddRowBottom,this.addRowBottomHandler),d(document).on("click",this.selectorRemoveRowTop,this.removeRowTopHandler),d(document).on("click",this.selectorRemoveRowBottom,this.removeRowBottomHandler),d(document).on("click",this.selectorLinkEditor,this.linkEditorHandler),d(document).on("click",this.selectorLinkExpandRight,this.linkExpandRightHandler),d(document).on("click",this.selectorLinkShrinkLeft,this.linkShrinkLeftHandler),d(document).on("click",this.selectorLinkExpandDown,this.linkExpandDownHandler),d(document).on("click",this.selectorLinkShrinkUp,this.linkShrinkUpHandler),d(document).on("click",this.selectorConfigPreviewButton,this.configPreviewButtonHandler)},a.prototype.getNewCell=function(){return d.extend({},this.defaultCell)},a.prototype.writeConfig=function(a){this.field.val(a);var b=a.split("\n"),c="";try{for(var e=__values(b),f=e.next();!f.done;f=e.next()){var g=f.value;g&&(c+="\t\t\t"+g+"\n")}}catch(a){h={error:a}}finally{try{f&&!f.done&&(i=e.return)&&i.call(e)}finally{if(h)throw h.error}}d(this.selectorConfigPreview).find("code").empty().append("mod.web_layout.BackendLayouts {\n  exampleKey {\n    title = Example\n    icon = EXT:example_extension/Resources/Public/Images/BackendLayouts/default.gif\n    config {\n"+c.replace(new RegExp("\t","g"),"  ")+"    }\n  }\n}\n");var h,i},a.prototype.addRowTop=function(){for(var a=[],b=0;b<this.colCount;b++){var c=this.getNewCell();c.name=b+"x"+this.data.length,a[b]=c}this.data.unshift(a),this.rowCount++},a.prototype.addRowBottom=function(){for(var a=[],b=0;b<this.colCount;b++){var c=this.getNewCell();c.name=b+"x"+this.data.length,a[b]=c}this.data.push(a),this.rowCount++},a.prototype.removeRowTop=function(){if(this.rowCount<=1)return!1;for(var a=[],b=1;b<this.rowCount;b++)a.push(this.data[b]);for(var c=0;c<this.colCount;c++)1===this.data[0][c].spanned&&this.findUpperCellWidthRowspanAndDecreaseByOne(c,0);return this.data=a,this.rowCount--,!0},a.prototype.removeRowBottom=function(){if(this.rowCount<=1)return!1;for(var a=[],b=0;b<this.rowCount-1;b++)a.push(this.data[b]);for(var c=0;c<this.colCount;c++)1===this.data[this.rowCount-1][c].spanned&&this.findUpperCellWidthRowspanAndDecreaseByOne(c,this.rowCount-1);return this.data=a,this.rowCount--,!0},a.prototype.findUpperCellWidthRowspanAndDecreaseByOne=function(a,b){var c=this.getCell(a,b-1);return!!c&&(1===c.spanned?this.findUpperCellWidthRowspanAndDecreaseByOne(a,b-1):c.rowspan>1&&this.removeRowspan(a,b-1),!0)},a.prototype.removeColumn=function(){if(this.colCount<=1)return!1;for(var a=[],b=0;b<this.rowCount;b++){for(var c=[],d=0;d<this.colCount-1;d++)c.push(this.data[b][d]);1===this.data[b][this.colCount-1].spanned&&this.findLeftCellWidthColspanAndDecreaseByOne(this.colCount-1,b),a.push(c)}return this.data=a,this.colCount--,!0},a.prototype.findLeftCellWidthColspanAndDecreaseByOne=function(a,b){var c=this.getCell(a-1,b);return!!c&&(1===c.spanned?this.findLeftCellWidthColspanAndDecreaseByOne(a-1,b):c.colspan>1&&this.removeColspan(a-1,b),!0)},a.prototype.addColumn=function(){for(var a=0;a<this.rowCount;a++){var b=this.getNewCell();b.name=this.colCount+"x"+a,this.data[a].push(b)}this.colCount++},a.prototype.drawTable=function(){for(var b=d("<colgroup>"),c=0;c<this.colCount;c++){var e=100/this.colCount;b.append(d("<col>").css({width:parseInt(e.toString(),10)+"%"}))}var f=d('<table id="base" class="table editor">');f.append(b);for(var g=0;g<this.rowCount;g++){var h=this.data[g];if(0!==h.length){for(var i=d("<tr>"),c=0;c<this.colCount;c++){var j=this.data[g][c];if(1!==j.spanned){var k=100/this.rowCount,l=100/this.colCount,m=d("<td>").css({height:parseInt(k.toString(),10)*j.rowspan+"%",width:parseInt(l.toString(),10)*j.colspan+"%"}),n=d('<div class="cell_container">');m.append(n);var o=d('<a href="#" data-col="'+c+'" data-row="'+g+'">');n.append(o.clone().attr("class","t3js-grideditor-link-editor link link_editor").attr("title",TYPO3.lang.grid_editCell)),this.cellCanSpanRight(c,g)&&n.append(o.clone().attr("class","t3js-grideditor-link-expand-right link link_expand_right").attr("title",TYPO3.lang.grid_mergeCell)),this.cellCanShrinkLeft(c,g)&&n.append(o.clone().attr("class","t3js-grideditor-link-shrink-left link link_shrink_left").attr("title",TYPO3.lang.grid_splitCell)),this.cellCanSpanDown(c,g)&&n.append(o.clone().attr("class","t3js-grideditor-link-expand-down link link_expand_down").attr("title",TYPO3.lang.grid_mergeCell)),this.cellCanShrinkUp(c,g)&&n.append(o.clone().attr("class","t3js-grideditor-link-shrink-up link link_shrink_up").attr("title",TYPO3.lang.grid_splitCell)),m.append(d('<div class="cell_data">').html(TYPO3.lang.grid_name+": "+(j.name?a.stripMarkup(j.name):TYPO3.lang.grid_notSet)+"<br />"+TYPO3.lang.grid_column+": "+("undefined"==typeof j.column||isNaN(j.column)?TYPO3.lang.grid_notSet:parseInt(j.column,10)))),j.colspan>1&&m.attr("colspan",j.colspan),j.rowspan>1&&m.attr("rowspan",j.rowspan),i.append(m)}}f.append(i)}}d(this.targetElement).empty().append(f)},a.prototype.setName=function(b,c,d){var e=this.getCell(c,d);return!!e&&(e.name=a.stripMarkup(b),!0)},a.prototype.setColumn=function(a,b,c){var d=this.getCell(b,c);return!!d&&(d.column=parseInt(a.toString(),10),!0)},a.prototype.showOptions=function(b,f){var g=this.getCell(b,f);if(!g)return!1;var h;h=0===g.column?0:g.column?parseInt(g.column.toString(),10):"";var i=d("<div>"),j=d('<div class="form-group">'),k=d("<label>"),l=d("<input>");i.append([j.clone().append([k.clone().text(TYPO3.lang.grid_nameHelp),l.clone().attr("type","text").attr("class","t3js-grideditor-field-name form-control").attr("name","name").val(a.stripMarkup(g.name)||"")]),j.clone().append([k.clone().text(TYPO3.lang.grid_columnHelp),l.clone().attr("type","text").attr("class","t3js-grideditor-field-colpos form-control").attr("name","column").val(h)])]);var m=e.show(TYPO3.lang.grid_windowTitle,i,c.SeverityEnum.notice,[{active:!0,btnClass:"btn-default",name:"cancel",text:d(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel"},{btnClass:"btn-primary",name:"ok",text:d(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK"}]);return m.data("col",b),m.data("row",f),m.on("button.clicked",this.modalButtonClickHandler),!0},a.prototype.getCell=function(a,b){return!(a>this.colCount-1)&&(!(b>this.rowCount-1)&&(this.data.length>b-1&&this.data[b].length>a-1?this.data[b][a]:null))},a.prototype.cellCanSpanRight=function(a,b){if(a===this.colCount-1)return!1;var c,d=this.getCell(a,b);if(d.rowspan>1){for(var e=b;e<b+d.rowspan;e++)if(c=this.getCell(a+d.colspan,e),!c||1===c.spanned||c.colspan>1||c.rowspan>1)return!1}else if(c=this.getCell(a+d.colspan,b),!c||1===d.spanned||1===c.spanned||c.colspan>1||c.rowspan>1)return!1;return!0},a.prototype.cellCanSpanDown=function(a,b){if(b===this.rowCount-1)return!1;var c,d=this.getCell(a,b);if(d.colspan>1){for(var e=a;e<a+d.colspan;e++)if(c=this.getCell(e,b+d.rowspan),!c||1===c.spanned||c.colspan>1||c.rowspan>1)return!1}else if(c=this.getCell(a,b+d.rowspan),!c||1===d.spanned||1===c.spanned||c.colspan>1||c.rowspan>1)return!1;return!0},a.prototype.cellCanShrinkLeft=function(a,b){return this.data[b][a].colspan>1},a.prototype.cellCanShrinkUp=function(a,b){return this.data[b][a].rowspan>1},a.prototype.addColspan=function(a,b){var c=this.getCell(a,b);if(!c||!this.cellCanSpanRight(a,b))return!1;for(var d=b;d<b+c.rowspan;d++)this.data[d][a+c.colspan].spanned=1;return c.colspan+=1,!0},a.prototype.addRowspan=function(a,b){var c=this.getCell(a,b);if(!c||!this.cellCanSpanDown(a,b))return!1;for(var d=a;d<a+c.colspan;d++)this.data[b+c.rowspan][d].spanned=1;return c.rowspan+=1,!0},a.prototype.removeColspan=function(a,b){var c=this.getCell(a,b);if(!c||!this.cellCanShrinkLeft(a,b))return!1;c.colspan-=1;for(var d=b;d<b+c.rowspan;d++)this.data[d][a+c.colspan].spanned=0;return!0},a.prototype.removeRowspan=function(a,b){var c=this.getCell(a,b);if(!c||!this.cellCanShrinkUp(a,b))return!1;c.rowspan-=1;for(var d=a;d<a+c.colspan;d++)this.data[b+c.rowspan][d].spanned=0;return!0},a.prototype.export2LayoutRecord=function(){for(var a="backend_layout {\n\tcolCount = "+this.colCount+"\n\trowCount = "+this.rowCount+"\n\trows {\n",b=0;b<this.rowCount;b++){a+="\t\t"+(b+1)+" {\n",a+="\t\t\tcolumns {\n";for(var c=0,d=0;d<this.colCount;d++){var e=this.getCell(d,b);e&&(e.spanned||(c++,a+="\t\t\t\t"+c+" {\n",a+="\t\t\t\t\tname = "+(e.name?e.name:d+"x"+b)+"\n",e.colspan>1&&(a+="\t\t\t\t\tcolspan = "+e.colspan+"\n"),e.rowspan>1&&(a+="\t\t\t\t\trowspan = "+e.rowspan+"\n"),"number"==typeof e.column&&(a+="\t\t\t\t\tcolPos = "+e.column+"\n"),a+="\t\t\t\t}\n"))}a+="\t\t\t}\n",a+="\t\t}\n"}return a+="\t}\n}\n"},a}();b.GridEditor=f});
\ No newline at end of file
+var __values=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};define(["require","exports","./Enum/Severity","jquery","./Modal","bootstrap"],function(t,e,n,o,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t){void 0===t&&(t=null);var e=this;this.colCount=1,this.rowCount=1,this.nameLabel="name",this.columnLabel="columen label",this.defaultCell={spanned:0,rowspan:1,colspan:1,name:"",colpos:"",column:void 0},this.selectorEditor=".t3js-grideditor",this.selectorAddColumn=".t3js-grideditor-addcolumn",this.selectorRemoveColumn=".t3js-grideditor-removecolumn",this.selectorAddRowTop=".t3js-grideditor-addrow-top",this.selectorRemoveRowTop=".t3js-grideditor-removerow-top",this.selectorAddRowBottom=".t3js-grideditor-addrow-bottom",this.selectorRemoveRowBottom=".t3js-grideditor-removerow-bottom",this.selectorLinkEditor=".t3js-grideditor-link-editor",this.selectorLinkExpandRight=".t3js-grideditor-link-expand-right",this.selectorLinkShrinkLeft=".t3js-grideditor-link-shrink-left",this.selectorLinkExpandDown=".t3js-grideditor-link-expand-down",this.selectorLinkShrinkUp=".t3js-grideditor-link-shrink-up",this.selectorDocHeaderSave=".t3js-grideditor-savedok",this.selectorDocHeaderSaveClose=".t3js-grideditor-savedokclose",this.selectorConfigPreview=".t3js-grideditor-preview-config",this.selectorConfigPreviewButton=".t3js-grideditor-preview-button",this.modalButtonClickHandler=function(t){var n=t.target;"cancel"===n.name?r.currentModal.trigger("modal-dismiss"):"ok"===n.name&&(e.setName(r.currentModal.find(".t3js-grideditor-field-name").val(),r.currentModal.data("col"),r.currentModal.data("row")),e.setColumn(r.currentModal.find(".t3js-grideditor-field-colpos").val(),r.currentModal.data("col"),r.currentModal.data("row")),e.drawTable(),e.writeConfig(e.export2LayoutRecord()),r.currentModal.trigger("modal-dismiss"))},this.addColumnHandler=function(t){t.preventDefault(),e.addColumn(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.removeColumnHandler=function(t){t.preventDefault(),e.removeColumn(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.addRowTopHandler=function(t){t.preventDefault(),e.addRowTop(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.addRowBottomHandler=function(t){t.preventDefault(),e.addRowBottom(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.removeRowTopHandler=function(t){t.preventDefault(),e.removeRowTop(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.removeRowBottomHandler=function(t){t.preventDefault(),e.removeRowBottom(),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.linkEditorHandler=function(t){t.preventDefault();var n=o(t.target);e.showOptions(n.data("col"),n.data("row"))},this.linkExpandRightHandler=function(t){t.preventDefault();var n=o(t.target);e.addColspan(n.data("col"),n.data("row")),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.linkShrinkLeftHandler=function(t){t.preventDefault();var n=o(t.target);e.removeColspan(n.data("col"),n.data("row")),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.linkExpandDownHandler=function(t){t.preventDefault();var n=o(t.target);e.addRowspan(n.data("col"),n.data("row")),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.linkShrinkUpHandler=function(t){t.preventDefault();var n=o(t.target);e.removeRowspan(n.data("col"),n.data("row")),e.drawTable(),e.writeConfig(e.export2LayoutRecord())},this.configPreviewButtonHandler=function(t){t.preventDefault();var n=o(e.selectorConfigPreview),r=o(e.selectorConfigPreviewButton);n.is(":visible")?(r.empty().append(TYPO3.lang["button.showPageTsConfig"]),o(e.selectorConfigPreview).slideUp()):(r.empty().append(TYPO3.lang["button.hidePageTsConfig"]),o(e.selectorConfigPreview).slideDown())};var n=o(this.selectorEditor);this.colCount=n.data("colcount"),this.rowCount=n.data("rowcount"),this.field=o('input[name="'+n.data("field")+'"]'),this.data=n.data("data"),this.nameLabel=null!==t?t.nameLabel:"Name",this.columnLabel=null!==t?t.columnLabel:"Column",this.targetElement=o(this.selectorEditor),o(this.selectorConfigPreview).hide(),o(this.selectorConfigPreviewButton).empty().append(TYPO3.lang["button.showPageTsConfig"]),this.initializeEvents(),this.drawTable(),this.writeConfig(this.export2LayoutRecord())}return t.stripMarkup=function(t){return t=t.replace(/<(.*)>/gi,""),o("<p>"+t+"</p>").text()},t.prototype.initializeEvents=function(){o(document).on("click",this.selectorAddColumn,this.addColumnHandler),o(document).on("click",this.selectorRemoveColumn,this.removeColumnHandler),o(document).on("click",this.selectorAddRowTop,this.addRowTopHandler),o(document).on("click",this.selectorAddRowBottom,this.addRowBottomHandler),o(document).on("click",this.selectorRemoveRowTop,this.removeRowTopHandler),o(document).on("click",this.selectorRemoveRowBottom,this.removeRowBottomHandler),o(document).on("click",this.selectorLinkEditor,this.linkEditorHandler),o(document).on("click",this.selectorLinkExpandRight,this.linkExpandRightHandler),o(document).on("click",this.selectorLinkShrinkLeft,this.linkShrinkLeftHandler),o(document).on("click",this.selectorLinkExpandDown,this.linkExpandDownHandler),o(document).on("click",this.selectorLinkShrinkUp,this.linkShrinkUpHandler),o(document).on("click",this.selectorConfigPreviewButton,this.configPreviewButtonHandler)},t.prototype.getNewCell=function(){return o.extend({},this.defaultCell)},t.prototype.writeConfig=function(t){this.field.val(t);var e,n,r=t.split("\n"),a="";try{for(var i=__values(r),l=i.next();!l.done;l=i.next()){var s=l.value;s&&(a+="\t\t\t"+s+"\n")}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o(this.selectorConfigPreview).find("code").empty().append("mod.web_layout.BackendLayouts {\n  exampleKey {\n    title = Example\n    icon = EXT:example_extension/Resources/Public/Images/BackendLayouts/default.gif\n    config {\n"+a.replace(new RegExp("\t","g"),"  ")+"    }\n  }\n}\n")},t.prototype.addRowTop=function(){for(var t=[],e=0;e<this.colCount;e++){var n=this.getNewCell();n.name=e+"x"+this.data.length,t[e]=n}this.data.unshift(t),this.rowCount++},t.prototype.addRowBottom=function(){for(var t=[],e=0;e<this.colCount;e++){var n=this.getNewCell();n.name=e+"x"+this.data.length,t[e]=n}this.data.push(t),this.rowCount++},t.prototype.removeRowTop=function(){if(this.rowCount<=1)return!1;for(var t=[],e=1;e<this.rowCount;e++)t.push(this.data[e]);for(var n=0;n<this.colCount;n++)1===this.data[0][n].spanned&&this.findUpperCellWidthRowspanAndDecreaseByOne(n,0);return this.data=t,this.rowCount--,!0},t.prototype.removeRowBottom=function(){if(this.rowCount<=1)return!1;for(var t=[],e=0;e<this.rowCount-1;e++)t.push(this.data[e]);for(var n=0;n<this.colCount;n++)1===this.data[this.rowCount-1][n].spanned&&this.findUpperCellWidthRowspanAndDecreaseByOne(n,this.rowCount-1);return this.data=t,this.rowCount--,!0},t.prototype.findUpperCellWidthRowspanAndDecreaseByOne=function(t,e){var n=this.getCell(t,e-1);return!!n&&(1===n.spanned?this.findUpperCellWidthRowspanAndDecreaseByOne(t,e-1):n.rowspan>1&&this.removeRowspan(t,e-1),!0)},t.prototype.removeColumn=function(){if(this.colCount<=1)return!1;for(var t=[],e=0;e<this.rowCount;e++){for(var n=[],o=0;o<this.colCount-1;o++)n.push(this.data[e][o]);1===this.data[e][this.colCount-1].spanned&&this.findLeftCellWidthColspanAndDecreaseByOne(this.colCount-1,e),t.push(n)}return this.data=t,this.colCount--,!0},t.prototype.findLeftCellWidthColspanAndDecreaseByOne=function(t,e){var n=this.getCell(t-1,e);return!!n&&(1===n.spanned?this.findLeftCellWidthColspanAndDecreaseByOne(t-1,e):n.colspan>1&&this.removeColspan(t-1,e),!0)},t.prototype.addColumn=function(){for(var t=0;t<this.rowCount;t++){var e=this.getNewCell();e.name=this.colCount+"x"+t,this.data[t].push(e)}this.colCount++},t.prototype.drawTable=function(){for(var e=o("<colgroup>"),n=0;n<this.colCount;n++){var r=100/this.colCount;e.append(o("<col>").css({width:parseInt(r.toString(),10)+"%"}))}var a=o('<table id="base" class="table editor">');a.append(e);for(var i=0;i<this.rowCount;i++){if(0!==this.data[i].length){var l=o("<tr>");for(n=0;n<this.colCount;n++){var s=this.data[i][n];if(1!==s.spanned){var d=100/this.rowCount,c=100/this.colCount,p=o("<td>").css({height:parseInt(d.toString(),10)*s.rowspan+"%",width:parseInt(c.toString(),10)*s.colspan+"%"}),u=o('<div class="cell_container">');p.append(u);var h=o('<a href="#" data-col="'+n+'" data-row="'+i+'">');u.append(h.clone().attr("class","t3js-grideditor-link-editor link link_editor").attr("title",TYPO3.lang.grid_editCell)),this.cellCanSpanRight(n,i)&&u.append(h.clone().attr("class","t3js-grideditor-link-expand-right link link_expand_right").attr("title",TYPO3.lang.grid_mergeCell)),this.cellCanShrinkLeft(n,i)&&u.append(h.clone().attr("class","t3js-grideditor-link-shrink-left link link_shrink_left").attr("title",TYPO3.lang.grid_splitCell)),this.cellCanSpanDown(n,i)&&u.append(h.clone().attr("class","t3js-grideditor-link-expand-down link link_expand_down").attr("title",TYPO3.lang.grid_mergeCell)),this.cellCanShrinkUp(n,i)&&u.append(h.clone().attr("class","t3js-grideditor-link-shrink-up link link_shrink_up").attr("title",TYPO3.lang.grid_splitCell)),p.append(o('<div class="cell_data">').html(TYPO3.lang.grid_name+": "+(s.name?t.stripMarkup(s.name):TYPO3.lang.grid_notSet)+"<br />"+TYPO3.lang.grid_column+": "+(void 0===s.column||isNaN(s.column)?TYPO3.lang.grid_notSet:parseInt(s.column,10)))),s.colspan>1&&p.attr("colspan",s.colspan),s.rowspan>1&&p.attr("rowspan",s.rowspan),l.append(p)}}a.append(l)}}o(this.targetElement).empty().append(a)},t.prototype.setName=function(e,n,o){var r=this.getCell(n,o);return!!r&&(r.name=t.stripMarkup(e),!0)},t.prototype.setColumn=function(t,e,n){var o=this.getCell(e,n);return!!o&&(o.column=parseInt(t.toString(),10),!0)},t.prototype.showOptions=function(e,a){var i,l=this.getCell(e,a);if(!l)return!1;i=0===l.column?0:l.column?parseInt(l.column.toString(),10):"";var s=o("<div>"),d=o('<div class="form-group">'),c=o("<label>"),p=o("<input>");s.append([d.clone().append([c.clone().text(TYPO3.lang.grid_nameHelp),p.clone().attr("type","text").attr("class","t3js-grideditor-field-name form-control").attr("name","name").val(t.stripMarkup(l.name)||"")]),d.clone().append([c.clone().text(TYPO3.lang.grid_columnHelp),p.clone().attr("type","text").attr("class","t3js-grideditor-field-colpos form-control").attr("name","column").val(i)])]);var u=r.show(TYPO3.lang.grid_windowTitle,s,n.SeverityEnum.notice,[{active:!0,btnClass:"btn-default",name:"cancel",text:o(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel"},{btnClass:"btn-primary",name:"ok",text:o(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK"}]);return u.data("col",e),u.data("row",a),u.on("button.clicked",this.modalButtonClickHandler),!0},t.prototype.getCell=function(t,e){return!(t>this.colCount-1)&&(!(e>this.rowCount-1)&&(this.data.length>e-1&&this.data[e].length>t-1?this.data[e][t]:null))},t.prototype.cellCanSpanRight=function(t,e){if(t===this.colCount-1)return!1;var n,o=this.getCell(t,e);if(o.rowspan>1){for(var r=e;r<e+o.rowspan;r++)if(!(n=this.getCell(t+o.colspan,r))||1===n.spanned||n.colspan>1||n.rowspan>1)return!1}else if(!(n=this.getCell(t+o.colspan,e))||1===o.spanned||1===n.spanned||n.colspan>1||n.rowspan>1)return!1;return!0},t.prototype.cellCanSpanDown=function(t,e){if(e===this.rowCount-1)return!1;var n,o=this.getCell(t,e);if(o.colspan>1){for(var r=t;r<t+o.colspan;r++)if(!(n=this.getCell(r,e+o.rowspan))||1===n.spanned||n.colspan>1||n.rowspan>1)return!1}else if(!(n=this.getCell(t,e+o.rowspan))||1===o.spanned||1===n.spanned||n.colspan>1||n.rowspan>1)return!1;return!0},t.prototype.cellCanShrinkLeft=function(t,e){return this.data[e][t].colspan>1},t.prototype.cellCanShrinkUp=function(t,e){return this.data[e][t].rowspan>1},t.prototype.addColspan=function(t,e){var n=this.getCell(t,e);if(!n||!this.cellCanSpanRight(t,e))return!1;for(var o=e;o<e+n.rowspan;o++)this.data[o][t+n.colspan].spanned=1;return n.colspan+=1,!0},t.prototype.addRowspan=function(t,e){var n=this.getCell(t,e);if(!n||!this.cellCanSpanDown(t,e))return!1;for(var o=t;o<t+n.colspan;o++)this.data[e+n.rowspan][o].spanned=1;return n.rowspan+=1,!0},t.prototype.removeColspan=function(t,e){var n=this.getCell(t,e);if(!n||!this.cellCanShrinkLeft(t,e))return!1;n.colspan-=1;for(var o=e;o<e+n.rowspan;o++)this.data[o][t+n.colspan].spanned=0;return!0},t.prototype.removeRowspan=function(t,e){var n=this.getCell(t,e);if(!n||!this.cellCanShrinkUp(t,e))return!1;n.rowspan-=1;for(var o=t;o<t+n.colspan;o++)this.data[e+n.rowspan][o].spanned=0;return!0},t.prototype.export2LayoutRecord=function(){for(var t="backend_layout {\n\tcolCount = "+this.colCount+"\n\trowCount = "+this.rowCount+"\n\trows {\n",e=0;e<this.rowCount;e++){t+="\t\t"+(e+1)+" {\n",t+="\t\t\tcolumns {\n";for(var n=0,o=0;o<this.colCount;o++){var r=this.getCell(o,e);r&&(r.spanned||(t+="\t\t\t\t"+ ++n+" {\n",t+="\t\t\t\t\tname = "+(r.name?r.name:o+"x"+e)+"\n",r.colspan>1&&(t+="\t\t\t\t\tcolspan = "+r.colspan+"\n"),r.rowspan>1&&(t+="\t\t\t\t\trowspan = "+r.rowspan+"\n"),"number"==typeof r.column&&(t+="\t\t\t\t\tcolPos = "+r.column+"\n"),t+="\t\t\t\t}\n"))}t+="\t\t\t}\n",t+="\t\t}\n"}return t+="\t}\n}\n"},t}();e.GridEditor=a});
\ No newline at end of file
index 83f131b..4fefb92 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d;!function(a){a.small="small",a.default="default",a.large="large",a.overlay="overlay"}(d||(d={}));var e;!function(a){a.default="default",a.disabled="disabled"}(e||(e={}));var f;!function(a){a.default="default",a.inline="inline"}(f||(f={}));var g,h=function(){function a(){this.sizes=d,this.states=e,this.markupIdentifiers=f,this.cache={}}return a.prototype.getIcon=function(a,b,d,e,f){return c.when(this.fetch(a,b,d,e,f))},a.prototype.fetch=function(a,b,g,h,i){b=b||d.default,h=h||e.default,i=i||f.default;var j=[a,b,g,h,i],k=j.join("_");return this.isCached(k)||this.putInCache(k,c.ajax({url:TYPO3.settings.ajaxUrls.icons,dataType:"html",data:{icon:JSON.stringify(j)},success:function(a){return a}}).promise()),this.getFromCache(k).done()},a.prototype.isCached=function(a){return"undefined"!=typeof this.cache[a]},a.prototype.getFromCache=function(a){return this.cache[a]},a.prototype.putInCache=function(a,b){this.cache[a]=b},a}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Icons&&(g=window.opener.TYPO3.Icons),parent&&parent.window.TYPO3&&parent.window.TYPO3.Icons&&(g=parent.window.TYPO3.Icons),top&&top.TYPO3.Icons&&(g=top.TYPO3.Icons)}catch(a){}return g||(g=new h,TYPO3.Icons=g),g});
\ No newline at end of file
+define(["require","exports","jquery"],function(e,t,n){"use strict";var o,i,r,a,s,c;(i=o||(o={})).small="small",i.default="default",i.large="large",i.overlay="overlay",(a=r||(r={})).default="default",a.disabled="disabled",(c=s||(s={})).default="default",c.inline="inline";var u,d=function(){function e(){this.sizes=o,this.states=r,this.markupIdentifiers=s,this.cache={}}return e.prototype.getIcon=function(e,t,o,i,r){return n.when(this.fetch(e,t,o,i,r))},e.prototype.fetch=function(e,t,i,a,c){var u=[e,t=t||o.default,i,a=a||r.default,c=c||s.default],d=u.join("_");return this.isCached(d)||this.putInCache(d,n.ajax({url:TYPO3.settings.ajaxUrls.icons,dataType:"html",data:{icon:JSON.stringify(u)},success:function(e){return e}}).promise()),this.getFromCache(d).done()},e.prototype.isCached=function(e){return void 0!==this.cache[e]},e.prototype.getFromCache=function(e){return this.cache[e]},e.prototype.putInCache=function(e,t){this.cache[e]=t},e}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Icons&&(u=window.opener.TYPO3.Icons),parent&&parent.window.TYPO3&&parent.window.TYPO3.Icons&&(u=parent.window.TYPO3.Icons),top&&top.TYPO3.Icons&&(u=top.TYPO3.Icons)}catch(e){}return u||(u=new d,TYPO3.Icons=u),u});
\ No newline at end of file
index efb6c05..15ed626 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Modal","TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min","jquery-ui/draggable","jquery-ui/resizable"],function(a,b,c,d,e){"use strict";var f=function(){function a(){var b=this;this.cropImageContainerSelector="#t3js-crop-image-container",this.cropImageSelector="#t3js-crop-image",this.coverAreaSelector=".t3js-cropper-cover-area",this.cropInfoSelector=".t3js-cropper-info-crop",this.focusAreaSelector="#t3js-cropper-focus-area",this.defaultFocusArea={height:1/3,width:1/3,x:0,y:0},this.defaultOpts={autoCrop:!0,autoCropArea:"0.7",dragMode:"crop",guides:!0,responsive:!0,viewMode:1,zoomable:!1},this.resizeTimeout=450,this.cropBuiltHandler=function(){var d=b.cropper.cropper("getImageData"),e=b.currentModal.find(b.cropImageSelector);b.imageOriginalSizeFactor=e.data("originalWidth")/d.naturalWidth,b.cropVariantTriggers.each(function(a,e){var f=c(e).attr("data-crop-variant-id"),g=b.convertRelativeToAbsoluteCropArea(b.data[f].cropArea,d),h=c.extend(!0,{},b.data[f],{cropArea:g});b.updatePreviewThumbnail(h,c(e))}),b.currentCropVariant.cropArea=b.convertRelativeToAbsoluteCropArea(b.currentCropVariant.cropArea,d),b.cropBox=b.currentModal.find(".cropper-crop-box"),b.setCropArea(b.currentCropVariant.cropArea),b.currentCropVariant.coverAreas&&b.initCoverAreas(b.cropBox,b.currentCropVariant.coverAreas),b.currentCropVariant.focusArea&&(a.isEmptyArea(b.currentCropVariant.focusArea)&&(b.currentCropVariant.focusArea=c.extend(!0,{},b.defaultFocusArea)),b.initFocusArea(b.cropBox),b.scaleAndMoveFocusArea(b.currentCropVariant.focusArea)),b.currentCropVariant.selectedRatio&&(b.setAspectRatio(b.currentCropVariant.allowedAspectRatios[b.currentCropVariant.selectedRatio]),b.setCropArea(b.currentCropVariant.cropArea),b.currentModal.find("[data-option='"+b.currentCropVariant.selectedRatio+"']").addClass("active")),b.cropperCanvas.addClass("is-visible")},this.cropMoveHandler=function(a){b.currentCropVariant.cropArea=c.extend(!0,b.currentCropVariant.cropArea,{height:Math.floor(a.height),width:Math.floor(a.width),x:Math.floor(a.x),y:Math.floor(a.y)}),b.updatePreviewThumbnail(b.currentCropVariant,b.activeCropVariantTrigger),b.updateCropVariantData(b.currentCropVariant);var d=Math.round(b.currentCropVariant.cropArea.width*b.imageOriginalSizeFactor),e=Math.round(b.currentCropVariant.cropArea.height*b.imageOriginalSizeFactor);b.cropInfo.text(d+"×"+e+" px")},this.cropStartHandler=function(){b.currentCropVariant.focusArea&&(b.focusArea.draggable("option","disabled",!0),b.focusArea.resizable("option","disabled",!0))},this.cropEndHandler=function(){b.currentCropVariant.focusArea&&(b.focusArea.draggable("option","disabled",!1),b.focusArea.resizable("option","disabled",!1))},c(window).resize(function(){b.cropper&&b.cropper.cropper("destroy")}),this.resizeEnd(function(){b.cropper&&b.init()})}return a.isEmptyArea=function(a){return c.isEmptyObject(a)},a.wait=function(a,b){window.setTimeout(a,b)},a.toCssPercent=function(a){return 100*a+"%"},a.serializeCropVariants=function(a){var b=function(a,b){return"id"===a||"title"===a||"allowedAspectRatios"===a||"coverAreas"===a?void 0:b};return JSON.stringify(a,b)},a.prototype.initializeTrigger=function(){var a=this,b=function(b){b.preventDefault(),a.trigger=c(b.currentTarget),a.show()};c(".t3js-image-manipulation-trigger").off("click").click(b)},a.prototype.initializeCropperModal=function(){var a=this,b=this.currentModal.find(this.cropImageSelector);e(b,function(){setTimeout(function(){a.init()},100)})},a.prototype.show=function(){var a=this,b=this.trigger.data("modalTitle"),c=this.trigger.data("buttonPreviewText"),e=this.trigger.data("buttonDismissText"),f=this.trigger.data("buttonSaveText"),g=this.trigger.data("url"),h=this.initializeCropperModal.bind(this);this.currentModal=d.advanced({additionalCssClasses:["modal-image-manipulation"],ajaxCallback:h,buttons:[{btnClass:"btn-default pull-left",dataAttributes:{method:"preview"},icon:"actions-view",text:c},{btnClass:"btn-default",dataAttributes:{method:"dismiss"},icon:"actions-close",text:e},{btnClass:"btn-primary",dataAttributes:{method:"save"},icon:"actions-document-save",text:f}],callback:function(a){a.find(".t3js-modal-body").addClass("cropper")},content:g,size:d.sizes.full,style:d.styles.dark,title:b,type:"ajax"}),this.currentModal.on("hide.bs.modal",function(b){a.destroy()}),this.currentModal.data("bs.modal").options.backdrop="static"},a.prototype.init=function(){var b=this,d=this.currentModal.find(this.cropImageSelector),e=c(d).height(),f=c(d).width(),g=this.trigger.attr("data-crop-variants");if(!g)throw new TypeError("ImageManipulation: No cropVariants data found for image");this.data=c.isEmptyObject(this.data)?JSON.parse(g):this.data,this.currentModal.find(this.cropImageContainerSelector).css({height:e,width:f}),this.cropVariantTriggers=this.currentModal.find(".t3js-crop-variant-trigger"),this.activeCropVariantTrigger=this.currentModal.find(".t3js-crop-variant-trigger.is-active"),this.cropInfo=this.currentModal.find(this.cropInfoSelector),this.saveButton=this.currentModal.find("[data-method=save]"),this.previewButton=this.currentModal.find("[data-method=preview]"),this.dismissButton=this.currentModal.find("[data-method=dismiss]"),this.resetButton=this.currentModal.find("[data-method=reset]"),this.cropperCanvas=this.currentModal.find("#js-crop-canvas"),this.aspectRatioTrigger=this.currentModal.find("[data-method=setAspectRatio]"),this.currentCropVariant=this.data[this.activeCropVariantTrigger.attr("data-crop-variant-id")],this.cropVariantTriggers.off("click").on("click",function(a){if(c(a.currentTarget).hasClass("is-active"))return a.stopPropagation(),void a.preventDefault();b.activeCropVariantTrigger.removeClass("is-active"),c(a.currentTarget).addClass("is-active"),b.activeCropVariantTrigger=c(a.currentTarget);var d=b.data[b.activeCropVariantTrigger.attr("data-crop-variant-id")],e=b.cropper.cropper("getImageData");d.cropArea=b.convertRelativeToAbsoluteCropArea(d.cropArea,e),b.currentCropVariant=c.extend(!0,{},d),b.update(d)}),this.aspectRatioTrigger.off("click").on("click",function(a){var d=c(a.currentTarget).attr("data-option"),e=c.extend(!0,{},b.currentCropVariant),f=e.allowedAspectRatios[d];b.setAspectRatio(f),b.setCropArea(e.cropArea),b.currentCropVariant=c.extend(!0,{},e,{selectedRatio:d}),b.update(b.currentCropVariant)}),this.saveButton.off("click").on("click",function(){b.save(b.data)}),this.trigger.attr("data-preview-url")?this.previewButton.off("click").on("click",function(){b.openPreview(b.data)}):this.previewButton.hide(),this.dismissButton.off("click").on("click",function(){b.currentModal.modal("hide")}),this.resetButton.off("click").on("click",function(a){var d=b.cropper.cropper("getImageData"),e=c(a.currentTarget).attr("data-crop-variant");if(a.preventDefault(),a.stopPropagation(),!e)throw new TypeError("TYPO3 Cropper: No cropVariant data attribute found on reset element.");var f=JSON.parse(e),g=b.convertRelativeToAbsoluteCropArea(f.cropArea,d);b.currentCropVariant=c.extend(!0,{},f,{cropArea:g}),b.update(b.currentCropVariant)}),a.isEmptyArea(this.currentCropVariant.cropArea)&&(this.defaultOpts=c.extend({autoCropArea:1},this.defaultOpts)),this.cropper=top.$(d).cropper(c.extend(this.defaultOpts,{built:this.cropBuiltHandler,crop:this.cropMoveHandler,cropend:this.cropEndHandler,cropstart:this.cropStartHandler,data:this.currentCropVariant.cropArea}))},a.prototype.update=function(b){var d=c.extend(!0,{},b),e=b.allowedAspectRatios[b.selectedRatio];this.currentModal.find("[data-option]").removeClass("active"),this.currentModal.find('[data-option="'+b.selectedRatio+'"]').addClass("active"),this.setAspectRatio(e),this.setCropArea(d.cropArea),this.currentCropVariant=c.extend(!0,{},d,b),this.cropBox.find(this.coverAreaSelector).remove(),this.cropBox.has(this.focusAreaSelector).length&&(this.focusArea.resizable("destroy").draggable("destroy"),this.focusArea.remove()),b.focusArea&&(a.isEmptyArea(b.focusArea)&&(this.currentCropVariant.focusArea=c.extend(!0,{},this.defaultFocusArea)),this.initFocusArea(this.cropBox),this.scaleAndMoveFocusArea(this.currentCropVariant.focusArea)),b.coverAreas&&this.initCoverAreas(this.cropBox,this.currentCropVariant.coverAreas),this.updatePreviewThumbnail(this.currentCropVariant,this.activeCropVariantTrigger)},a.prototype.initFocusArea=function(b){var d=this;this.focusArea=c('<div id="t3js-cropper-focus-area" class="cropper-focus-area"></div>'),b.append(this.focusArea),this.focusArea.draggable({containment:b,create:function(){d.scaleAndMoveFocusArea(d.currentCropVariant.focusArea)},drag:function(){var a=b.offset(),c=a.left,e=a.top,f=d.focusArea.offset(),g=f.left,h=f.top,i=d.currentCropVariant,j=i.focusArea,k=i.coverAreas;j.x=(g-c)/b.width(),j.y=(h-e)/b.height(),d.updatePreviewThumbnail(d.currentCropVariant,d.activeCropVariantTrigger),d.checkFocusAndCoverAreasCollision(j,k)?d.focusArea.addClass("has-nodrop"):d.focusArea.removeClass("has-nodrop")},revert:function(){var c=250,e=b.offset(),f=e.left,g=e.top,h=d.focusArea.offset(),i=h.left,j=h.top,k=d.currentCropVariant,l=k.focusArea,m=k.coverAreas;return!!d.checkFocusAndCoverAreasCollision(l,m)&&(d.focusArea.removeClass("has-nodrop"),a.wait(function(){l.x=(i-f)/b.width(),l.y=(j-g)/b.height(),d.updateCropVariantData(d.currentCropVariant)},c),!0)},revertDuration:200,stop:function(){var a=b.offset(),c=a.left,e=a.top,f=d.focusArea.offset(),g=f.left,h=f.top,i=d.currentCropVariant.focusArea;i.x=(g-c)/b.width(),i.y=(h-e)/b.height(),d.scaleAndMoveFocusArea(i)}}).resizable({containment:b,handles:"all",resize:function(){var a=b.offset(),c=a.left,e=a.top,f=d.focusArea.offset(),g=f.left,h=f.top,i=d.currentCropVariant,j=i.focusArea,k=i.coverAreas;j.height=d.focusArea.height()/b.height(),j.width=d.focusArea.width()/b.width(),j.x=(g-c)/b.width(),j.y=(h-e)/b.height(),d.updatePreviewThumbnail(d.currentCropVariant,d.activeCropVariantTrigger),d.checkFocusAndCoverAreasCollision(j,k)?d.focusArea.addClass("has-nodrop"):d.focusArea.removeClass("has-nodrop")},stop:function(a,e){var f=250,g=b.offset(),h=g.left,i=g.top,j=d.focusArea.offset(),k=j.left,l=j.top,m=d.currentCropVariant,n=m.focusArea,o=m.coverAreas;d.checkFocusAndCoverAreasCollision(n,o)?e.element.animate(c.extend(e.originalPosition,e.originalSize),f,function(){n.height=d.focusArea.height()/b.height(),n.height=d.focusArea.height()/b.height(),n.width=d.focusArea.width()/b.width(),n.x=(k-h)/b.width(),n.y=(l-i)/b.height(),d.scaleAndMoveFocusArea(n),d.focusArea.removeClass("has-nodrop")}):d.scaleAndMoveFocusArea(n)}})},a.prototype.initCoverAreas=function(b,d){d.forEach(function(d){var e=c('<div class="cropper-cover-area t3js-cropper-cover-area"></div>');b.append(e),e.css({height:a.toCssPercent(d.height),left:a.toCssPercent(d.x),top:a.toCssPercent(d.y),width:a.toCssPercent(d.width)})})},a.prototype.updatePreviewThumbnail=function(b,c){var d,e=c.find(".t3js-cropper-preview-thumbnail-crop-area"),f=c.find(".t3js-cropper-preview-thumbnail-crop-image"),g=c.find(".t3js-cropper-preview-thumbnail-focus-area"),h=this.cropper.cropper("getImageData");e.css({height:a.toCssPercent(b.cropArea.height/h.naturalHeight),left:a.toCssPercent(b.cropArea.x/h.naturalWidth),top:a.toCssPercent(b.cropArea.y/h.naturalHeight),width:a.toCssPercent(b.cropArea.width/h.naturalWidth)}),b.focusArea&&g.css({height:a.toCssPercent(b.focusArea.height),left:a.toCssPercent(b.focusArea.x),top:a.toCssPercent(b.focusArea.y),width:a.toCssPercent(b.focusArea.width)}),d=e.css(["width","height","left","top"]),f.css({height:parseFloat(d.height)*(1/(b.cropArea.height/h.naturalHeight))+"px",margin:-1*parseFloat(d.left)+"px",marginTop:-1*parseFloat(d.top)+"px",width:parseFloat(d.width)*(1/(b.cropArea.width/h.naturalWidth))+"px"})},a.prototype.scaleAndMoveFocusArea=function(b){this.focusArea.css({height:a.toCssPercent(b.height),left:a.toCssPercent(b.x),top:a.toCssPercent(b.y),width:a.toCssPercent(b.width)}),this.currentCropVariant.focusArea=b,this.updatePreviewThumbnail(this.currentCropVariant,this.activeCropVariantTrigger),this.updateCropVariantData(this.currentCropVariant)},a.prototype.updateCropVariantData=function(a){var b=this.cropper.cropper("getImageData"),d=this.convertAbsoluteToRelativeCropArea(a.cropArea,b);this.data[a.id]=c.extend(!0,{},a,{cropArea:d})},a.prototype.setAspectRatio=function(a){this.cropper.cropper("setAspectRatio",a.value)},a.prototype.setCropArea=function(a){var b=this.currentCropVariant.allowedAspectRatios[this.currentCropVariant.selectedRatio];0===b.value?this.cropper.cropper("setData",{height:a.height,width:a.width,x:a.x,y:a.y}):this.cropper.cropper("setData",{height:a.height,x:a.x,y:a.y})},a.prototype.checkFocusAndCoverAreasCollision=function(a,b){return!!b&&b.some(function(b){return a.x<b.x+b.width&&a.x+a.width>b.x&&a.y<b.y+b.height&&a.height+a.y>b.y})},a.prototype.convertAbsoluteToRelativeCropArea=function(a,b){var c=a.height,d=a.width,e=a.x,f=a.y;return{height:c/b.naturalHeight,width:d/b.naturalWidth,x:e/b.naturalWidth,y:f/b.naturalHeight}},a.prototype.convertRelativeToAbsoluteCropArea=function(a,b){var c=a.height,d=a.width,e=a.x,f=a.y;return{height:c*b.naturalHeight,width:d*b.naturalWidth,x:e*b.naturalWidth,y:f*b.naturalHeight}},a.prototype.setPreviewImages=function(a){var b=this,d=this.cropper,e=d.cropper("getImageData");Object.keys(a).forEach(function(f){var g=a[f],h=b.convertRelativeToAbsoluteCropArea(g.cropArea,e),i=b.trigger.closest(".form-group").find('.t3js-image-manipulation-preview[data-crop-variant-id="'+f+'"]'),j=b.trigger.closest(".form-group").find('.t3js-image-manipulation-selected-ratio[data-crop-variant-id="'+f+'"]');if(0!==i.length){var k=i.width(),l=i.data("preview-height"),m=h.width/h.height,n=k/m;n>l?k=l*m:l=n,k>h.width&&(k=h.width,l=h.height);var o=k/h.width,p=c("<div />").html('<img src="'+d.attr("src")+'">'),q=b.currentModal.find('.t3-js-ratio-title[data-ratio-id="'+g.id+g.selectedRatio+'"]');j.text(q.text()),p.addClass("cropper-preview-container"),i.empty().append(p),p.wrap('<span class="thumbnail thumbnail-status"></span>'),p.width(k).height(l).find("img").css({height:e.naturalHeight*o,left:-h.x*o,top:-h.y*o,width:e.naturalWidth*o})}})},a.prototype.openPreview=function(b){var c=a.serializeCropVariants(b),d=this.trigger.attr("data-preview-url");d=d+"&cropVariants="+encodeURIComponent(c),window.open(d,"TYPO3ImageManipulationPreview")},a.prototype.save=function(b){var d=a.serializeCropVariants(b),e=c("#"+this.trigger.attr("data-field"));this.trigger.attr("data-crop-variants",JSON.stringify(b)),this.setPreviewImages(b),e.val(d),this.currentModal.modal("hide")},a.prototype.destroy=function(){this.currentModal&&(this.cropper.cropper("destroy"),this.cropper=null,this.currentModal=null,this.data=null)},a.prototype.resizeEnd=function(a){var b,d=this;c(window).on("resize",function(){clearTimeout(b),b=setTimeout(function(){a()},d.resizeTimeout)})},a}();return new f});
\ No newline at end of file
+define(["require","exports","jquery","./Modal","TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min","jquery-ui/draggable","jquery-ui/resizable"],function(t,r,e,a,i){"use strict";return new(function(){function t(){var r=this;this.cropImageContainerSelector="#t3js-crop-image-container",this.cropImageSelector="#t3js-crop-image",this.coverAreaSelector=".t3js-cropper-cover-area",this.cropInfoSelector=".t3js-cropper-info-crop",this.focusAreaSelector="#t3js-cropper-focus-area",this.defaultFocusArea={height:1/3,width:1/3,x:0,y:0},this.defaultOpts={autoCrop:!0,autoCropArea:"0.7",dragMode:"crop",guides:!0,responsive:!0,viewMode:1,zoomable:!1},this.resizeTimeout=450,this.cropBuiltHandler=function(){var a=r.cropper.cropper("getImageData"),i=r.currentModal.find(r.cropImageSelector);r.imageOriginalSizeFactor=i.data("originalWidth")/a.naturalWidth,r.cropVariantTriggers.each(function(t,i){var o=e(i).attr("data-crop-variant-id"),n=r.convertRelativeToAbsoluteCropArea(r.data[o].cropArea,a),s=e.extend(!0,{},r.data[o],{cropArea:n});r.updatePreviewThumbnail(s,e(i))}),r.currentCropVariant.cropArea=r.convertRelativeToAbsoluteCropArea(r.currentCropVariant.cropArea,a),r.cropBox=r.currentModal.find(".cropper-crop-box"),r.setCropArea(r.currentCropVariant.cropArea),r.currentCropVariant.coverAreas&&r.initCoverAreas(r.cropBox,r.currentCropVariant.coverAreas),r.currentCropVariant.focusArea&&(t.isEmptyArea(r.currentCropVariant.focusArea)&&(r.currentCropVariant.focusArea=e.extend(!0,{},r.defaultFocusArea)),r.initFocusArea(r.cropBox),r.scaleAndMoveFocusArea(r.currentCropVariant.focusArea)),r.currentCropVariant.selectedRatio&&(r.setAspectRatio(r.currentCropVariant.allowedAspectRatios[r.currentCropVariant.selectedRatio]),r.setCropArea(r.currentCropVariant.cropArea),r.currentModal.find("[data-option='"+r.currentCropVariant.selectedRatio+"']").addClass("active")),r.cropperCanvas.addClass("is-visible")},this.cropMoveHandler=function(t){r.currentCropVariant.cropArea=e.extend(!0,r.currentCropVariant.cropArea,{height:Math.floor(t.height),width:Math.floor(t.width),x:Math.floor(t.x),y:Math.floor(t.y)}),r.updatePreviewThumbnail(r.currentCropVariant,r.activeCropVariantTrigger),r.updateCropVariantData(r.currentCropVariant);var a=Math.round(r.currentCropVariant.cropArea.width*r.imageOriginalSizeFactor),i=Math.round(r.currentCropVariant.cropArea.height*r.imageOriginalSizeFactor);r.cropInfo.text(a+"×"+i+" px")},this.cropStartHandler=function(){r.currentCropVariant.focusArea&&(r.focusArea.draggable("option","disabled",!0),r.focusArea.resizable("option","disabled",!0))},this.cropEndHandler=function(){r.currentCropVariant.focusArea&&(r.focusArea.draggable("option","disabled",!1),r.focusArea.resizable("option","disabled",!1))},e(window).resize(function(){r.cropper&&r.cropper.cropper("destroy")}),this.resizeEnd(function(){r.cropper&&r.init()})}return t.isEmptyArea=function(t){return e.isEmptyObject(t)},t.wait=function(t,r){window.setTimeout(t,r)},t.toCssPercent=function(t){return 100*t+"%"},t.serializeCropVariants=function(t){return JSON.stringify(t,function(t,r){return"id"===t||"title"===t||"allowedAspectRatios"===t||"coverAreas"===t?void 0:r})},t.prototype.initializeTrigger=function(){var t=this;e(".t3js-image-manipulation-trigger").off("click").click(function(r){r.preventDefault(),t.trigger=e(r.currentTarget),t.show()})},t.prototype.initializeCropperModal=function(){var t=this,r=this.currentModal.find(this.cropImageSelector);i(r,function(){setTimeout(function(){t.init()},100)})},t.prototype.show=function(){var t=this,r=this.trigger.data("modalTitle"),e=this.trigger.data("buttonPreviewText"),i=this.trigger.data("buttonDismissText"),o=this.trigger.data("buttonSaveText"),n=this.trigger.data("url"),s=this.initializeCropperModal.bind(this);this.currentModal=a.advanced({additionalCssClasses:["modal-image-manipulation"],ajaxCallback:s,buttons:[{btnClass:"btn-default pull-left",dataAttributes:{method:"preview"},icon:"actions-view",text:e},{btnClass:"btn-default",dataAttributes:{method:"dismiss"},icon:"actions-close",text:i},{btnClass:"btn-primary",dataAttributes:{method:"save"},icon:"actions-document-save",text:o}],callback:function(t){t.find(".t3js-modal-body").addClass("cropper")},content:n,size:a.sizes.full,style:a.styles.dark,title:r,type:"ajax"}),this.currentModal.on("hide.bs.modal",function(r){t.destroy()}),this.currentModal.data("bs.modal").options.backdrop="static"},t.prototype.init=function(){var r=this,a=this.currentModal.find(this.cropImageSelector),i=e(a).height(),o=e(a).width(),n=this.trigger.attr("data-crop-variants");if(!n)throw new TypeError("ImageManipulation: No cropVariants data found for image");this.data=e.isEmptyObject(this.data)?JSON.parse(n):this.data,this.currentModal.find(this.cropImageContainerSelector).css({height:i,width:o}),this.cropVariantTriggers=this.currentModal.find(".t3js-crop-variant-trigger"),this.activeCropVariantTrigger=this.currentModal.find(".t3js-crop-variant-trigger.is-active"),this.cropInfo=this.currentModal.find(this.cropInfoSelector),this.saveButton=this.currentModal.find("[data-method=save]"),this.previewButton=this.currentModal.find("[data-method=preview]"),this.dismissButton=this.currentModal.find("[data-method=dismiss]"),this.resetButton=this.currentModal.find("[data-method=reset]"),this.cropperCanvas=this.currentModal.find("#js-crop-canvas"),this.aspectRatioTrigger=this.currentModal.find("[data-method=setAspectRatio]"),this.currentCropVariant=this.data[this.activeCropVariantTrigger.attr("data-crop-variant-id")],this.cropVariantTriggers.off("click").on("click",function(t){if(e(t.currentTarget).hasClass("is-active"))return t.stopPropagation(),void t.preventDefault();r.activeCropVariantTrigger.removeClass("is-active"),e(t.currentTarget).addClass("is-active"),r.activeCropVariantTrigger=e(t.currentTarget);var a=r.data[r.activeCropVariantTrigger.attr("data-crop-variant-id")],i=r.cropper.cropper("getImageData");a.cropArea=r.convertRelativeToAbsoluteCropArea(a.cropArea,i),r.currentCropVariant=e.extend(!0,{},a),r.update(a)}),this.aspectRatioTrigger.off("click").on("click",function(t){var a=e(t.currentTarget).attr("data-option"),i=e.extend(!0,{},r.currentCropVariant),o=i.allowedAspectRatios[a];r.setAspectRatio(o),r.setCropArea(i.cropArea),r.currentCropVariant=e.extend(!0,{},i,{selectedRatio:a}),r.update(r.currentCropVariant)}),this.saveButton.off("click").on("click",function(){r.save(r.data)}),this.trigger.attr("data-preview-url")?this.previewButton.off("click").on("click",function(){r.openPreview(r.data)}):this.previewButton.hide(),this.dismissButton.off("click").on("click",function(){r.currentModal.modal("hide")}),this.resetButton.off("click").on("click",function(t){var a=r.cropper.cropper("getImageData"),i=e(t.currentTarget).attr("data-crop-variant");if(t.preventDefault(),t.stopPropagation(),!i)throw new TypeError("TYPO3 Cropper: No cropVariant data attribute found on reset element.");var o=JSON.parse(i),n=r.convertRelativeToAbsoluteCropArea(o.cropArea,a);r.currentCropVariant=e.extend(!0,{},o,{cropArea:n}),r.update(r.currentCropVariant)}),t.isEmptyArea(this.currentCropVariant.cropArea)&&(this.defaultOpts=e.extend({autoCropArea:1},this.defaultOpts)),this.cropper=top.$(a).cropper(e.extend(this.defaultOpts,{built:this.cropBuiltHandler,crop:this.cropMoveHandler,cropend:this.cropEndHandler,cropstart:this.cropStartHandler,data:this.currentCropVariant.cropArea}))},t.prototype.update=function(r){var a=e.extend(!0,{},r),i=r.allowedAspectRatios[r.selectedRatio];this.currentModal.find("[data-option]").removeClass("active"),this.currentModal.find('[data-option="'+r.selectedRatio+'"]').addClass("active"),this.setAspectRatio(i),this.setCropArea(a.cropArea),this.currentCropVariant=e.extend(!0,{},a,r),this.cropBox.find(this.coverAreaSelector).remove(),this.cropBox.has(this.focusAreaSelector).length&&(this.focusArea.resizable("destroy").draggable("destroy"),this.focusArea.remove()),r.focusArea&&(t.isEmptyArea(r.focusArea)&&(this.currentCropVariant.focusArea=e.extend(!0,{},this.defaultFocusArea)),this.initFocusArea(this.cropBox),this.scaleAndMoveFocusArea(this.currentCropVariant.focusArea)),r.coverAreas&&this.initCoverAreas(this.cropBox,this.currentCropVariant.coverAreas),this.updatePreviewThumbnail(this.currentCropVariant,this.activeCropVariantTrigger)},t.prototype.initFocusArea=function(r){var a=this;this.focusArea=e('<div id="t3js-cropper-focus-area" class="cropper-focus-area"></div>'),r.append(this.focusArea),this.focusArea.draggable({containment:r,create:function(){a.scaleAndMoveFocusArea(a.currentCropVariant.focusArea)},drag:function(){var t=r.offset(),e=t.left,i=t.top,o=a.focusArea.offset(),n=o.left,s=o.top,c=a.currentCropVariant,p=c.focusArea,u=c.coverAreas;p.x=(n-e)/r.width(),p.y=(s-i)/r.height(),a.updatePreviewThumbnail(a.currentCropVariant,a.activeCropVariantTrigger),a.checkFocusAndCoverAreasCollision(p,u)?a.focusArea.addClass("has-nodrop"):a.focusArea.removeClass("has-nodrop")},revert:function(){var e=r.offset(),i=e.left,o=e.top,n=a.focusArea.offset(),s=n.left,c=n.top,p=a.currentCropVariant,u=p.focusArea,d=p.coverAreas;return!!a.checkFocusAndCoverAreasCollision(u,d)&&(a.focusArea.removeClass("has-nodrop"),t.wait(function(){u.x=(s-i)/r.width(),u.y=(c-o)/r.height(),a.updateCropVariantData(a.currentCropVariant)},250),!0)},revertDuration:200,stop:function(){var t=r.offset(),e=t.left,i=t.top,o=a.focusArea.offset(),n=o.left,s=o.top,c=a.currentCropVariant.focusArea;c.x=(n-e)/r.width(),c.y=(s-i)/r.height(),a.scaleAndMoveFocusArea(c)}}).resizable({containment:r,handles:"all",resize:function(){var t=r.offset(),e=t.left,i=t.top,o=a.focusArea.offset(),n=o.left,s=o.top,c=a.currentCropVariant,p=c.focusArea,u=c.coverAreas;p.height=a.focusArea.height()/r.height(),p.width=a.focusArea.width()/r.width(),p.x=(n-e)/r.width(),p.y=(s-i)/r.height(),a.updatePreviewThumbnail(a.currentCropVariant,a.activeCropVariantTrigger),a.checkFocusAndCoverAreasCollision(p,u)?a.focusArea.addClass("has-nodrop"):a.focusArea.removeClass("has-nodrop")},stop:function(t,i){var o=r.offset(),n=o.left,s=o.top,c=a.focusArea.offset(),p=c.left,u=c.top,d=a.currentCropVariant,h=d.focusArea,l=d.coverAreas;a.checkFocusAndCoverAreasCollision(h,l)?i.element.animate(e.extend(i.originalPosition,i.originalSize),250,function(){h.height=a.focusArea.height()/r.height(),h.height=a.focusArea.height()/r.height(),h.width=a.focusArea.width()/r.width(),h.x=(p-n)/r.width(),h.y=(u-s)/r.height(),a.scaleAndMoveFocusArea(h),a.focusArea.removeClass("has-nodrop")}):a.scaleAndMoveFocusArea(h)}})},t.prototype.initCoverAreas=function(r,a){a.forEach(function(a){var i=e('<div class="cropper-cover-area t3js-cropper-cover-area"></div>');r.append(i),i.css({height:t.toCssPercent(a.height),left:t.toCssPercent(a.x),top:t.toCssPercent(a.y),width:t.toCssPercent(a.width)})})},t.prototype.updatePreviewThumbnail=function(r,e){var a,i=e.find(".t3js-cropper-preview-thumbnail-crop-area"),o=e.find(".t3js-cropper-preview-thumbnail-crop-image"),n=e.find(".t3js-cropper-preview-thumbnail-focus-area"),s=this.cropper.cropper("getImageData");i.css({height:t.toCssPercent(r.cropArea.height/s.naturalHeight),left:t.toCssPercent(r.cropArea.x/s.naturalWidth),top:t.toCssPercent(r.cropArea.y/s.naturalHeight),width:t.toCssPercent(r.cropArea.width/s.naturalWidth)}),r.focusArea&&n.css({height:t.toCssPercent(r.focusArea.height),left:t.toCssPercent(r.focusArea.x),top:t.toCssPercent(r.focusArea.y),width:t.toCssPercent(r.focusArea.width)}),a=i.css(["width","height","left","top"]),o.css({height:parseFloat(a.height)*(1/(r.cropArea.height/s.naturalHeight))+"px",margin:-1*parseFloat(a.left)+"px",marginTop:-1*parseFloat(a.top)+"px",width:parseFloat(a.width)*(1/(r.cropArea.width/s.naturalWidth))+"px"})},t.prototype.scaleAndMoveFocusArea=function(r){this.focusArea.css({height:t.toCssPercent(r.height),left:t.toCssPercent(r.x),top:t.toCssPercent(r.y),width:t.toCssPercent(r.width)}),this.currentCropVariant.focusArea=r,this.updatePreviewThumbnail(this.currentCropVariant,this.activeCropVariantTrigger),this.updateCropVariantData(this.currentCropVariant)},t.prototype.updateCropVariantData=function(t){var r=this.cropper.cropper("getImageData"),a=this.convertAbsoluteToRelativeCropArea(t.cropArea,r);this.data[t.id]=e.extend(!0,{},t,{cropArea:a})},t.prototype.setAspectRatio=function(t){this.cropper.cropper("setAspectRatio",t.value)},t.prototype.setCropArea=function(t){0===this.currentCropVariant.allowedAspectRatios[this.currentCropVariant.selectedRatio].value?this.cropper.cropper("setData",{height:t.height,width:t.width,x:t.x,y:t.y}):this.cropper.cropper("setData",{height:t.height,x:t.x,y:t.y})},t.prototype.checkFocusAndCoverAreasCollision=function(t,r){return!!r&&r.some(function(r){return t.x<r.x+r.width&&t.x+t.width>r.x&&t.y<r.y+r.height&&t.height+t.y>r.y})},t.prototype.convertAbsoluteToRelativeCropArea=function(t,r){var e=t.height,a=t.width,i=t.x,o=t.y;return{height:e/r.naturalHeight,width:a/r.naturalWidth,x:i/r.naturalWidth,y:o/r.naturalHeight}},t.prototype.convertRelativeToAbsoluteCropArea=function(t,r){var e=t.height,a=t.width,i=t.x,o=t.y;return{height:e*r.naturalHeight,width:a*r.naturalWidth,x:i*r.naturalWidth,y:o*r.naturalHeight}},t.prototype.setPreviewImages=function(t){var r=this,a=this.cropper,i=a.cropper("getImageData");Object.keys(t).forEach(function(o){var n=t[o],s=r.convertRelativeToAbsoluteCropArea(n.cropArea,i),c=r.trigger.closest(".form-group").find('.t3js-image-manipulation-preview[data-crop-variant-id="'+o+'"]'),p=r.trigger.closest(".form-group").find('.t3js-image-manipulation-selected-ratio[data-crop-variant-id="'+o+'"]');if(0!==c.length){var u=c.width(),d=c.data("preview-height"),h=s.width/s.height,l=u/h;l>d?u=d*h:d=l,u>s.width&&(u=s.width,d=s.height);var f=u/s.width,g=e("<div />").html('<img src="'+a.attr("src")+'">'),v=r.currentModal.find('.t3-js-ratio-title[data-ratio-id="'+n.id+n.selectedRatio+'"]');p.text(v.text()),g.addClass("cropper-preview-container"),c.empty().append(g),g.wrap('<span class="thumbnail thumbnail-status"></span>'),g.width(u).height(d).find("img").css({height:i.naturalHeight*f,left:-s.x*f,top:-s.y*f,width:i.naturalWidth*f})}})},t.prototype.openPreview=function(r){var e=t.serializeCropVariants(r),a=this.trigger.attr("data-preview-url");a=a+"&cropVariants="+encodeURIComponent(e),window.open(a,"TYPO3ImageManipulationPreview")},t.prototype.save=function(r){var a=t.serializeCropVariants(r),i=e("#"+this.trigger.attr("data-field"));this.trigger.attr("data-crop-variants",JSON.stringify(r)),this.setPreviewImages(r),i.val(a),this.currentModal.modal("hide")},t.prototype.destroy=function(){this.currentModal&&(this.cropper.cropper("destroy"),this.cropper=null,this.currentModal=null,this.data=null)},t.prototype.resizeEnd=function(t){var r,a=this;e(window).on("resize",function(){clearTimeout(r),r=setTimeout(function(){t()},a.resizeTimeout)})},t}())});
\ No newline at end of file
index cb83fad..f3fdba5 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity","./Modal"],function(a,b,c,d){"use strict";var e=function(){function a(){}return a.showItem=function(a,b){d.advanced({type:d.types.iframe,size:d.sizes.large,content:TYPO3.settings.ShowItem.moduleUrl+"&table="+encodeURIComponent(a)+"&uid="+("number"==typeof b?b:encodeURIComponent(b)),severity:c.SeverityEnum.notice})},a}();return TYPO3.InfoWindow=e,e});
\ No newline at end of file
+define(["require","exports","./Enum/Severity","./Modal"],function(e,n,t,o){"use strict";var i=function(){function e(){}return e.showItem=function(e,n){o.advanced({type:o.types.iframe,size:o.sizes.large,content:TYPO3.settings.ShowItem.moduleUrl+"&table="+encodeURIComponent(e)+"&uid="+("number"==typeof n?n:encodeURIComponent(n)),severity:t.SeverityEnum.notice})},e}();return TYPO3.InfoWindow=i,i});
\ No newline at end of file
index c924dab..f676a8b 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","bootstrap","TYPO3/CMS/Backend/jquery.clearable"],function(a,b,c){"use strict";var d=function(){function a(){var a=this;this.showLoginProcess=function(){a.showLoadingIndicator(),c(a.options.error).addClass("hidden"),c(a.options.errorNoCookies).addClass("hidden")},this.showLoadingIndicator=function(){c(a.options.submitButton).button("loading")},this.handleSubmit=function(b){a.showLoginProcess(),"function"==typeof a.options.submitHandler&&a.options.submitHandler(b)},this.interfaceSelectorChanged=function(){var b=new Date,d=new Date(b.getTime()+31536e6);document.cookie="typo3-login-interface="+c(a.options.interfaceField).val()+"; expires="+d.toUTCString()+";"},this.checkForInterfaceCookie=function(){if(c(a.options.interfaceField).length){var b=document.cookie.indexOf("typo3-login-interface=");if(b!==-1){var d=document.cookie.substr(b+22);d=d.substr(0,d.indexOf(";")),c(a.options.interfaceField).val(d)}}},this.showCookieWarning=function(){c(a.options.formFields).addClass("hidden"),c(a.options.errorNoCookies).removeClass("hidden")},this.hideCookieWarning=function(){c(a.options.formFields).removeClass("hidden"),c(a.options.errorNoCookies).addClass("hidden")},this.checkCookieSupport=function(){var b=navigator.cookieEnabled;b===!1?a.showCookieWarning():document.cookie||null!==b||(document.cookie="typo3-login-cookiecheck=1",document.cookie?document.cookie="typo3-login-cookiecheck=; expires="+new Date(0).toUTCString():a.showCookieWarning())},this.initializeEvents=function(){c(document).ajaxStart(a.showLoadingIndicator),c(a.options.loginForm).on("submit",a.handleSubmit),c(a.options.interfaceField).length>0&&c(document).on("change blur",a.options.interfaceField,a.interfaceSelectorChanged),c(".t3js-clearable").clearable(),c(".t3js-login-news-carousel").on("slide.bs.carousel",function(a){var b=c(a.relatedTarget).height(),d=c(a.target);d.find("div.active").parent().animate({height:b},500)})},this.options={error:".t3js-login-error",errorNoCookies:".t3js-login-error-nocookies",formFields:".t3js-login-formfields",interfaceField:".t3js-login-interface-field",loginForm:"#typo3-login-form",submitButton:".t3js-login-submit",submitHandler:null,useridentField:".t3js-login-userident-field"},this.checkCookieSupport(),this.checkForInterfaceCookie(),this.initializeEvents(),top.location.href!==location.href&&(top.location.href=location.href)}return a}();return new d});
\ No newline at end of file
+define(["require","exports","jquery","bootstrap","TYPO3/CMS/Backend/jquery.clearable"],function(o,e,i){"use strict";return new function(){var o=this;this.showLoginProcess=function(){o.showLoadingIndicator(),i(o.options.error).addClass("hidden"),i(o.options.errorNoCookies).addClass("hidden")},this.showLoadingIndicator=function(){i(o.options.submitButton).button("loading")},this.handleSubmit=function(e){o.showLoginProcess(),"function"==typeof o.options.submitHandler&&o.options.submitHandler(e)},this.interfaceSelectorChanged=function(){var e=new Date,n=new Date(e.getTime()+31536e6);document.cookie="typo3-login-interface="+i(o.options.interfaceField).val()+"; expires="+n.toUTCString()+";"},this.checkForInterfaceCookie=function(){if(i(o.options.interfaceField).length){var e=document.cookie.indexOf("typo3-login-interface=");if(-1!==e){var n=document.cookie.substr(e+22);n=n.substr(0,n.indexOf(";")),i(o.options.interfaceField).val(n)}}},this.showCookieWarning=function(){i(o.options.formFields).addClass("hidden"),i(o.options.errorNoCookies).removeClass("hidden")},this.hideCookieWarning=function(){i(o.options.formFields).removeClass("hidden"),i(o.options.errorNoCookies).addClass("hidden")},this.checkCookieSupport=function(){var e=navigator.cookieEnabled;!1===e?o.showCookieWarning():document.cookie||null!==e||(document.cookie="typo3-login-cookiecheck=1",document.cookie?document.cookie="typo3-login-cookiecheck=; expires="+new Date(0).toUTCString():o.showCookieWarning())},this.initializeEvents=function(){i(document).ajaxStart(o.showLoadingIndicator),i(o.options.loginForm).on("submit",o.handleSubmit),i(o.options.interfaceField).length>0&&i(document).on("change blur",o.options.interfaceField,o.interfaceSelectorChanged),i(".t3js-clearable").clearable(),i(".t3js-login-news-carousel").on("slide.bs.carousel",function(o){var e=i(o.relatedTarget).height();i(o.target).find("div.active").parent().animate({height:e},500)})},this.options={error:".t3js-login-error",errorNoCookies:".t3js-login-error-nocookies",formFields:".t3js-login-formfields",interfaceField:".t3js-login-interface-field",loginForm:"#typo3-login-form",submitButton:".t3js-login-submit",submitHandler:null,useridentField:".t3js-login-userident-field"},this.checkCookieSupport(),this.checkForInterfaceCookie(),this.initializeEvents(),top.location.href!==location.href&&(top.location.href=location.href)}});
\ No newline at end of file
index 8b19bb9..e17c1aa 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __values=this&&this.__values||function(a){var b="function"==typeof Symbol&&a[Symbol.iterator],c=0;return b?b.call(a):{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}}};define(["require","exports","./Enum/Severity","jquery","./Icons","./Severity","bootstrap"],function(a,b,c,d,e,f){"use strict";var g;!function(a){a.modal=".t3js-modal",a.content=".t3js-modal-content",a.title=".t3js-modal-title",a.close=".t3js-modal-close",a.body=".t3js-modal-body",a.footer=".t3js-modal-footer",a.iframe=".t3js-modal-iframe",a.iconPlaceholder=".t3js-modal-icon-placeholder"}(g||(g={}));var h;!function(a){a.small="small",a.default="default",a.medium="medium",a.large="large",a.full="full"}(h||(h={}));var i;!function(a){a.default="default",a.light="light",a.dark="dark"}(i||(i={}));var j;!function(a){a.default="default",a.ajax="ajax",a.iframe="iframe"}(j||(j={}));var k=function(){function a(){this.sizes=h,this.styles=i,this.types=j,this.currentModal=null,this.instances=[],this.$template=d('<div class="t3js-modal modal fade"><div class="modal-dialog"><div class="t3js-modal-content modal-content"><div class="modal-header"><button class="t3js-modal-close close"><span aria-hidden="true"><span class="t3js-modal-icon-placeholder" data-icon="actions-close"></span></span><span class="sr-only"></span></button><h4 class="t3js-modal-title modal-title"></h4></div><div class="t3js-modal-body modal-body"></div><div class="t3js-modal-footer modal-footer"></div></div></div></div>'),this.defaultConfiguration={type:j.default,title:"Information",content:"No content provided, please check your <code>Modal</code> configuration.",severity:c.SeverityEnum.notice,buttons:[],style:i.default,size:h.default,additionalCssClasses:[],callback:d.noop(),ajaxCallback:d.noop(),ajaxTarget:null},d(document).on("modal-dismiss",this.dismiss),this.initializeMarkupTrigger(document)}return a.prototype.dismiss=function(){this.currentModal&&this.currentModal.modal("hide")},a.prototype.confirm=function(a,b,e,g,h){return void 0===e&&(e=c.SeverityEnum.warning),void 0===g&&(g=[]),0===g.length&&g.push({text:d(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:d(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+f.getCssClass(e),name:"ok"}),this.advanced({title:a,content:b,severity:e,buttons:g,additionalCssClasses:h,callback:function(a){a.on("button.clicked",function(a){"cancel"===a.target.getAttribute("name")?d(a.currentTarget).trigger("confirm.button.cancel"):"ok"===a.target.getAttribute("name")&&d(a.currentTarget).trigger("confirm.button.ok")})}})},a.prototype.loadUrl=function(a,b,d,e,f,g){return void 0===b&&(b=c.SeverityEnum.info),this.advanced({type:j.ajax,title:a,severity:b,buttons:d,ajaxCallback:f,ajaxTarget:g})},a.prototype.show=function(a,b,d,e,f){return void 0===d&&(d=c.SeverityEnum.info),this.advanced({type:j.default,title:a,content:b,buttons:e,additionalCssClasses:f})},a.prototype.advanced=function(a){return a.type="string"==typeof a.type&&a.type in j?a.type:this.defaultConfiguration.type,a.title="string"==typeof a.title?a.title:this.defaultConfiguration.title,a.content="string"==typeof a.content||"object"==typeof a.content?a.content:this.defaultConfiguration.content,a.severity="undefined"!=typeof a.severity?a.severity:this.defaultConfiguration.severity,a.buttons=a.buttons||this.defaultConfiguration.buttons,a.size="string"==typeof a.size&&a.size in h?a.size:this.defaultConfiguration.size,a.style="string"==typeof a.style&&a.style in i?a.style:this.defaultConfiguration.style,a.additionalCssClasses=a.additionalCssClasses||this.defaultConfiguration.additionalCssClasses,a.callback="function"==typeof a.callback?a.callback:this.defaultConfiguration.callback,a.ajaxCallback="function"==typeof a.ajaxCallback?a.ajaxCallback:this.defaultConfiguration.ajaxCallback,a.ajaxTarget="string"==typeof a.ajaxTarget?a.ajaxTarget:this.defaultConfiguration.ajaxTarget,this.generate(a)},a.prototype.initializeMarkupTrigger=function(a){var b=this;d(a).on("click",".t3js-modal-trigger",function(a){a.preventDefault();var e=d(a.currentTarget),g=e.data("content")||"Are you sure?",h="undefined"!=typeof c.SeverityEnum[e.data("severity")]?c.SeverityEnum[e.data("severity")]:c.SeverityEnum.info,i=e.data("url")||null;if(null!==i){var k=i.indexOf("?")>-1?"&":"?",l=d.param({data:e.data()});i=i+k+l}b.advanced({type:null!==i?j.ajax:j.default,title:e.data("title")||"Alert",content:null!==i?i:g,severity:h,buttons:[{text:e.data("button-close-text")||"Close",active:!0,btnClass:"btn-default",trigger:function(){b.currentModal.trigger("modal-dismiss")}},{text:e.data("button-ok-text")||"OK",btnClass:"btn-"+f.getCssClass(h),trigger:function(){b.currentModal.trigger("modal-dismiss"),a.target.ownerDocument.location.href=e.data("href")||e.attr("href")}}]})})},a.prototype.generate=function(a){var b=this,c=this.$template.clone();if(a.additionalCssClasses.length>0)try{for(var h=__values(a.additionalCssClasses),i=h.next();!i.done;i=h.next()){var j=i.value;c.addClass(j)}}catch(a){m={error:a}}finally{try{i&&!i.done&&(n=h.return)&&n.call(h)}finally{if(m)throw m.error}}if(c.addClass("modal-type-"+a.type),c.addClass("modal-severity-"+f.getCssClass(a.severity)),c.addClass("modal-style-"+a.style),c.addClass("modal-size-"+a.size),c.attr("tabindex","-1"),c.find(g.title).text(a.title),c.find(g.close).on("click",function(){c.modal("hide")}),"ajax"===a.type?(d.get(a.content,function(c){b.currentModal.find(a.ajaxTarget?a.ajaxTarget:g.body).empty().append(c),a.ajaxCallback&&a.ajaxCallback(),b.currentModal.trigger("modal-loaded")},"html"),e.getIcon("spinner-circle",e.sizes.default,null,null,e.markupIdentifiers.inline).done(function(a){c.find(g.body).html('<div class="modal-loading">'+a+"</div>")})):"iframe"===a.type?(c.find(g.body).append(d("<iframe />",{src:a.content,name:"modal_frame",class:"modal-iframe t3js-modal-iframe"})),c.find(g.iframe).on("load",function(){c.find(g.title).text(c.find(g.iframe).get(0).contentDocument.title)})):("string"==typeof a.content&&(/^<[a-z][\s\S]*>/i.test(a.content)||(a.content=d("<p />").html(a.content))),c.find(g.body).append(a.content)),a.buttons.length>0){for(var k=function(b){var e=a.buttons[b],f=d("<button />",{class:"btn"});f.html("<span>"+e.text+"</span>"),e.active&&f.addClass("t3js-active"),""!==e.btnClass&&f.addClass(e.btnClass),""!==e.name&&f.attr("name",e.name),e.trigger&&f.on("click",e.trigger),e.dataAttributes&&Object.keys(e.dataAttributes).length>0&&Object.keys(e.dataAttributes).map(function(a){f.attr("data-"+a,e.dataAttributes[a])}),e.icon&&f.prepend('<span class="t3js-modal-icon-placeholder" data-icon="'+e.icon+'"></span>'),c.find(g.footer).append(f)},l=0;l<a.buttons.length;l++)k(l);c.find(g.footer).find("button").on("click",function(a){d(a.currentTarget).trigger("button.clicked")})}else c.find(g.footer).remove();return c.on("shown.bs.modal",function(a){var c=d(a.currentTarget);c.find(g.footer).find(".t3js-active").first().focus(),c.find(g.iconPlaceholder).each(function(a,c){e.getIcon(d(c).data("icon"),e.sizes.small,null,null,e.markupIdentifiers.inline).done(function(a){b.currentModal.find(g.iconPlaceholder+"[data-icon="+d(a).data("identifier")+"]").replaceWith(a)})})}),c.on("hidden.bs.modal",function(){if(b.instances.length>0){var a=b.instances.length-1;b.instances.splice(a,1),b.currentModal=b.instances[a-1]}c.trigger("modal-destroyed"),d(b).remove(),b.instances.length>0&&d("body").addClass("modal-open")}),c.on("show.bs.modal",function(a){b.currentModal=d(a.currentTarget),b.instances.push(b.currentModal)}),c.on("modal-dismiss",function(a){d(a.currentTarget).modal("hide")}),a.callback&&a.callback(c),c.modal();var m,n},a}(),l=null;try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Modal?(parent.window.TYPO3.Modal.initializeMarkupTrigger(document),l=parent.window.TYPO3.Modal):top&&top.TYPO3.Modal&&(top.TYPO3.Modal.initializeMarkupTrigger(document),l=top.TYPO3.Modal)}catch(a){}return l||(l=new k,TYPO3.Modal=l),l});
\ No newline at end of file
+var __values=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],a=0;return e?e.call(t):{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}}};define(["require","exports","./Enum/Severity","jquery","./Icons","./Severity","bootstrap"],function(t,e,a,n,o,i){"use strict";var l,s,r,d,c,u,f,m;(s=l||(l={})).modal=".t3js-modal",s.content=".t3js-modal-content",s.title=".t3js-modal-title",s.close=".t3js-modal-close",s.body=".t3js-modal-body",s.footer=".t3js-modal-footer",s.iframe=".t3js-modal-iframe",s.iconPlaceholder=".t3js-modal-icon-placeholder",(d=r||(r={})).small="small",d.default="default",d.medium="medium",d.large="large",d.full="full",(u=c||(c={})).default="default",u.light="light",u.dark="dark",(m=f||(f={})).default="default",m.ajax="ajax",m.iframe="iframe";var g=function(){function t(){this.sizes=r,this.styles=c,this.types=f,this.currentModal=null,this.instances=[],this.$template=n('<div class="t3js-modal modal fade"><div class="modal-dialog"><div class="t3js-modal-content modal-content"><div class="modal-header"><button class="t3js-modal-close close"><span aria-hidden="true"><span class="t3js-modal-icon-placeholder" data-icon="actions-close"></span></span><span class="sr-only"></span></button><h4 class="t3js-modal-title modal-title"></h4></div><div class="t3js-modal-body modal-body"></div><div class="t3js-modal-footer modal-footer"></div></div></div></div>'),this.defaultConfiguration={type:f.default,title:"Information",content:"No content provided, please check your <code>Modal</code> configuration.",severity:a.SeverityEnum.notice,buttons:[],style:c.default,size:r.default,additionalCssClasses:[],callback:n.noop(),ajaxCallback:n.noop(),ajaxTarget:null},n(document).on("modal-dismiss",this.dismiss),this.initializeMarkupTrigger(document)}return t.prototype.dismiss=function(){this.currentModal&&this.currentModal.modal("hide")},t.prototype.confirm=function(t,e,o,l,s){return void 0===o&&(o=a.SeverityEnum.warning),void 0===l&&(l=[]),0===l.length&&l.push({text:n(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+i.getCssClass(o),name:"ok"}),this.advanced({title:t,content:e,severity:o,buttons:l,additionalCssClasses:s,callback:function(t){t.on("button.clicked",function(t){"cancel"===t.target.getAttribute("name")?n(t.currentTarget).trigger("confirm.button.cancel"):"ok"===t.target.getAttribute("name")&&n(t.currentTarget).trigger("confirm.button.ok")})}})},t.prototype.loadUrl=function(t,e,n,o,i,l){return void 0===e&&(e=a.SeverityEnum.info),this.advanced({type:f.ajax,title:t,severity:e,buttons:n,ajaxCallback:i,ajaxTarget:l})},t.prototype.show=function(t,e,n,o,i){return void 0===n&&(n=a.SeverityEnum.info),this.advanced({type:f.default,title:t,content:e,buttons:o,additionalCssClasses:i})},t.prototype.advanced=function(t){return t.type="string"==typeof t.type&&t.type in f?t.type:this.defaultConfiguration.type,t.title="string"==typeof t.title?t.title:this.defaultConfiguration.title,t.content="string"==typeof t.content||"object"==typeof t.content?t.content:this.defaultConfiguration.content,t.severity=void 0!==t.severity?t.severity:this.defaultConfiguration.severity,t.buttons=t.buttons||this.defaultConfiguration.buttons,t.size="string"==typeof t.size&&t.size in r?t.size:this.defaultConfiguration.size,t.style="string"==typeof t.style&&t.style in c?t.style:this.defaultConfiguration.style,t.additionalCssClasses=t.additionalCssClasses||this.defaultConfiguration.additionalCssClasses,t.callback="function"==typeof t.callback?t.callback:this.defaultConfiguration.callback,t.ajaxCallback="function"==typeof t.ajaxCallback?t.ajaxCallback:this.defaultConfiguration.ajaxCallback,t.ajaxTarget="string"==typeof t.ajaxTarget?t.ajaxTarget:this.defaultConfiguration.ajaxTarget,this.generate(t)},t.prototype.initializeMarkupTrigger=function(t){var e=this;n(t).on("click",".t3js-modal-trigger",function(t){t.preventDefault();var o=n(t.currentTarget),l=o.data("content")||"Are you sure?",s=void 0!==a.SeverityEnum[o.data("severity")]?a.SeverityEnum[o.data("severity")]:a.SeverityEnum.info,r=o.data("url")||null;null!==r&&(r=r+(r.indexOf("?")>-1?"&":"?")+n.param({data:o.data()}));e.advanced({type:null!==r?f.ajax:f.default,title:o.data("title")||"Alert",content:null!==r?r:l,severity:s,buttons:[{text:o.data("button-close-text")||"Close",active:!0,btnClass:"btn-default",trigger:function(){e.currentModal.trigger("modal-dismiss")}},{text:o.data("button-ok-text")||"OK",btnClass:"btn-"+i.getCssClass(s),trigger:function(){e.currentModal.trigger("modal-dismiss"),t.target.ownerDocument.location.href=o.data("href")||o.attr("href")}}]})})},t.prototype.generate=function(t){var e,a,s=this,r=this.$template.clone();if(t.additionalCssClasses.length>0)try{for(var d=__values(t.additionalCssClasses),c=d.next();!c.done;c=d.next()){var u=c.value;r.addClass(u)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(e)throw e.error}}if(r.addClass("modal-type-"+t.type),r.addClass("modal-severity-"+i.getCssClass(t.severity)),r.addClass("modal-style-"+t.style),r.addClass("modal-size-"+t.size),r.attr("tabindex","-1"),r.find(l.title).text(t.title),r.find(l.close).on("click",function(){r.modal("hide")}),"ajax"===t.type?(n.get(t.content,function(e){s.currentModal.find(t.ajaxTarget?t.ajaxTarget:l.body).empty().append(e),t.ajaxCallback&&t.ajaxCallback(),s.currentModal.trigger("modal-loaded")},"html"),o.getIcon("spinner-circle",o.sizes.default,null,null,o.markupIdentifiers.inline).done(function(t){r.find(l.body).html('<div class="modal-loading">'+t+"</div>")})):"iframe"===t.type?(r.find(l.body).append(n("<iframe />",{src:t.content,name:"modal_frame",class:"modal-iframe t3js-modal-iframe"})),r.find(l.iframe).on("load",function(){r.find(l.title).text(r.find(l.iframe).get(0).contentDocument.title)})):("string"==typeof t.content&&(/^<[a-z][\s\S]*>/i.test(t.content)||(t.content=n("<p />").html(t.content))),r.find(l.body).append(t.content)),t.buttons.length>0){for(var f=function(e){var a=t.buttons[e],o=n("<button />",{class:"btn"});o.html("<span>"+a.text+"</span>"),a.active&&o.addClass("t3js-active"),""!==a.btnClass&&o.addClass(a.btnClass),""!==a.name&&o.attr("name",a.name),a.trigger&&o.on("click",a.trigger),a.dataAttributes&&Object.keys(a.dataAttributes).length>0&&Object.keys(a.dataAttributes).map(function(t){o.attr("data-"+t,a.dataAttributes[t])}),a.icon&&o.prepend('<span class="t3js-modal-icon-placeholder" data-icon="'+a.icon+'"></span>'),r.find(l.footer).append(o)},m=0;m<t.buttons.length;m++)f(m);r.find(l.footer).find("button").on("click",function(t){n(t.currentTarget).trigger("button.clicked")})}else r.find(l.footer).remove();return r.on("shown.bs.modal",function(t){var e=n(t.currentTarget);e.find(l.footer).find(".t3js-active").first().focus(),e.find(l.iconPlaceholder).each(function(t,e){o.getIcon(n(e).data("icon"),o.sizes.small,null,null,o.markupIdentifiers.inline).done(function(t){s.currentModal.find(l.iconPlaceholder+"[data-icon="+n(t).data("identifier")+"]").replaceWith(t)})})}),r.on("hidden.bs.modal",function(){if(s.instances.length>0){var t=s.instances.length-1;s.instances.splice(t,1),s.currentModal=s.instances[t-1]}r.trigger("modal-destroyed"),n(s).remove(),s.instances.length>0&&n("body").addClass("modal-open")}),r.on("show.bs.modal",function(t){s.currentModal=n(t.currentTarget),s.instances.push(s.currentModal)}),r.on("modal-dismiss",function(t){n(t.currentTarget).modal("hide")}),t.callback&&t.callback(r),r.modal()},t}(),p=null;try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Modal?(parent.window.TYPO3.Modal.initializeMarkupTrigger(document),p=parent.window.TYPO3.Modal):top&&top.TYPO3.Modal&&(top.TYPO3.Modal.initializeMarkupTrigger(document),p=top.TYPO3.Modal)}catch(t){}return p||(p=new g,TYPO3.Modal=p),p});
\ No newline at end of file
index ca5775d..8e497bd 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d;!function(a){a.containerSelector=".t3js-newmultiplepages-container",a.addMoreFieldsButtonSelector=".t3js-newmultiplepages-createnewfields",a.doktypeSelector=".t3js-newmultiplepages-select-doktype",a.templateRow=".t3js-newmultiplepages-newlinetemplate"}(d||(d={}));var e=function(){function a(){var a=this;this.lineCounter=5,c(function(){a.initializeEvents()})}return a.prototype.initializeEvents=function(){var a=this;c(d.addMoreFieldsButtonSelector).on("click",function(){a.createNewFormFields()}),c(document).on("change",d.doktypeSelector,function(b){a.actOnTypeSelectChange(c(b.currentTarget))})},a.prototype.createNewFormFields=function(){for(var a=0;a<5;a++){var b=this.lineCounter+a+1,e=c(d.templateRow).html().replace(/\[0\]/g,(this.lineCounter+a).toString()).replace(/\[1\]/g,b.toString());c(e).appendTo(d.containerSelector)}this.lineCounter+=5},a.prototype.actOnTypeSelectChange=function(a){var b=a.find(":selected"),d=c(a.data("target"));d.html(b.data("icon"))},a}();return new e});
\ No newline at end of file
+define(["require","exports","jquery"],function(e,t,n){"use strict";var i,o;return(o=i||(i={})).containerSelector=".t3js-newmultiplepages-container",o.addMoreFieldsButtonSelector=".t3js-newmultiplepages-createnewfields",o.doktypeSelector=".t3js-newmultiplepages-select-doktype",o.templateRow=".t3js-newmultiplepages-newlinetemplate",new(function(){function e(){var e=this;this.lineCounter=5,n(function(){e.initializeEvents()})}return e.prototype.initializeEvents=function(){var e=this;n(i.addMoreFieldsButtonSelector).on("click",function(){e.createNewFormFields()}),n(document).on("change",i.doktypeSelector,function(t){e.actOnTypeSelectChange(n(t.currentTarget))})},e.prototype.createNewFormFields=function(){for(var e=0;e<5;e++){var t=this.lineCounter+e+1,o=n(i.templateRow).html().replace(/\[0\]/g,(this.lineCounter+e).toString()).replace(/\[1\]/g,t.toString());n(o).appendTo(i.containerSelector)}this.lineCounter+=5},e.prototype.actOnTypeSelectChange=function(e){var t=e.find(":selected");n(e.data("target")).html(t.data("icon"))},e}())});
\ No newline at end of file
index 2a4597a..78cda3d 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity","./Severity"],function(a,b,c,d){"use strict";var e,f=function(){function a(){}return a.notice=function(b,d,e){a.showMessage(b,d,c.SeverityEnum.notice,e)},a.info=function(b,d,e){a.showMessage(b,d,c.SeverityEnum.info,e)},a.success=function(b,d,e){a.showMessage(b,d,c.SeverityEnum.ok,e)},a.warning=function(b,d,e){a.showMessage(b,d,c.SeverityEnum.warning,e)},a.error=function(b,d,e){void 0===e&&(e=0),a.showMessage(b,d,c.SeverityEnum.error,e)},a.showMessage=function(a,b,e,f){void 0===f&&(f=this.duration);var g=d.getCssClass(e),h="";switch(e){case c.SeverityEnum.notice:h="lightbulb-o";break;case c.SeverityEnum.ok:h="check";break;case c.SeverityEnum.warning:h="exclamation";break;case c.SeverityEnum.error:h="times";break;case c.SeverityEnum.info:default:h="info"}f="undefined"==typeof f?this.duration:"string"==typeof f?parseFloat(f):f,null===this.messageContainer&&(this.messageContainer=$('<div id="alert-container"></div>').appendTo("body"));var i=$('<div class="alert alert-'+g+' alert-dismissible fade" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true"><i class="fa fa-times-circle"></i></span><span class="sr-only">Close</span></button><div class="media"><div class="media-left"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-'+h+' fa-stack-1x"></i></span></div><div class="media-body"><h4 class="alert-title"></h4><p class="alert-message text-pre-wrap"></p></div></div></div>');i.find(".alert-title").text(a),i.find(".alert-message").text(b),i.on("close.bs.alert",function(a){a.preventDefault();var b=$(a.currentTarget);b.clearQueue().queue(function(a){b.removeClass("in"),a()}).slideUp(function(){b.remove()})}),i.appendTo(this.messageContainer),i.delay(200).queue(function(a){i.addClass("in"),a()}),f>0&&i.delay(1e3*f).queue(function(a){i.alert("close"),a()})},a.duration=5,a.messageContainer=null,a}();try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Notification&&(e=parent.window.TYPO3.Notification),top&&top.TYPO3.Notification&&(e=top.TYPO3.Notification)}catch(a){}return e||(e=f,"undefined"!=typeof TYPO3&&(TYPO3.Notification=e)),e});
\ No newline at end of file
+define(["require","exports","./Enum/Severity","./Severity"],function(e,i,t,a){"use strict";var n,s=function(){function e(){}return e.notice=function(i,a,n){e.showMessage(i,a,t.SeverityEnum.notice,n)},e.info=function(i,a,n){e.showMessage(i,a,t.SeverityEnum.info,n)},e.success=function(i,a,n){e.showMessage(i,a,t.SeverityEnum.ok,n)},e.warning=function(i,a,n){e.showMessage(i,a,t.SeverityEnum.warning,n)},e.error=function(i,a,n){void 0===n&&(n=0),e.showMessage(i,a,t.SeverityEnum.error,n)},e.showMessage=function(e,i,n,s){void 0===s&&(s=this.duration);var r=a.getCssClass(n),o="";switch(n){case t.SeverityEnum.notice:o="lightbulb-o";break;case t.SeverityEnum.ok:o="check";break;case t.SeverityEnum.warning:o="exclamation";break;case t.SeverityEnum.error:o="times";break;case t.SeverityEnum.info:default:o="info"}s=void 0===s?this.duration:"string"==typeof s?parseFloat(s):s,null===this.messageContainer&&(this.messageContainer=$('<div id="alert-container"></div>').appendTo("body"));var c=$('<div class="alert alert-'+r+' alert-dismissible fade" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true"><i class="fa fa-times-circle"></i></span><span class="sr-only">Close</span></button><div class="media"><div class="media-left"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-'+o+' fa-stack-1x"></i></span></div><div class="media-body"><h4 class="alert-title"></h4><p class="alert-message text-pre-wrap"></p></div></div></div>');c.find(".alert-title").text(e),c.find(".alert-message").text(i),c.on("close.bs.alert",function(e){e.preventDefault();var i=$(e.currentTarget);i.clearQueue().queue(function(e){i.removeClass("in"),e()}).slideUp(function(){i.remove()})}),c.appendTo(this.messageContainer),c.delay(200).queue(function(e){c.addClass("in"),e()}),s>0&&c.delay(1e3*s).queue(function(e){c.alert("close"),e()})},e.duration=5,e.messageContainer=null,e}();try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Notification&&(n=parent.window.TYPO3.Notification),top&&top.TYPO3.Notification&&(n=top.TYPO3.Notification)}catch(e){}return n||(n=s,"undefined"!=typeof TYPO3&&(TYPO3.Notification=n)),n});
\ No newline at end of file
index f53a7ae..f1e03ab 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/KeyTypes","jquery","./Storage/Persistent","./Wizard/NewContentElement"],function(a,b,c,d,e,f){"use strict";var g;!function(a){a.pageTitle=".t3js-title-inlineedit",a.hiddenElements=".t3js-hidden-record",a.newButton=".t3js-toggle-new-content-element-wizard"}(g||(g={}));var h=function(){function b(){var a=this;this.pageId=0,this.pageOverlayId=0,this.$pageTitle=null,this.$showHiddenElementsCheckbox=null,d(function(){a.initializeElements(),a.initializeEvents(),a.initializeNewContentElementWizard(),a.initializePageTitleRenaming()})}return b.prototype.setPageId=function(a){this.pageId=a},b.prototype.setLanguageOverlayId=function(a){this.pageOverlayId=a},b.prototype.initializePageTitleRenaming=function(){var a=this;if(!d.isReady)return void d(function(){a.initializePageTitleRenaming()});if(!(this.pageId<=0)){var b=d('<a class="hidden" href="#" data-action="edit"><span class="t3-icon fa fa-pencil"></span></a>');b.on("click",function(b){b.preventDefault(),a.editPageTitle()}),this.$pageTitle.on("dblclick",function(){a.editPageTitle()}).on("mouseover",function(){b.removeClass("hidden")}).on("mouseout",function(){b.addClass("hidden")}).append(b)}},b.prototype.initializeElements=function(){this.$pageTitle=d(g.pageTitle+":first"),this.$showHiddenElementsCheckbox=d("#checkTt_content_showHidden")},b.prototype.initializeEvents=function(){this.$showHiddenElementsCheckbox.on("change",this.toggleContentElementVisibility)},b.prototype.toggleContentElementVisibility=function(a){var b=d(a.currentTarget),c=d(g.hiddenElements),f=d("<span />",{class:"checkbox-spinner fa fa-circle-o-notch fa-spin"});b.hide().after(f),b.prop("checked")?c.slideDown():c.slideUp(),e.set("moduleData.web_layout.tt_content_showHidden",String(b.prop("checked"))).done(function(){f.remove(),b.show()})},b.prototype.editPageTitle=function(){var a=this,b=d('<form><div class="form-group"><div class="input-group input-group-lg"><input class="form-control"><span class="input-group-btn"><button class="btn btn-default" type="button" data-action="submit"><span class="t3-icon fa fa-floppy-o"></span></button> </span><span class="input-group-btn"><button class="btn btn-default" type="button" data-action="cancel"><span class="t3-icon fa fa-times"></span></button> </span></div></div></form>'),e=b.find("input");b.find("[data-action=cancel]").on("click",function(){b.replaceWith(a.$pageTitle),a.initializePageTitleRenaming()}),b.find("[data-action=submit]").on("click",function(){var c=d.trim(e.val());""!==c&&a.$pageTitle.text()!==c?a.saveChanges(e):b.find("[data-action=cancel]").trigger("click")}),e.parents("form").on("submit",function(a){return a.preventDefault(),!1});var f=this.$pageTitle;f.children().last().remove(),f.replaceWith(b),e.val(f.text()).focus(),e.on("keyup",function(a){switch(a.which){case c.KeyTypesEnum.ENTER:b.find('[data-action="submit"]').trigger("click");break;case c.KeyTypesEnum.ESCAPE:b.find('[data-action="cancel"]').trigger("click")}})},b.prototype.saveChanges=function(b){var c=this,d=b.parents("form");d.find("button").addClass("disabled"),b.attr("disabled","disabled");var e,f={};e=this.pageOverlayId>0?this.pageOverlayId:this.pageId,f.data={},f.data.pages={},f.data.pages[e]={title:b.val()},a(["TYPO3/CMS/Backend/AjaxDataHandler"],function(a){a.process(f).done(function(){d.find("[data-action=cancel]").trigger("click"),c.$pageTitle.text(b.val()),c.initializePageTitleRenaming(),top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree()}).fail(function(){d.find("[data-action=cancel]").trigger("click")})})},b.prototype.initializeNewContentElementWizard=function(){d(g.newButton).click(function(a){var b=d(a.currentTarget);f.wizard(b.data("url"),b.data("title"))})},b}();return new h});
\ No newline at end of file
+define(["require","exports","./Enum/KeyTypes","jquery","./Storage/Persistent","./Wizard/NewContentElement"],function(t,e,n,i,a,o){"use strict";var s,c;return(c=s||(s={})).pageTitle=".t3js-title-inlineedit",c.hiddenElements=".t3js-hidden-record",c.newButton=".t3js-toggle-new-content-element-wizard",new(function(){function e(){var t=this;this.pageId=0,this.pageOverlayId=0,this.$pageTitle=null,this.$showHiddenElementsCheckbox=null,i(function(){t.initializeElements(),t.initializeEvents(),t.initializeNewContentElementWizard(),t.initializePageTitleRenaming()})}return e.prototype.setPageId=function(t){this.pageId=t},e.prototype.setLanguageOverlayId=function(t){this.pageOverlayId=t},e.prototype.initializePageTitleRenaming=function(){var t=this;if(i.isReady){if(!(this.pageId<=0)){var e=i('<a class="hidden" href="#" data-action="edit"><span class="t3-icon fa fa-pencil"></span></a>');e.on("click",function(e){e.preventDefault(),t.editPageTitle()}),this.$pageTitle.on("dblclick",function(){t.editPageTitle()}).on("mouseover",function(){e.removeClass("hidden")}).on("mouseout",function(){e.addClass("hidden")}).append(e)}}else i(function(){t.initializePageTitleRenaming()})},e.prototype.initializeElements=function(){this.$pageTitle=i(s.pageTitle+":first"),this.$showHiddenElementsCheckbox=i("#checkTt_content_showHidden")},e.prototype.initializeEvents=function(){this.$showHiddenElementsCheckbox.on("change",this.toggleContentElementVisibility)},e.prototype.toggleContentElementVisibility=function(t){var e=i(t.currentTarget),n=i(s.hiddenElements),o=i("<span />",{class:"checkbox-spinner fa fa-circle-o-notch fa-spin"});e.hide().after(o),e.prop("checked")?n.slideDown():n.slideUp(),a.set("moduleData.web_layout.tt_content_showHidden",String(e.prop("checked"))).done(function(){o.remove(),e.show()})},e.prototype.editPageTitle=function(){var t=this,e=i('<form><div class="form-group"><div class="input-group input-group-lg"><input class="form-control"><span class="input-group-btn"><button class="btn btn-default" type="button" data-action="submit"><span class="t3-icon fa fa-floppy-o"></span></button> </span><span class="input-group-btn"><button class="btn btn-default" type="button" data-action="cancel"><span class="t3-icon fa fa-times"></span></button> </span></div></div></form>'),a=e.find("input");e.find("[data-action=cancel]").on("click",function(){e.replaceWith(t.$pageTitle),t.initializePageTitleRenaming()}),e.find("[data-action=submit]").on("click",function(){var n=i.trim(a.val());""!==n&&t.$pageTitle.text()!==n?t.saveChanges(a):e.find("[data-action=cancel]").trigger("click")}),a.parents("form").on("submit",function(t){return t.preventDefault(),!1});var o=this.$pageTitle;o.children().last().remove(),o.replaceWith(e),a.val(o.text()).focus(),a.on("keyup",function(t){switch(t.which){case n.KeyTypesEnum.ENTER:e.find('[data-action="submit"]').trigger("click");break;case n.KeyTypesEnum.ESCAPE:e.find('[data-action="cancel"]').trigger("click")}})},e.prototype.saveChanges=function(e){var n=this,i=e.parents("form");i.find("button").addClass("disabled"),e.attr("disabled","disabled");var a,o={};a=this.pageOverlayId>0?this.pageOverlayId:this.pageId,o.data={},o.data.pages={},o.data.pages[a]={title:e.val()},t(["TYPO3/CMS/Backend/AjaxDataHandler"],function(t){t.process(o).done(function(){i.find("[data-action=cancel]").trigger("click"),n.$pageTitle.text(e.val()),n.initializePageTitleRenaming(),top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree()}).fail(function(){i.find("[data-action=cancel]").trigger("click")})})},e.prototype.initializeNewContentElementWizard=function(){i(s.newButton).click(function(t){var e=i(t.currentTarget);o.wizard(e.data("url"),e.data("title"))})},e}())});
\ No newline at end of file
index de328e4..baf3e74 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","bootstrap"],function(a,b,c){"use strict";var d=function(){function a(){this.DEFAULT_SELECTOR='[data-toggle="popover"]'}return a.prototype.initialize=function(a){a=a||this.DEFAULT_SELECTOR,c(a).popover()},a.prototype.popover=function(a){a.popover()},a.prototype.setOptions=function(a,b){b=b||{};var c=b.title||a.data("title")||"",d=b.content||a.data("content")||"";a.attr("data-original-title",c).attr("data-content",d).attr("data-placement","auto").popover(b)},a.prototype.setOption=function(a,b,c){a.data("bs.popover").options[b]=c},a.prototype.show=function(a){a.popover("show")},a.prototype.hide=function(a){a.popover("hide")},a.prototype.destroy=function(a){a.popover("destroy")},a.prototype.toggle=function(a){a.popover("toggle")},a}(),e=new d;return e.initialize(),TYPO3.Popover=e,e});
\ No newline at end of file
+define(["require","exports","jquery","bootstrap"],function(t,o,e){"use strict";var p=new(function(){function t(){this.DEFAULT_SELECTOR='[data-toggle="popover"]'}return t.prototype.initialize=function(t){t=t||this.DEFAULT_SELECTOR,e(t).popover()},t.prototype.popover=function(t){t.popover()},t.prototype.setOptions=function(t,o){var e=(o=o||{}).title||t.data("title")||"",p=o.content||t.data("content")||"";t.attr("data-original-title",e).attr("data-content",p).attr("data-placement","auto").popover(o)},t.prototype.setOption=function(t,o,e){t.data("bs.popover").options[o]=e},t.prototype.show=function(t){t.popover("show")},t.prototype.hide=function(t){t.popover("hide")},t.prototype.destroy=function(t){t.popover("destroy")},t.prototype.toggle=function(t){t.popover("toggle")},t}());return p.initialize(),TYPO3.Popover=p,p});
\ No newline at end of file
index 53da347..4387687 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity","jquery","./Modal"],function(a,b,c,d,e){"use strict";var f=function(){function a(){this.initialize()}return a.prototype.initialize=function(){d(".t3js-submit-file-rename").on("click",this.checkForDuplicate)},a.prototype.checkForDuplicate=function(a){a.preventDefault();var b=d("#"+d(a.currentTarget).attr("form")),f=b.find('input[name="data[rename][0][target]"]'),g=b.find('input[name="data[rename][0][conflictMode]"]'),h=TYPO3.settings.ajaxUrls.file_exists;d.ajax({cache:!1,data:{fileName:f.val(),fileTarget:b.find('input[name="data[rename][0][destination]"]').val()},success:function(a){var d="undefined"!=typeof a.uid,h=f.data("original"),i=f.val();if(d&&h!==i){var j=TYPO3.lang["file_rename.exists.description"].replace("{0}",h).replace("{1}",i),k=e.confirm(TYPO3.lang["file_rename.exists.title"],j,c.SeverityEnum.warning,[{active:!0,btnClass:"btn-default",name:"cancel",text:TYPO3.lang["file_rename.actions.cancel"]},{btnClass:"btn-primary",name:"rename",text:TYPO3.lang["file_rename.actions.rename"]},{btnClass:"btn-default",name:"replace",text:TYPO3.lang["file_rename.actions.override"]}]);k.on("button.clicked",function(a){"cancel"!==a.target.name&&(g.val(a.target.name),b.submit()),e.dismiss()})}else b.submit()},url:h})},a}();return new f});
\ No newline at end of file
+define(["require","exports","./Enum/Severity","jquery","./Modal"],function(e,t,a,n,i){"use strict";return new(function(){function e(){this.initialize()}return e.prototype.initialize=function(){n(".t3js-submit-file-rename").on("click",this.checkForDuplicate)},e.prototype.checkForDuplicate=function(e){e.preventDefault();var t=n("#"+n(e.currentTarget).attr("form")),r=t.find('input[name="data[rename][0][target]"]'),l=t.find('input[name="data[rename][0][conflictMode]"]'),c=TYPO3.settings.ajaxUrls.file_exists;n.ajax({cache:!1,data:{fileName:r.val(),fileTarget:t.find('input[name="data[rename][0][destination]"]').val()},success:function(e){var n=void 0!==e.uid,c=r.data("original"),s=r.val();if(n&&c!==s){var o=TYPO3.lang["file_rename.exists.description"].replace("{0}",c).replace("{1}",s);i.confirm(TYPO3.lang["file_rename.exists.title"],o,a.SeverityEnum.warning,[{active:!0,btnClass:"btn-default",name:"cancel",text:TYPO3.lang["file_rename.actions.cancel"]},{btnClass:"btn-primary",name:"rename",text:TYPO3.lang["file_rename.actions.rename"]},{btnClass:"btn-default",name:"replace",text:TYPO3.lang["file_rename.actions.override"]}]).on("button.clicked",function(e){"cancel"!==e.target.name&&(l.val(e.target.name),t.submit()),i.dismiss()})}else t.submit()},url:c})},e}())});
\ No newline at end of file
index 2e92483..06b39f9 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity"],function(a,b,c){"use strict";var d,e=function(){function a(){}return a.getCssClass=function(a){var b;switch(a){case c.SeverityEnum.notice:b="notice";break;case c.SeverityEnum.ok:b="success";break;case c.SeverityEnum.warning:b="warning";break;case c.SeverityEnum.error:b="danger";break;case c.SeverityEnum.info:default:b="info"}return b},a.notice=c.SeverityEnum.notice,a.info=c.SeverityEnum.info,a.ok=c.SeverityEnum.ok,a.warning=c.SeverityEnum.warning,a.error=c.SeverityEnum.error,a}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Severity&&(d=window.opener.TYPO3.Severity),parent&&parent.window.TYPO3&&parent.window.TYPO3.Severity&&(d=parent.window.TYPO3.Severity),top&&top.TYPO3&&top.TYPO3.Severity&&(d=top.TYPO3.Severity)}catch(a){}return d||(d=e,"undefined"!=typeof TYPO3&&(TYPO3.Severity=d)),d});
\ No newline at end of file
+define(["require","exports","./Enum/Severity"],function(e,n,r){"use strict";var i,t=function(){function e(){}return e.getCssClass=function(e){var n;switch(e){case r.SeverityEnum.notice:n="notice";break;case r.SeverityEnum.ok:n="success";break;case r.SeverityEnum.warning:n="warning";break;case r.SeverityEnum.error:n="danger";break;case r.SeverityEnum.info:default:n="info"}return n},e.notice=r.SeverityEnum.notice,e.info=r.SeverityEnum.info,e.ok=r.SeverityEnum.ok,e.warning=r.SeverityEnum.warning,e.error=r.SeverityEnum.error,e}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Severity&&(i=window.opener.TYPO3.Severity),parent&&parent.window.TYPO3&&parent.window.TYPO3.Severity&&(i=parent.window.TYPO3.Severity),top&&top.TYPO3&&top.TYPO3.Severity&&(i=top.TYPO3.Severity)}catch(e){}return i||(i=t,"undefined"!=typeof TYPO3&&(TYPO3.Severity=i)),i});
\ No newline at end of file
index eed1873..52bccd8 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Icons"],function(a,b,c,d){"use strict";var e=function(){function a(){var a=this;this.preSubmitCallbacks=[],c(function(){a.initializeSaveHandling()})}return a.prototype.addPreSubmitCallback=function(a){if("function"!=typeof a)throw"callback must be a function.";this.preSubmitCallbacks.push(a)},a.prototype.initializeSaveHandling=function(){var a=this,b=!1,e=["button[form]",'button[name^="_save"]','a[data-name^="_save"]','button[name="CMD"][value^="save"]','a[data-name="CMD"][data-value^="save"]','button[name^="_translation_save"]','a[data-name^="_translation_save"]','button[name="CMD"][value^="_translation_save"]','a[data-name="CMD"][data-value^="_translation_save"]'].join(",");c(".t3js-module-docheader").on("click",e,function(e){if(!b){b=!0;for(var f=c(e.currentTarget),g=f.attr("form")||f.attr("data-form")||null,h=g?c("#"+g):f.closest("form"),i=f.data("name")||e.currentTarget.getAttribute("name"),j=f.data("value")||e.currentTarget.getAttribute("value"),k=c("<input />").attr("type","hidden").attr("name",i).attr("value",j),l=0;l<a.preSubmitCallbacks.length;++l)if(a.preSubmitCallbacks[l](e),e.isPropagationStopped())return b=!1,!1;h.append(k),h.on("submit",function(){if(h.find(".has-error").length>0)return b=!1,!1;var a,c=f.closest(".t3js-splitbutton");return c.length>0?(c.find("button").prop("disabled",!0),a=c.children().first()):(f.prop("disabled",!0),a=f),d.getIcon("spinner-circle-dark",d.sizes.small).done(function(b){a.find(".t3js-icon").replaceWith(b)}),!0}),"A"!==e.currentTarget.tagName&&!f.attr("form")||e.isDefaultPrevented()||(h.submit(),e.preventDefault())}return!0})},a}();return new e});
\ No newline at end of file
+define(["require","exports","jquery","./Icons"],function(t,a,e,n){"use strict";return new(function(){function t(){var t=this;this.preSubmitCallbacks=[],e(function(){t.initializeSaveHandling()})}return t.prototype.addPreSubmitCallback=function(t){if("function"!=typeof t)throw"callback must be a function.";this.preSubmitCallbacks.push(t)},t.prototype.initializeSaveHandling=function(){var t=this,a=!1,r=["button[form]",'button[name^="_save"]','a[data-name^="_save"]','button[name="CMD"][value^="save"]','a[data-name="CMD"][data-value^="save"]','button[name^="_translation_save"]','a[data-name^="_translation_save"]','button[name="CMD"][value^="_translation_save"]','a[data-name="CMD"][data-value^="_translation_save"]'].join(",");e(".t3js-module-docheader").on("click",r,function(r){if(!a){a=!0;for(var i=e(r.currentTarget),u=i.attr("form")||i.attr("data-form")||null,o=u?e("#"+u):i.closest("form"),l=i.data("name")||r.currentTarget.getAttribute("name"),s=i.data("value")||r.currentTarget.getAttribute("value"),c=e("<input />").attr("type","hidden").attr("name",l).attr("value",s),d=0;d<t.preSubmitCallbacks.length;++d)if(t.preSubmitCallbacks[d](r),r.isPropagationStopped())return a=!1,!1;o.append(c),o.on("submit",function(){if(o.find(".has-error").length>0)return a=!1,!1;var t,e=i.closest(".t3js-splitbutton");return e.length>0?(e.find("button").prop("disabled",!0),t=e.children().first()):(i.prop("disabled",!0),t=i),n.getIcon("spinner-circle-dark",n.sizes.small).done(function(a){t.find(".t3js-icon").replaceWith(a)}),!0}),"A"!==r.currentTarget.tagName&&!i.attr("form")||r.isDefaultPrevented()||(o.submit(),r.preventDefault())}return!0})},t}())});
\ No newline at end of file
index 80174ed..52c4a9e 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Storage/Client","./Storage/Persistent"],function(a,b,c,d){"use strict";var e,f=function(){function a(){var a=this;this.logDeprecated=function(a,b){console&&console.warn("top.TYPO3.Storage."+a+"."+b+"() is marked as deprecated since TYPO3 v9 and will be removed in TYPO3 v10.")},this.Client={clear:function(){a.logDeprecated("Client","clear"),c.clear()},get:function(b){return a.logDeprecated("Client","get"),c.get(b)},isset:function(b){return a.logDeprecated("Client","isset"),c.isset(b)},set:function(b,d){return a.logDeprecated("Client","set"),c.set(b,d)},unset:function(b){return a.logDeprecated("Client","unset"),c.unset(b)}},this.Persistent={addToList:function(b,c){return a.logDeprecated("Persistent","addToList"),d.addToList(b,c)},clear:function(){a.logDeprecated("Persistent","clear"),d.clear()},get:function(b){return a.logDeprecated("Persistent","get"),d.get(b)},isset:function(b){return a.logDeprecated("Persistent","isset"),d.isset(b)},load:function(b){return a.logDeprecated("Persistent","load"),d.load(b)},removeFromList:function(b,c){return a.logDeprecated("Persistent","removeFromList"),d.removeFromList(b,c)},set:function(b,c){return a.logDeprecated("Persistent","set"),d.set(b,c)},unset:function(b){return a.logDeprecated("Persistent","unset"),d.unset(b)}}}return a}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Storage&&(e=window.opener.TYPO3.Storage),parent&&parent.window.TYPO3&&parent.window.TYPO3.Storage&&(e=parent.window.TYPO3.Storage),top&&top.TYPO3.Storage&&(e=top.TYPO3.Storage)}catch(a){}return e||(e=new f),TYPO3.Storage=e,e});
\ No newline at end of file
+define(["require","exports","./Storage/Client","./Storage/Persistent"],function(e,t,n,r){"use strict";var o,i=function(){var e=this;this.logDeprecated=function(e,t){console&&console.warn("top.TYPO3.Storage."+e+"."+t+"() is marked as deprecated since TYPO3 v9 and will be removed in TYPO3 v10.")},this.Client={clear:function(){e.logDeprecated("Client","clear"),n.clear()},get:function(t){return e.logDeprecated("Client","get"),n.get(t)},isset:function(t){return e.logDeprecated("Client","isset"),n.isset(t)},set:function(t,r){return e.logDeprecated("Client","set"),n.set(t,r)},unset:function(t){return e.logDeprecated("Client","unset"),n.unset(t)}},this.Persistent={addToList:function(t,n){return e.logDeprecated("Persistent","addToList"),r.addToList(t,n)},clear:function(){e.logDeprecated("Persistent","clear"),r.clear()},get:function(t){return e.logDeprecated("Persistent","get"),r.get(t)},isset:function(t){return e.logDeprecated("Persistent","isset"),r.isset(t)},load:function(t){return e.logDeprecated("Persistent","load"),r.load(t)},removeFromList:function(t,n){return e.logDeprecated("Persistent","removeFromList"),r.removeFromList(t,n)},set:function(t,n){return e.logDeprecated("Persistent","set"),r.set(t,n)},unset:function(t){return e.logDeprecated("Persistent","unset"),r.unset(t)}}};try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.Storage&&(o=window.opener.TYPO3.Storage),parent&&parent.window.TYPO3&&parent.window.TYPO3.Storage&&(o=parent.window.TYPO3.Storage),top&&top.TYPO3.Storage&&(o=top.TYPO3.Storage)}catch(e){}return o||(o=new i),TYPO3.Storage=o,o});
\ No newline at end of file
index a538eb0..bc10c9e 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";var c=function(){function a(){var a=this;this.get=function(a){return localStorage.getItem("t3-"+a)},this.set=function(a,b){localStorage.setItem("t3-"+a,b)},this.unset=function(a){localStorage.removeItem("t3-"+a)},this.clear=function(){localStorage.clear()},this.isset=function(b){var c=a.get(b);return"undefined"!=typeof c&&null!==c}}return a}();return new c});
\ No newline at end of file
+define(["require","exports"],function(t,e){"use strict";return new function(){var t=this;this.get=function(t){return localStorage.getItem("t3-"+t)},this.set=function(t,e){localStorage.setItem("t3-"+t,e)},this.unset=function(t){localStorage.removeItem("t3-"+t)},this.clear=function(){localStorage.clear()},this.isset=function(e){var n=t.get(e);return null!=n}}});
\ No newline at end of file
index 55b6df6..0206979 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";var d=function(){function a(){var a=this;this.data=!1,this.get=function(b){var c=a;if(a.data===!1){var d;return a.loadFromServer().done(function(){d=c.getRecursiveDataByDeepKey(c.data,b.split("."))}),d}return a.getRecursiveDataByDeepKey(a.data,b.split("."))},this.set=function(b,c){return a.data!==!1&&(a.data=a.setRecursiveDataByDeepKey(a.data,b.split("."),c)),a.storeOnServer(b,c)},this.addToList=function(b,d){var e=a;return c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"addToList",key:b,value:d},method:"post"}).done(function(a){e.data=a})},this.removeFromList=function(b,d){var e=a;return c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"removeFromList",key:b,value:d},method:"post"}).done(function(a){e.data=a})},this.unset=function(b){var d=a;return c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"unset",key:b},method:"post"}).done(function(a){d.data=a})},this.clear=function(){c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"clear"}}),a.data=!1},this.isset=function(b){var c=a.get(b);return"undefined"!=typeof c&&null!==c},this.load=function(b){a.data=b},this.loadFromServer=function(){var b=a;return c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{async:!1,data:{action:"getAll"}}).done(function(a){b.data=a})},this.storeOnServer=function(b,d){var e=a;return c.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"set",key:b,value:d},method:"post"}).done(function(a){e.data=a})},this.getRecursiveDataByDeepKey=function(b,c){if(1===c.length)return(b||{})[c[0]];var d=c.shift();return a.getRecursiveDataByDeepKey(b[d]||{},c)},this.setRecursiveDataByDeepKey=function(b,c,d){if(1===c.length)b=b||{},b[c[0]]=d;else{var e=c.shift();b[e]=a.setRecursiveDataByDeepKey(b[e]||{},c,d)}return b}}return a}();return new d});
\ No newline at end of file
+define(["require","exports","jquery"],function(t,e,a){"use strict";return new function(){var t=this;this.data=!1,this.get=function(e){var a,s=t;return!1===t.data?(t.loadFromServer().done(function(){a=s.getRecursiveDataByDeepKey(s.data,e.split("."))}),a):t.getRecursiveDataByDeepKey(t.data,e.split("."))},this.set=function(e,a){return!1!==t.data&&(t.data=t.setRecursiveDataByDeepKey(t.data,e.split("."),a)),t.storeOnServer(e,a)},this.addToList=function(e,s){var n=t;return a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"addToList",key:e,value:s},method:"post"}).done(function(t){n.data=t})},this.removeFromList=function(e,s){var n=t;return a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"removeFromList",key:e,value:s},method:"post"}).done(function(t){n.data=t})},this.unset=function(e){var s=t;return a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"unset",key:e},method:"post"}).done(function(t){s.data=t})},this.clear=function(){a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"clear"}}),t.data=!1},this.isset=function(e){var a=t.get(e);return null!=a},this.load=function(e){t.data=e},this.loadFromServer=function(){var e=t;return a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{async:!1,data:{action:"getAll"}}).done(function(t){e.data=t})},this.storeOnServer=function(e,s){var n=t;return a.ajax(TYPO3.settings.ajaxUrls.usersettings_process,{data:{action:"set",key:e,value:s},method:"post"}).done(function(t){n.data=t})},this.getRecursiveDataByDeepKey=function(e,a){if(1===a.length)return(e||{})[a[0]];var s=a.shift();return t.getRecursiveDataByDeepKey(e[s]||{},a)},this.setRecursiveDataByDeepKey=function(e,a,s){if(1===a.length)(e=e||{})[a[0]]=s;else{var n=a.shift();e[n]=t.setRecursiveDataByDeepKey(e[n]||{},a,s)}return e}}});
\ No newline at end of file
index b364d69..cd05935 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Storage/Client","bootstrap"],function(a,b,c,d){"use strict";var e=function(){function a(){this.cacheTimeInSeconds=1800,this.storeLastActiveTab=!0,this.storage=d;var a=this;c(".t3js-tabs").each(function(){var b=c(this);a.storeLastActiveTab=1===b.data("storeLastTab");var d=a.receiveActiveTab(b.attr("id"));d&&b.find('a[href="'+d+'"]').tab("show"),b.on("show.bs.tab",function(b){if(a.storeLastActiveTab){var c=b.currentTarget.id,d=b.target.hash;a.storeActiveTab(c,d)}})})}return a.getTimestamp=function(){return Math.round((new Date).getTime()/1e3)},a.prototype.receiveActiveTab=function(b){var c=this.storage.get(b)||"",d=this.storage.get(b+".expire")||0;return d>a.getTimestamp()?c:""},a.prototype.storeActiveTab=function(b,c){this.storage.set(b,c),this.storage.set(b+".expire",a.getTimestamp()+this.cacheTimeInSeconds)},a}(),f=new e;return f});
\ No newline at end of file
+define(["require","exports","jquery","./Storage/Client","bootstrap"],function(t,e,r,i){"use strict";return new(function(){function t(){this.cacheTimeInSeconds=1800,this.storeLastActiveTab=!0,this.storage=i;var t=this;r(".t3js-tabs").each(function(){var e=r(this);t.storeLastActiveTab=1===e.data("storeLastTab");var i=t.receiveActiveTab(e.attr("id"));i&&e.find('a[href="'+i+'"]').tab("show"),e.on("show.bs.tab",function(e){if(t.storeLastActiveTab){var r=e.currentTarget.id,i=e.target.hash;t.storeActiveTab(r,i)}})})}return t.getTimestamp=function(){return Math.round((new Date).getTime()/1e3)},t.prototype.receiveActiveTab=function(e){var r=this.storage.get(e)||"";return(this.storage.get(e+".expire")||0)>t.getTimestamp()?r:""},t.prototype.storeActiveTab=function(e,r){this.storage.set(e,r),this.storage.set(e+".expire",t.getTimestamp()+this.cacheTimeInSeconds)},t}())});
\ No newline at end of file
index 8a52727..8bb98d2 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./DocumentHeader","TYPO3/CMS/Backend/jquery.clearable"],function(a,b,c,d){"use strict";Object.defineProperty(b,"__esModule",{value:!0});(function(){function a(){var a=this;c(function(){a.initialize()})}return a.prototype.initialize=function(){var a=this,b=c("#db_list-searchbox-toolbar");c(".t3js-toggle-search-toolbox").on("click",function(){b.toggle(),d.reposition(),b.is(":visible")&&c("#search_field").focus()});var e=c("#search_field"),f=""!==e.val();e.clearable({onClear:function(){f&&c(a).closest("form").submit()}})},a})()});
\ No newline at end of file
+define(["require","exports","jquery","./DocumentHeader","TYPO3/CMS/Backend/jquery.clearable"],function(e,i,o,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});!function(){function e(){var e=this;o(function(){e.initialize()})}e.prototype.initialize=function(){var e=this,i=o("#db_list-searchbox-toolbar");o(".t3js-toggle-search-toolbox").on("click",function(){i.toggle(),t.reposition(),i.is(":visible")&&o("#search_field").focus()});var n=o("#search_field"),r=""!==n.val();n.clearable({onClear:function(){r&&o(e).closest("form").submit()}})}}()});
\ No newline at end of file
index defbb61..1ff9c06 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery"],function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function b(){}return b.initialize=function(){b.initializeEvents()},b.initializeEvents=function(){c(".t3js-toolbar-item").parent().on("hidden.bs.dropdown",function(){c(".scaffold").removeClass("scaffold-toolbar-expanded").removeClass("scaffold-search-expanded")}),c(document).on("click",".toolbar-item [data-modulename]",function(b){b.preventDefault(),a(["TYPO3/CMS/Backend/ModuleMenu"],function(){var a=c(b.target).closest("[data-modulename]").data("modulename");TYPO3.ModuleMenu.App.showModule(a)})}),c(document).on("click",".t3js-topbar-button-toolbar",function(){c(".scaffold").removeClass("scaffold-modulemenu-expanded").removeClass("scaffold-search-expanded").toggleClass("scaffold-toolbar-expanded")}),c(document).on("click",".t3js-topbar-button-search",function(){c(".scaffold").removeClass("scaffold-modulemenu-expanded").removeClass("scaffold-toolbar-expanded").toggleClass("scaffold-search-expanded")})},b}();c(function(){d.initialize()})});
\ No newline at end of file
+define(["require","exports","jquery"],function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=function(){function o(){}return o.initialize=function(){o.initializeEvents()},o.initializeEvents=function(){n(".t3js-toolbar-item").parent().on("hidden.bs.dropdown",function(){n(".scaffold").removeClass("scaffold-toolbar-expanded").removeClass("scaffold-search-expanded")}),n(document).on("click",".toolbar-item [data-modulename]",function(o){o.preventDefault(),e(["TYPO3/CMS/Backend/ModuleMenu"],function(){var e=n(o.target).closest("[data-modulename]").data("modulename");TYPO3.ModuleMenu.App.showModule(e)})}),n(document).on("click",".t3js-topbar-button-toolbar",function(){n(".scaffold").removeClass("scaffold-modulemenu-expanded").removeClass("scaffold-search-expanded").toggleClass("scaffold-toolbar-expanded")}),n(document).on("click",".t3js-topbar-button-search",function(){n(".scaffold").removeClass("scaffold-modulemenu-expanded").removeClass("scaffold-toolbar-expanded").toggleClass("scaffold-search-expanded")})},o}();n(function(){a.initialize()})});
\ No newline at end of file
index 1623ecb..5179e6f 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Login"],function(a,b,c,d){"use strict";var e=function(){function a(){var b=this;this.resetPassword=function(){var a=c(b.options.passwordField);a.val()&&(c(d.options.useridentField).val(a.val()),a.val(""))},this.showCapsLockWarning=function(b){c(b.target).parent().parent().find(".t3js-login-alert-capslock").toggleClass("hidden",!a.isCapslockEnabled(b))},this.options={passwordField:".t3js-login-password-field",usernameField:".t3js-login-username-field"},d.options.submitHandler=this.resetPassword;var e=c(this.options.usernameField),f=c(this.options.passwordField);e.on("keypress",this.showCapsLockWarning),f.on("keypress",this.showCapsLockWarning);try{parent.opener&&parent.opener.TYPO3&&parent.opener.TYPO3.configuration&&parent.opener.TYPO3.configuration.username&&e.val(parent.opener.TYPO3.configuration.username)}catch(a){}""===e.val()?e.focus():f.focus()}return a.isCapslockEnabled=function(a){var b=a?a:window.event;if(!b)return!1;var c=-1;b.which?c=b.which:b.keyCode&&(c=b.keyCode);var d=!1;return b.shiftKey?d=b.shiftKey:b.modifiers&&(d=!!(4&b.modifiers)),c>=65&&c<=90&&!d||c>=97&&c<=122&&d},a}();return new e});
\ No newline at end of file
+define(["require","exports","jquery","./Login"],function(e,n,s,i){"use strict";return new(function(){function e(){var n=this;this.resetPassword=function(){var e=s(n.options.passwordField);e.val()&&(s(i.options.useridentField).val(e.val()),e.val(""))},this.showCapsLockWarning=function(n){s(n.target).parent().parent().find(".t3js-login-alert-capslock").toggleClass("hidden",!e.isCapslockEnabled(n))},this.options={passwordField:".t3js-login-password-field",usernameField:".t3js-login-username-field"},i.options.submitHandler=this.resetPassword;var o=s(this.options.usernameField),r=s(this.options.passwordField);o.on("keypress",this.showCapsLockWarning),r.on("keypress",this.showCapsLockWarning);try{parent.opener&&parent.opener.TYPO3&&parent.opener.TYPO3.configuration&&parent.opener.TYPO3.configuration.username&&o.val(parent.opener.TYPO3.configuration.username)}catch(e){}""===o.val()?o.focus():r.focus()}return e.isCapslockEnabled=function(e){var n=e||window.event;if(!n)return!1;var s=-1;n.which?s=n.which:n.keyCode&&(s=n.keyCode);var i=!1;return n.shiftKey?i=n.shiftKey:n.modifiers&&(i=!!(4&n.modifiers)),s>=65&&s<=90&&!i||s>=97&&s<=122&&i},e}())});
\ No newline at end of file
index 007af16..c244b9a 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(a,b){"use strict";var c=function(){function a(){this.isNumber=function(a){return!isNaN(parseFloat(a.toString()))&&isFinite(a)},this.getParameterFromUrl=function(a,b){if("function"!=typeof a.split)return"";var c=a.split("?"),d="";if(c.length>=2)for(var e=c.join("?"),f=encodeURIComponent(b)+"=",g=e.split(/[&;]/g),h=g.length;h-- >0;)if(g[h].lastIndexOf(f,0)!==-1){d=g[h].split("=")[1];break}return d},this.updateQueryStringParameter=function(a,b,c){var d=new RegExp("([?&])"+b+"=.*?(&|$)","i"),e=a.indexOf("?")!==-1?"&":"?";return a.match(d)?a.replace(d,"$1"+b+"="+c+"$2"):a+e+b+"="+c}}return a}(),d=new c;return TYPO3.Utility=d,d});
\ No newline at end of file
+define(["require","exports"],function(t,e){"use strict";var r=new function(){this.isNumber=function(t){return!isNaN(parseFloat(t.toString()))&&isFinite(t)},this.getParameterFromUrl=function(t,e){if("function"!=typeof t.split)return"";var r=t.split("?"),i="";if(r.length>=2)for(var n=r.join("?"),a=encodeURIComponent(e)+"=",o=n.split(/[&;]/g),u=o.length;u-- >0;)if(-1!==o[u].lastIndexOf(a,0)){i=o[u].split("=")[1];break}return i},this.updateQueryStringParameter=function(t,e,r){var i=new RegExp("([?&])"+e+"=.*?(&|$)","i"),n=-1!==t.indexOf("?")?"&":"?";return t.match(i)?t.replace(i,"$1"+e+"="+r+"$2"):t+n+e+"="+r}};return TYPO3.Utility=r,r});
\ No newline at end of file
index 3ddab3c..b7bc25a 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","../Enum/Severity","../Modal"],function(a,b,c,d){"use strict";var e=function(){function a(){}return a.wizard=function(a,b){d.advanced({callback:function(a){a.find(".t3js-modal-body").addClass("t3-new-content-element-wizard-window")},content:a,severity:c.SeverityEnum.notice,size:d.sizes.medium,title:b,type:d.types.ajax})},a}();return e});
\ No newline at end of file
+define(["require","exports","../Enum/Severity","../Modal"],function(e,n,t,i){"use strict";return function(){function e(){}return e.wizard=function(e,n){i.advanced({callback:function(e){e.find(".t3js-modal-body").addClass("t3-new-content-element-wizard-window")},content:e,severity:t.SeverityEnum.notice,size:i.sizes.medium,title:n,type:i.types.ajax})},e}()});
\ No newline at end of file
index 474b26c..17982e9 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","TYPO3/CMS/Backend/BackendException"],function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),describe("TYPO3/CMS/Backend/BackendException",function(){it("sets exception message",function(){var a=new c.BackendException("some message");expect(a.message).toBe("some message")}),it("sets exception code",function(){var a=new c.BackendException("",12345);expect(a.code).toBe(12345)})})});
\ No newline at end of file
+define(["require","exports","TYPO3/CMS/Backend/BackendException"],function(e,n,c){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),describe("TYPO3/CMS/Backend/BackendException",function(){it("sets exception message",function(){var e=new c.BackendException("some message");expect(e.message).toBe("some message")}),it("sets exception code",function(){var e=new c.BackendException("",12345);expect(e.code).toBe(12345)})})});
\ No newline at end of file
index f7381a9..e30ba2b 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","TYPO3/CMS/Backend/GridEditor"],function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),describe("TYPO3/CMS/Backend/GridEditorTest:",function(){describe("tests for stripMarkup",function(){it("works with string which contains html markup only",function(){expect(c.GridEditor.stripMarkup("<b>foo</b>")).toBe("")}),it("works with string which contains html markup and normal text",function(){expect(c.GridEditor.stripMarkup("<b>foo</b> bar")).toBe(" bar")})})})});
\ No newline at end of file
+define(["require","exports","TYPO3/CMS/Backend/GridEditor"],function(t,i,r){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),describe("TYPO3/CMS/Backend/GridEditorTest:",function(){describe("tests for stripMarkup",function(){it("works with string which contains html markup only",function(){expect(r.GridEditor.stripMarkup("<b>foo</b>")).toBe("")}),it("works with string which contains html markup and normal text",function(){expect(r.GridEditor.stripMarkup("<b>foo</b> bar")).toBe(" bar")})})})});
\ No newline at end of file
index 724db76..168a221 100644 (file)
@@ -1,2 +1 @@
-!function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)module.exports=a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},w={},x=function(){return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone},y=function(a){var c;return c=void 0===a||null===a?b():b.isDate(a)||b.isMoment(a)?b(a):x()?b.tz(a,j,d.useStrict,d.timeZone):b(a,j,d.useStrict),x()&&c.tz(d.timeZone),c},z=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return i.indexOf("Y")!==-1;case"M":return i.indexOf("M")!==-1;case"d":return i.toLowerCase().indexOf("d")!==-1;case"h":case"H":return i.toLowerCase().indexOf("h")!==-1;case"m":return i.indexOf("m")!==-1;case"s":return i.indexOf("s")!==-1;default:return!1}},A=function(){return z("h")||z("m")||z("s")},B=function(){return z("y")||z("M")||z("d")},C=function(){var b=a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action","previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("<th>").addClass("next").attr("data-action","next").append(a("<span>").addClass(d.icons.next)))),c=a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan",d.calendarWeeks?"8":"7")));return[a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))),a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))]},D=function(){var b=a("<tr>"),c=a("<tr>"),e=a("<tr>");return z("h")&&(b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("<span>").addClass(d.icons.down))))),z("m")&&(z("h")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("<span>").addClass(d.icons.down))))),z("s")&&(z("m")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("<span>").addClass(d.icons.down))))),h||(b.append(a("<td>").addClass("separator")),c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:d.tooltips.togglePeriod}))),e.append(a("<td>").addClass("separator"))),a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b,c,e]))},E=function(){var b=a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed")),c=a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed")),d=a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed")),e=[D()];return z("h")&&e.push(b),z("m")&&e.push(c),z("s")&&e.push(d),e},F=function(){var b=[];return d.showTodayButton&&b.push(a("<td>").append(a("<a>").attr({"data-action":"today",title:d.tooltips.today}).append(a("<span>").addClass(d.icons.today)))),!d.sideBySide&&B()&&A()&&b.push(a("<td>").append(a("<a>").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("<span>").addClass(d.icons.time)))),d.showClear&&b.push(a("<td>").append(a("<a>").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("<span>").addClass(d.icons.clear)))),d.showClose&&b.push(a("<td>").append(a("<a>").attr({"data-action":"close",title:d.tooltips.close}).append(a("<span>").addClass(d.icons.close)))),a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b)))},G=function(){var b=a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("<div>").addClass("datepicker").append(C()),e=a("<div>").addClass("timepicker").append(E()),f=a("<ul>").addClass("list-unstyled"),g=a("<li>").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(F());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),z("s")&&!h&&b.addClass("wider"),d.sideBySide&&B()&&A()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),B()&&f.append(a("<li>").addClass(d.collapse&&A()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("<li>").addClass(d.collapse&&B()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},H=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},I=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()<f.top?"top":"bottom"),"auto"===h&&(h=b.width()<f.left+o.outerWidth()/2&&f.left+o.outerWidth()>a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"static"===b.css("position")&&(b=b.parents().filter(function(){return"static"!==a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?b.outerHeight()-(b===c?0:e.top):"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},J=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},K=function(a){"y"===a&&(a="YYYY"),J({type:"dp.update",change:a,viewDate:f.clone()})},L=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},M=function(){var b=a("<tr>"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a("<th>").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("<th>").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},N=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},P=function(a){return d.disabledHours[a.format("H")]===!0},Q=function(a){return d.enabledHours[a.format("H")]===!0},R=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&N(b))return!1;if(d.enabledDates&&"d"===c&&!O(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&d.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&P(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!Q(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return e=!0,!1}),e)return!1}return!0},S=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("<span>").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},T=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),R(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),R(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){R(f.clone().month(b),"M")||a(this).addClass("disabled")})},U=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+='<span data-action="selectYear" class="year'+(c.isSame(e,"y")&&!m?" active":"")+(R(c,"y")?"":" disabled")+'">'+c.year()+"</span>",c.add(1,"y");a.find("td").html(h)},V=function(){var a,c=o.find(".datepicker-decades"),g=c.find("th"),h=b({y:f.year()-f.year()%100-1}),i=h.clone().add(100,"y"),j=h.clone(),k=!1,l=!1,m="";for(g.eq(0).find("span").attr("title",d.tooltips.prevCentury),g.eq(2).find("span").attr("title",d.tooltips.nextCentury),c.find(".disabled").removeClass("disabled"),(h.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(h,"y"))&&g.eq(0).addClass("disabled"),g.eq(1).text(h.year()+"-"+i.year()),(h.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(i,"y"))&&g.eq(2).addClass("disabled");!h.isAfter(i,"y");)a=h.year()+12,k=d.minDate&&d.minDate.isAfter(h,"y")&&d.minDate.year()<=a,l=d.maxDate&&d.maxDate.isAfter(h,"y")&&d.maxDate.year()<=a,m+='<span data-action="selectDecade" class="decade'+(e.isAfter(h)&&e.year()<=a?" active":"")+(R(h,"y")||k||l?"":" disabled")+'" data-selection="'+(h.year()+6)+'">'+(h.year()+1)+" - "+(h.year()+12)+"</span>",h.add(12,"y");m+="<span></span><span></span><span></span>",c.find("td").html(m),g.eq(1).text(j.year()+1+"-"+h.year())},W=function(){var b,c,g,h=o.find(".datepicker-days"),i=h.find("th"),j=[],k=[];if(B()){for(i.eq(0).find("span").attr("title",d.tooltips.prevMonth),i.eq(1).attr("title",d.tooltips.selectMonth),i.eq(2).find("span").attr("title",d.tooltips.nextMonth),h.find(".disabled").removeClass("disabled"),i.eq(1).text(f.format(d.dayViewHeaderFormat)),R(f.clone().subtract(1,"M"),"M")||i.eq(0).addClass("disabled"),R(f.clone().add(1,"M"),"M")||i.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),g=0;g<42;g++)0===b.weekday()&&(c=a("<tr>"),d.calendarWeeks&&c.append('<td class="cw">'+b.week()+"</td>"),j.push(c)),k=["day"],b.isBefore(f,"M")&&k.push("old"),b.isAfter(f,"M")&&k.push("new"),b.isSame(e,"d")&&!m&&k.push("active"),R(b,"d")||k.push("disabled"),b.isSame(y(),"d")&&k.push("today"),0!==b.day()&&6!==b.day()||k.push("weekend"),J({type:"dp.classify",date:b,classNames:k}),c.append('<td data-action="selectDay" data-day="'+b.format("L")+'" class="'+k.join(" ")+'">'+b.date()+"</td>"),b.add(1,"d");h.find("tbody").empty().append(j),T(),U(),V()}},X=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("<tr>");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectHour" class="hour'+(R(c,"h")?"":" disabled")+'">'+c.format(h?"HH":"hh")+"</td>"),c.add(1,"h");b.empty().append(d)},Y=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a("<tr>"),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a("<tr>"),e.push(g)),g.append('<td data-action="selectMinute" class="minute'+(R(c,"m")?"":" disabled")+'">'+c.format("mm")+"</td>"),c.add(h,"m");b.empty().append(e)},Z=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("<tr>");f.isSame(c,"m");)c.second()%20===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectSecond" class="second'+(R(c,"s")?"":" disabled")+'">'+c.format("ss")+"</td>"),c.add(5,"s");b.empty().append(d)},$=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),R(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),X(),Y(),Z()},_=function(){o&&(W(),$())},aa=function(a){var b=m?null:e;if(!a)return m=!0,g.val(""),c.data("date",""),J({type:"dp.change",date:!1,oldDate:b}),void _();if(a=a.clone().locale(d.locale),x()&&a.tz(d.timeZone),1!==d.stepping)for(a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping).seconds(0);d.minDate&&a.isBefore(d.minDate);)a.add(d.stepping,"minutes");R(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,_(),J({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid?J({type:"dp.change",date:a,oldDate:b}):g.val(m?"":e.format(i)),J({type:"dp.error",date:a,oldDate:b}))},ba=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return!c||!c.transitioning||(b=!0,!1)}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",I),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,J({type:"dp.hide",date:e.clone()}),g.blur(),f=e.clone(),l)):l},ca=function(){aa(null)},da=function(a){return void 0===d.parseInputDate?(!b.isMoment(a)||a instanceof Date)&&(a=y(a)):a=d.parseInputDate(a),a},ea={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),W(),K(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),W(),K(a)},pickerSwitch:function(){L(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));f.month(c),k===p?(aa(e.clone().year(f.year()).month(f.month())),d.inline||ba()):(L(-1),W()),K("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),aa(c.date(parseInt(a(b.target).text(),10))),A()||d.keepOpen||d.inline||ba()},incrementHours:function(){var a=e.clone().add(1,"h");R(a,"h")&&aa(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");R(a,"m")&&aa(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");R(a,"s")&&aa(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");R(a,"h")&&aa(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");R(a,"m")&&aa(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");R(a,"s")&&aa(a)},togglePeriod:function(){aa(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),aa(e.clone().hours(c)),ea.showPicker.call(l)},selectMinute:function(b){aa(e.clone().minutes(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},selectSecond:function(b){aa(e.clone().seconds(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},clear:ca,today:function(){var a=y();R(a,"d")&&aa(a)},close:ba},fa=function(b){return!a(b.currentTarget).is(".disabled")&&(ea[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ga=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?aa(da(g.val().trim())):m&&d.useCurrent&&(d.inline||g.is("input")&&0===g.val().trim().length)&&(b=y(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),aa(b)),o=G(),M(),S(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),_(),L(),a(window).on("resize",I),o.on("click","[data-action]",fa),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),I(),o.show(),d.focusOnShow&&!g.is(":focus")&&g.focus(),J({type:"dp.show"}),l)},ha=function(){return o?ba():ga()},ia=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ja=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ka=function(b){var c=a(b.target).val().trim(),d=c?da(c):null;return aa(d),b.stopImmediatePropagation(),!1},la=function(){g.on({change:ka,blur:d.debug?"":ba,keydown:ia,keyup:ja,focus:d.allowInputToggle?ga:""}),c.is("input")?g.on({focus:ga}):n&&(n.on("click",ha),n.on("mousedown",!1))},ma=function(){g.off({change:ka,blur:blur,keydown:ia,keyup:ja,focus:d.allowInputToggle?ba:""}),c.is("input")?g.off({focus:ga}):n&&(n.off("click",ha),n.off("mousedown",!1))},na=function(b){var c={};return a.each(b,function(){var a=da(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},oa=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},pa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,z("y")&&(p=2),z("M")&&(p=1),z("d")&&(p=0),k=Math.max(p,k),m||aa(e)};if(l.destroy=function(){ba(),ma(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=ha,l.show=ga,l.hide=ba,l.disable=function(){return ba(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return aa(null===a?null:da(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);return d.format=a,i&&pa(),l},l.timeZone=function(a){if(0===arguments.length)return d.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");return d.timeZone=a,l},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&pa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=na(b),d.enabledDates=!1,_(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=na(b),d.disabledDates=!1,_(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,_(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!R(e,"d");){if(e.add(1,"d"),31===b)throw"Tried 31 times to find a valid date";b++}aa(e)}return _(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&aa(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),_(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&aa(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),_(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&(a="now"===a||"moment"===a?y():y(a));var b=da(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!R(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&aa(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&pa(),o&&(ba(),ga()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||a<1)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&b.indexOf(a.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(ba(),ga()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(ba(),ga()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(ba(),ga()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(ba(),ga()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(r.indexOf(a)===-1)throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),L(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(u.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(ba(),ga()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),t.indexOf(b.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),s.indexOf(b.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return _(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,_(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(ba(),ga()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(ba(),ga()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(ba(),ga()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ca(),l},l.keyBinds=function(a){return 0===arguments.length?d.keyBinds:(d.keyBinds=a,l)},l.getMoment=function(a){return y(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");
-return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,_(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=oa(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=oa(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=da(a),K(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.length)g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").length?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=y(),f=e.clone(),a.extend(!0,d,H()),l.options(d),pa(),la(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?aa(da(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&aa(d.defaultDate),d.inline&&ga(),l};return a.fn.datetimepicker=function(b){b=b||{};var d,e=Array.prototype.slice.call(arguments,1),f=!0,g=["destroy","hide","show","toggle"];if("object"==typeof b)return this.each(function(){var d,e=a(this);e.data("DateTimePicker")||(d=a.extend(!0,{},a.fn.datetimepicker.defaults,b),e.data("DateTimePicker",c(e,d)))});if("string"==typeof b)return this.each(function(){var c=a(this),g=c.data("DateTimePicker");if(!g)throw new Error('bootstrap-datetimepicker("'+b+'") method was called on an element that is not using DateTimePicker');d=g[b].apply(g,e),f=d===g}),f||a.inArray(b,g)>-1?this:d;throw new TypeError("Invalid arguments for DateTimePicker: "+b)},a.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a&&a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},a.fn.datetimepicker});
\ No newline at end of file
+!function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)module.exports=e(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";e(jQuery,moment)}}(function(e,t){"use strict";if(!t)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var a=function(a,n){var r,i,o,s,d,l,p,c,u,f={},h=!0,m=!1,y=!1,g=0,b=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],w=["days","months","years","decades"],v=["top","bottom","auto"],k=["left","right","auto"],D=["default","top","bottom"],C={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},x={},T=function(){return void 0!==t.tz&&void 0!==n.timeZone&&null!==n.timeZone&&""!==n.timeZone},M=function(e){var a;return a=null==e?t():t.isDate(e)||t.isMoment(e)?t(e):T()?t.tz(e,l,n.useStrict,n.timeZone):t(e,l,n.useStrict),T()&&a.tz(n.timeZone),a},S=function(e){if("string"!=typeof e||e.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(e){case"y":return-1!==d.indexOf("Y");case"M":return-1!==d.indexOf("M");case"d":return-1!==d.toLowerCase().indexOf("d");case"h":case"H":return-1!==d.toLowerCase().indexOf("h");case"m":return-1!==d.indexOf("m");case"s":return-1!==d.indexOf("s");default:return!1}},O=function(){return S("h")||S("m")||S("s")},P=function(){return S("y")||S("M")||S("d")},E=function(){var t,a,r,i=e("<div>").addClass("timepicker-hours").append(e("<table>").addClass("table-condensed")),o=e("<div>").addClass("timepicker-minutes").append(e("<table>").addClass("table-condensed")),d=e("<div>").addClass("timepicker-seconds").append(e("<table>").addClass("table-condensed")),l=[(t=e("<tr>"),a=e("<tr>"),r=e("<tr>"),S("h")&&(t.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("<span>").addClass(n.icons.up)))),a.append(e("<td>").append(e("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:n.tooltips.pickHour}).attr("data-action","showHours"))),r.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("<span>").addClass(n.icons.down))))),S("m")&&(S("h")&&(t.append(e("<td>").addClass("separator")),a.append(e("<td>").addClass("separator").html(":")),r.append(e("<td>").addClass("separator"))),t.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("<span>").addClass(n.icons.up)))),a.append(e("<td>").append(e("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:n.tooltips.pickMinute}).attr("data-action","showMinutes"))),r.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("<span>").addClass(n.icons.down))))),S("s")&&(S("m")&&(t.append(e("<td>").addClass("separator")),a.append(e("<td>").addClass("separator").html(":")),r.append(e("<td>").addClass("separator"))),t.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("<span>").addClass(n.icons.up)))),a.append(e("<td>").append(e("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:n.tooltips.pickSecond}).attr("data-action","showSeconds"))),r.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("<span>").addClass(n.icons.down))))),s||(t.append(e("<td>").addClass("separator")),a.append(e("<td>").append(e("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:n.tooltips.togglePeriod}))),r.append(e("<td>").addClass("separator"))),e("<div>").addClass("timepicker-picker").append(e("<table>").addClass("table-condensed").append([t,a,r])))];return S("h")&&l.push(i),S("m")&&l.push(o),S("s")&&l.push(d),l},H=function(){var t,a,r,i=e("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),o=e("<div>").addClass("datepicker").append((a=e("<thead>").append(e("<tr>").append(e("<th>").addClass("prev").attr("data-action","previous").append(e("<span>").addClass(n.icons.previous))).append(e("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",n.calendarWeeks?"6":"5")).append(e("<th>").addClass("next").attr("data-action","next").append(e("<span>").addClass(n.icons.next)))),r=e("<tbody>").append(e("<tr>").append(e("<td>").attr("colspan",n.calendarWeeks?"8":"7"))),[e("<div>").addClass("datepicker-days").append(e("<table>").addClass("table-condensed").append(a).append(e("<tbody>"))),e("<div>").addClass("datepicker-months").append(e("<table>").addClass("table-condensed").append(a.clone()).append(r.clone())),e("<div>").addClass("datepicker-years").append(e("<table>").addClass("table-condensed").append(a.clone()).append(r.clone())),e("<div>").addClass("datepicker-decades").append(e("<table>").addClass("table-condensed").append(a.clone()).append(r.clone()))])),d=e("<div>").addClass("timepicker").append(E()),l=e("<ul>").addClass("list-unstyled"),p=e("<li>").addClass("picker-switch"+(n.collapse?" accordion-toggle":"")).append((t=[],n.showTodayButton&&t.push(e("<td>").append(e("<a>").attr({"data-action":"today",title:n.tooltips.today}).append(e("<span>").addClass(n.icons.today)))),!n.sideBySide&&P()&&O()&&t.push(e("<td>").append(e("<a>").attr({"data-action":"togglePicker",title:n.tooltips.selectTime}).append(e("<span>").addClass(n.icons.time)))),n.showClear&&t.push(e("<td>").append(e("<a>").attr({"data-action":"clear",title:n.tooltips.clear}).append(e("<span>").addClass(n.icons.clear)))),n.showClose&&t.push(e("<td>").append(e("<a>").attr({"data-action":"close",title:n.tooltips.close}).append(e("<span>").addClass(n.icons.close)))),e("<table>").addClass("table-condensed").append(e("<tbody>").append(e("<tr>").append(t)))));return n.inline&&i.removeClass("dropdown-menu"),s&&i.addClass("usetwentyfour"),S("s")&&!s&&i.addClass("wider"),n.sideBySide&&P()&&O()?(i.addClass("timepicker-sbs"),"top"===n.toolbarPlacement&&i.append(p),i.append(e("<div>").addClass("row").append(o.addClass("col-md-6")).append(d.addClass("col-md-6"))),"bottom"===n.toolbarPlacement&&i.append(p),i):("top"===n.toolbarPlacement&&l.append(p),P()&&l.append(e("<li>").addClass(n.collapse&&O()?"collapse in":"").append(o)),"default"===n.toolbarPlacement&&l.append(p),O()&&l.append(e("<li>").addClass(n.collapse&&P()?"collapse":"").append(d)),"bottom"===n.toolbarPlacement&&l.append(p),i.append(l))},I=function(){var t,r=(m||a).position(),i=(m||a).offset(),o=n.widgetPositioning.vertical,s=n.widgetPositioning.horizontal;if(n.widgetParent)t=n.widgetParent.append(y);else if(a.is("input"))t=a.after(y).parent();else{if(n.inline)return void(t=a.append(y));t=a,a.children().first().after(y)}if("auto"===o&&(o=i.top+1.5*y.height()>=e(window).height()+e(window).scrollTop()&&y.height()+a.outerHeight()<i.top?"top":"bottom"),"auto"===s&&(s=t.width()<i.left+y.outerWidth()/2&&i.left+y.outerWidth()>e(window).width()?"right":"left"),"top"===o?y.addClass("top").removeClass("bottom"):y.addClass("bottom").removeClass("top"),"right"===s?y.addClass("pull-right"):y.removeClass("pull-right"),"static"===t.css("position")&&(t=t.parents().filter(function(){return"static"!==e(this).css("position")}).first()),0===t.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");y.css({top:"top"===o?"auto":r.top+a.outerHeight(),bottom:"top"===o?t.outerHeight()-(t===a?0:r.top):"auto",left:"left"===s?t===a?0:r.left:"auto",right:"left"===s?"auto":t.outerWidth()-a.outerWidth()-(t===a?0:r.left)})},Y=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||a.trigger(e)},q=function(e){"y"===e&&(e="YYYY"),Y({type:"dp.update",change:e,viewDate:i.clone()})},B=function(e){y&&(e&&(p=Math.max(g,Math.min(3,p+e))),y.find(".datepicker > div").hide().filter(".datepicker-"+b[p].clsName).show())},j=function(t,a){if(!t.isValid())return!1;if(n.disabledDates&&"d"===a&&(r=t,!0===n.disabledDates[r.format("YYYY-MM-DD")]))return!1;var r,i,o,s;if(n.enabledDates&&"d"===a&&(i=t,!0!==n.enabledDates[i.format("YYYY-MM-DD")]))return!1;if(n.minDate&&t.isBefore(n.minDate,a))return!1;if(n.maxDate&&t.isAfter(n.maxDate,a))return!1;if(n.daysOfWeekDisabled&&"d"===a&&-1!==n.daysOfWeekDisabled.indexOf(t.day()))return!1;if(n.disabledHours&&("h"===a||"m"===a||"s"===a)&&(o=t,!0===n.disabledHours[o.format("H")]))return!1;if(n.enabledHours&&("h"===a||"m"===a||"s"===a)&&(s=t,!0!==n.enabledHours[s.format("H")]))return!1;if(n.disabledTimeIntervals&&("h"===a||"m"===a||"s"===a)){var d=!1;if(e.each(n.disabledTimeIntervals,function(){if(t.isBetween(this[0],this[1]))return d=!0,!1}),d)return!1}return!0},A=function(){var a,o,s,d,l,p,c=y.find(".datepicker-days"),u=c.find("th"),f=[],m=[];if(P()){for(u.eq(0).find("span").attr("title",n.tooltips.prevMonth),u.eq(1).attr("title",n.tooltips.selectMonth),u.eq(2).find("span").attr("title",n.tooltips.nextMonth),c.find(".disabled").removeClass("disabled"),u.eq(1).text(i.format(n.dayViewHeaderFormat)),j(i.clone().subtract(1,"M"),"M")||u.eq(0).addClass("disabled"),j(i.clone().add(1,"M"),"M")||u.eq(2).addClass("disabled"),a=i.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++)0===a.weekday()&&(o=e("<tr>"),n.calendarWeeks&&o.append('<td class="cw">'+a.week()+"</td>"),f.push(o)),m=["day"],a.isBefore(i,"M")&&m.push("old"),a.isAfter(i,"M")&&m.push("new"),a.isSame(r,"d")&&!h&&m.push("active"),j(a,"d")||m.push("disabled"),a.isSame(M(),"d")&&m.push("today"),0!==a.day()&&6!==a.day()||m.push("weekend"),Y({type:"dp.classify",date:a,classNames:m}),o.append('<td data-action="selectDay" data-day="'+a.format("L")+'" class="'+m.join(" ")+'">'+a.date()+"</td>"),a.add(1,"d");c.find("tbody").empty().append(f),d=y.find(".datepicker-months"),l=d.find("th"),p=d.find("tbody").find("span"),l.eq(0).find("span").attr("title",n.tooltips.prevYear),l.eq(1).attr("title",n.tooltips.selectYear),l.eq(2).find("span").attr("title",n.tooltips.nextYear),d.find(".disabled").removeClass("disabled"),j(i.clone().subtract(1,"y"),"y")||l.eq(0).addClass("disabled"),l.eq(1).text(i.year()),j(i.clone().add(1,"y"),"y")||l.eq(2).addClass("disabled"),p.removeClass("active"),r.isSame(i,"y")&&!h&&p.eq(r.month()).addClass("active"),p.each(function(t){j(i.clone().month(t),"M")||e(this).addClass("disabled")}),function(){var e=y.find(".datepicker-years"),t=e.find("th"),a=i.clone().subtract(5,"y"),o=i.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title",n.tooltips.prevDecade),t.eq(1).attr("title",n.tooltips.selectDecade),t.eq(2).find("span").attr("title",n.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),n.minDate&&n.minDate.isAfter(a,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(a.year()+"-"+o.year()),n.maxDate&&n.maxDate.isBefore(o,"y")&&t.eq(2).addClass("disabled");!a.isAfter(o,"y");)s+='<span data-action="selectYear" class="year'+(a.isSame(r,"y")&&!h?" active":"")+(j(a,"y")?"":" disabled")+'">'+a.year()+"</span>",a.add(1,"y");e.find("td").html(s)}(),function(){var e,a=y.find(".datepicker-decades"),o=a.find("th"),s=t({y:i.year()-i.year()%100-1}),d=s.clone().add(100,"y"),l=s.clone(),p=!1,c=!1,u="";for(o.eq(0).find("span").attr("title",n.tooltips.prevCentury),o.eq(2).find("span").attr("title",n.tooltips.nextCentury),a.find(".disabled").removeClass("disabled"),(s.isSame(t({y:1900}))||n.minDate&&n.minDate.isAfter(s,"y"))&&o.eq(0).addClass("disabled"),o.eq(1).text(s.year()+"-"+d.year()),(s.isSame(t({y:2e3}))||n.maxDate&&n.maxDate.isBefore(d,"y"))&&o.eq(2).addClass("disabled");!s.isAfter(d,"y");)e=s.year()+12,p=n.minDate&&n.minDate.isAfter(s,"y")&&n.minDate.year()<=e,c=n.maxDate&&n.maxDate.isAfter(s,"y")&&n.maxDate.year()<=e,u+='<span data-action="selectDecade" class="decade'+(r.isAfter(s)&&r.year()<=e?" active":"")+(j(s,"y")||p||c?"":" disabled")+'" data-selection="'+(s.year()+6)+'">'+(s.year()+1)+" - "+(s.year()+12)+"</span>",s.add(12,"y");u+="<span></span><span></span><span></span>",a.find("td").html(u),o.eq(1).text(l.year()+1+"-"+s.year())}()}},F=function(){var t,a,o=y.find(".timepicker span[data-time-component]");s||(t=y.find(".timepicker [data-action=togglePeriod]"),a=r.clone().add(r.hours()>=12?-12:12,"h"),t.text(r.format("A")),j(a,"h")?t.removeClass("disabled"):t.addClass("disabled")),o.filter("[data-time-component=hours]").text(r.format(s?"HH":"hh")),o.filter("[data-time-component=minutes]").text(r.format("mm")),o.filter("[data-time-component=seconds]").text(r.format("ss")),function(){var t=y.find(".timepicker-hours table"),a=i.clone().startOf("d"),n=[],r=e("<tr>");for(i.hour()>11&&!s&&a.hour(12);a.isSame(i,"d")&&(s||i.hour()<12&&a.hour()<12||i.hour()>11);)a.hour()%4==0&&(r=e("<tr>"),n.push(r)),r.append('<td data-action="selectHour" class="hour'+(j(a,"h")?"":" disabled")+'">'+a.format(s?"HH":"hh")+"</td>"),a.add(1,"h");t.empty().append(n)}(),function(){for(var t=y.find(".timepicker-minutes table"),a=i.clone().startOf("h"),r=[],o=e("<tr>"),s=1===n.stepping?5:n.stepping;i.isSame(a,"h");)a.minute()%(4*s)==0&&(o=e("<tr>"),r.push(o)),o.append('<td data-action="selectMinute" class="minute'+(j(a,"m")?"":" disabled")+'">'+a.format("mm")+"</td>"),a.add(s,"m");t.empty().append(r)}(),function(){for(var t=y.find(".timepicker-seconds table"),a=i.clone().startOf("m"),n=[],r=e("<tr>");i.isSame(a,"m");)a.second()%20==0&&(r=e("<tr>"),n.push(r)),r.append('<td data-action="selectSecond" class="second'+(j(a,"s")?"":" disabled")+'">'+a.format("ss")+"</td>"),a.add(5,"s");t.empty().append(n)}()},L=function(){y&&(A(),F())},W=function(e){var t=h?null:r;if(!e)return h=!0,o.val(""),a.data("date",""),Y({type:"dp.change",date:!1,oldDate:t}),void L();if(e=e.clone().locale(n.locale),T()&&e.tz(n.timeZone),1!==n.stepping)for(e.minutes(Math.round(e.minutes()/n.stepping)*n.stepping).seconds(0);n.minDate&&e.isBefore(n.minDate);)e.add(n.stepping,"minutes");j(e)?(i=(r=e).clone(),o.val(r.format(d)),a.data("date",r.format(d)),h=!1,L(),Y({type:"dp.change",date:r.clone(),oldDate:t})):(n.keepInvalid?Y({type:"dp.change",date:e,oldDate:t}):o.val(h?"":r.format(d)),Y({type:"dp.error",date:e,oldDate:t}))},z=function(){var t=!1;return y?(y.find(".collapse").each(function(){var a=e(this).data("collapse");return!a||!a.transitioning||(t=!0,!1)}),t?f:(m&&m.hasClass("btn")&&m.toggleClass("active"),y.hide(),e(window).off("resize",I),y.off("click","[data-action]"),y.off("mousedown",!1),y.remove(),y=!1,Y({type:"dp.hide",date:r.clone()}),o.blur(),i=r.clone(),f)):f},N=function(){W(null)},V=function(e){return void 0===n.parseInputDate?(!t.isMoment(e)||e instanceof Date)&&(e=M(e)):e=n.parseInputDate(e),e},Z={next:function(){var e=b[p].navFnc;i.add(b[p].navStep,e),A(),q(e)},previous:function(){var e=b[p].navFnc;i.subtract(b[p].navStep,e),A(),q(e)},pickerSwitch:function(){B(1)},selectMonth:function(t){var a=e(t.target).closest("tbody").find("span").index(e(t.target));i.month(a),p===g?(W(r.clone().year(i.year()).month(i.month())),n.inline||z()):(B(-1),A()),q("M")},selectYear:function(t){var a=parseInt(e(t.target).text(),10)||0;i.year(a),p===g?(W(r.clone().year(i.year())),n.inline||z()):(B(-1),A()),q("YYYY")},selectDecade:function(t){var a=parseInt(e(t.target).data("selection"),10)||0;i.year(a),p===g?(W(r.clone().year(i.year())),n.inline||z()):(B(-1),A()),q("YYYY")},selectDay:function(t){var a=i.clone();e(t.target).is(".old")&&a.subtract(1,"M"),e(t.target).is(".new")&&a.add(1,"M"),W(a.date(parseInt(e(t.target).text(),10))),O()||n.keepOpen||n.inline||z()},incrementHours:function(){var e=r.clone().add(1,"h");j(e,"h")&&W(e)},incrementMinutes:function(){var e=r.clone().add(n.stepping,"m");j(e,"m")&&W(e)},incrementSeconds:function(){var e=r.clone().add(1,"s");j(e,"s")&&W(e)},decrementHours:function(){var e=r.clone().subtract(1,"h");j(e,"h")&&W(e)},decrementMinutes:function(){var e=r.clone().subtract(n.stepping,"m");j(e,"m")&&W(e)},decrementSeconds:function(){var e=r.clone().subtract(1,"s");j(e,"s")&&W(e)},togglePeriod:function(){W(r.clone().add(r.hours()>=12?-12:12,"h"))},togglePicker:function(t){var a,r=e(t.target),i=r.closest("ul"),o=i.find(".in"),s=i.find(".collapse:not(.in)");if(o&&o.length){if((a=o.data("collapse"))&&a.transitioning)return;o.collapse?(o.collapse("hide"),s.collapse("show")):(o.removeClass("in"),s.addClass("in")),r.is("span")?r.toggleClass(n.icons.time+" "+n.icons.date):r.find("span").toggleClass(n.icons.time+" "+n.icons.date)}},showPicker:function(){y.find(".timepicker > div:not(.timepicker-picker)").hide(),y.find(".timepicker .timepicker-picker").show()},showHours:function(){y.find(".timepicker .timepicker-picker").hide(),y.find(".timepicker .timepicker-hours").show()},showMinutes:function(){y.find(".timepicker .timepicker-picker").hide(),y.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){y.find(".timepicker .timepicker-picker").hide(),y.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var a=parseInt(e(t.target).text(),10);s||(r.hours()>=12?12!==a&&(a+=12):12===a&&(a=0)),W(r.clone().hours(a)),Z.showPicker.call(f)},selectMinute:function(t){W(r.clone().minutes(parseInt(e(t.target).text(),10))),Z.showPicker.call(f)},selectSecond:function(t){W(r.clone().seconds(parseInt(e(t.target).text(),10))),Z.showPicker.call(f)},clear:N,today:function(){var e=M();j(e,"d")&&W(e)},close:z},R=function(t){return!e(t.currentTarget).is(".disabled")&&(Z[e(t.currentTarget).data("action")].apply(f,arguments),!1)},Q=function(){var t;return o.prop("disabled")||!n.ignoreReadonly&&o.prop("readonly")||y?f:(void 0!==o.val()&&0!==o.val().trim().length?W(V(o.val().trim())):h&&n.useCurrent&&(n.inline||o.is("input")&&0===o.val().trim().length)&&(t=M(),"string"==typeof n.useCurrent&&(t={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[n.useCurrent](t)),W(t)),y=H(),function(){var t=e("<tr>"),a=i.clone().startOf("w").startOf("d");for(!0===n.calendarWeeks&&t.append(e("<th>").addClass("cw").text("#"));a.isBefore(i.clone().endOf("w"));)t.append(e("<th>").addClass("dow").text(a.format("dd"))),a.add(1,"d");y.find(".datepicker-days thead").append(t)}(),function(){for(var t=[],a=i.clone().startOf("y").startOf("d");a.isSame(i,"y");)t.push(e("<span>").attr("data-action","selectMonth").addClass("month").text(a.format("MMM"))),a.add(1,"M");y.find(".datepicker-months td").empty().append(t)}(),y.find(".timepicker-hours").hide(),y.find(".timepicker-minutes").hide(),y.find(".timepicker-seconds").hide(),L(),B(),e(window).on("resize",I),y.on("click","[data-action]",R),y.on("mousedown",!1),m&&m.hasClass("btn")&&m.toggleClass("active"),I(),y.show(),n.focusOnShow&&!o.is(":focus")&&o.focus(),Y({type:"dp.show"}),f)},U=function(){return y?z():Q()},G=function(e){var t,a,r,i,o=null,s=[],d={},l=e.which;for(t in x[l]="p",x)x.hasOwnProperty(t)&&"p"===x[t]&&(s.push(t),parseInt(t,10)!==l&&(d[t]=!0));for(t in n.keyBinds)if(n.keyBinds.hasOwnProperty(t)&&"function"==typeof n.keyBinds[t]&&((r=t.split(" ")).length===s.length&&C[l]===r[r.length-1])){for(i=!0,a=r.length-2;a>=0;a--)if(!(C[r[a]]in d)){i=!1;break}if(i){o=n.keyBinds[t];break}}o&&(o.call(f,y),e.stopPropagation(),e.preventDefault())},J=function(e){x[e.which]="r",e.stopPropagation(),e.preventDefault()},K=function(t){var a=e(t.target).val().trim(),n=a?V(a):null;return W(n),t.stopImmediatePropagation(),!1},X=function(t){var a={};return e.each(t,function(){var e=V(this);e.isValid()&&(a[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(a).length&&a},$=function(t){var a={};return e.each(t,function(){a[this]=!0}),!!Object.keys(a).length&&a},_=function(){var e=n.format||"L LT";d=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(r.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return r.localeData().longDateFormat(e)||e})}),(l=n.extraFormats?n.extraFormats.slice():[]).indexOf(e)<0&&l.indexOf(d)<0&&l.push(d),s=d.toLowerCase().indexOf("a")<1&&d.replace(/\[.*?\]/g,"").indexOf("h")<1,S("y")&&(g=2),S("M")&&(g=1),S("d")&&(g=0),p=Math.max(g,p),h||W(r)};if(f.destroy=function(){z(),o.off({change:K,blur:blur,keydown:G,keyup:J,focus:n.allowInputToggle?z:""}),a.is("input")?o.off({focus:Q}):m&&(m.off("click",U),m.off("mousedown",!1)),a.removeData("DateTimePicker"),a.removeData("date")},f.toggle=U,f.show=Q,f.hide=z,f.disable=function(){return z(),m&&m.hasClass("btn")&&m.addClass("disabled"),o.prop("disabled",!0),f},f.enable=function(){return m&&m.hasClass("btn")&&m.removeClass("disabled"),o.prop("disabled",!1),f},f.ignoreReadonly=function(e){if(0===arguments.length)return n.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return n.ignoreReadonly=e,f},f.options=function(t){if(0===arguments.length)return e.extend(!0,{},n);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return e.extend(!0,n,t),e.each(n,function(e,t){if(void 0===f[e])throw new TypeError("option "+e+" is not recognized!");f[e](t)}),f},f.date=function(e){if(0===arguments.length)return h?null:r.clone();if(!(null===e||"string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return W(null===e?null:V(e)),f},f.format=function(e){if(0===arguments.length)return n.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return n.format=e,d&&_(),f},f.timeZone=function(e){if(0===arguments.length)return n.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return n.timeZone=e,f},f.dayViewHeaderFormat=function(e){if(0===arguments.length)return n.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return n.dayViewHeaderFormat=e,f},f.extraFormats=function(e){if(0===arguments.length)return n.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return n.extraFormats=e,l&&_(),f},f.disabledDates=function(t){if(0===arguments.length)return n.disabledDates?e.extend({},n.disabledDates):n.disabledDates;if(!t)return n.disabledDates=!1,L(),f;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return n.disabledDates=X(t),n.enabledDates=!1,L(),f},f.enabledDates=function(t){if(0===arguments.length)return n.enabledDates?e.extend({},n.enabledDates):n.enabledDates;if(!t)return n.enabledDates=!1,L(),f;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return n.enabledDates=X(t),n.disabledDates=!1,L(),f},f.daysOfWeekDisabled=function(e){if(0===arguments.length)return n.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return n.daysOfWeekDisabled=!1,L(),f;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(n.daysOfWeekDisabled=e.reduce(function(e,t){return(t=parseInt(t,10))>6||t<0||isNaN(t)?e:(-1===e.indexOf(t)&&e.push(t),e)},[]).sort(),n.useCurrent&&!n.keepInvalid){for(var t=0;!j(r,"d");){if(r.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}W(r)}return L(),f},f.maxDate=function(e){if(0===arguments.length)return n.maxDate?n.maxDate.clone():n.maxDate;if("boolean"==typeof e&&!1===e)return n.maxDate=!1,L(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=M()));var t=V(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(n.minDate&&t.isBefore(n.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(d));return n.maxDate=t,n.useCurrent&&!n.keepInvalid&&r.isAfter(e)&&W(n.maxDate),i.isAfter(t)&&(i=t.clone().subtract(n.stepping,"m")),L(),f},f.minDate=function(e){if(0===arguments.length)return n.minDate?n.minDate.clone():n.minDate;if("boolean"==typeof e&&!1===e)return n.minDate=!1,L(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=M()));var t=V(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(n.maxDate&&t.isAfter(n.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(d));return n.minDate=t,n.useCurrent&&!n.keepInvalid&&r.isBefore(e)&&W(n.minDate),i.isBefore(t)&&(i=t.clone().add(n.stepping,"m")),L(),f},f.defaultDate=function(e){if(0===arguments.length)return n.defaultDate?n.defaultDate.clone():n.defaultDate;if(!e)return n.defaultDate=!1,f;"string"==typeof e&&(e="now"===e||"moment"===e?M():M(e));var t=V(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!j(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return n.defaultDate=t,(n.defaultDate&&n.inline||""===o.val().trim())&&W(n.defaultDate),f},f.locale=function(e){if(0===arguments.length)return n.locale;if(!t.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return n.locale=e,r.locale(n.locale),i.locale(n.locale),d&&_(),y&&(z(),Q()),f},f.stepping=function(e){return 0===arguments.length?n.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),n.stepping=e,f)},f.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return n.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return n.useCurrent=e,f},f.collapse=function(e){if(0===arguments.length)return n.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return n.collapse===e?f:(n.collapse=e,y&&(z(),Q()),f)},f.icons=function(t){if(0===arguments.length)return e.extend({},n.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return e.extend(n.icons,t),y&&(z(),Q()),f},f.tooltips=function(t){if(0===arguments.length)return e.extend({},n.tooltips);if(!(t instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return e.extend(n.tooltips,t),y&&(z(),Q()),f},f.useStrict=function(e){if(0===arguments.length)return n.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return n.useStrict=e,f},f.sideBySide=function(e){if(0===arguments.length)return n.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return n.sideBySide=e,y&&(z(),Q()),f},f.viewMode=function(e){if(0===arguments.length)return n.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===w.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+w.join(", ")+") value");return n.viewMode=e,p=Math.max(w.indexOf(e),g),B(),f},f.toolbarPlacement=function(e){if(0===arguments.length)return n.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===D.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+D.join(", ")+") value");return n.toolbarPlacement=e,y&&(z(),Q()),f},f.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},n.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===k.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+k.join(", ")+")");n.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===v.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+v.join(", ")+")");n.widgetPositioning.vertical=t.vertical}return L(),f},f.calendarWeeks=function(e){if(0===arguments.length)return n.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return n.calendarWeeks=e,L(),f},f.showTodayButton=function(e){if(0===arguments.length)return n.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return n.showTodayButton=e,y&&(z(),Q()),f},f.showClear=function(e){if(0===arguments.length)return n.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return n.showClear=e,y&&(z(),Q()),f},f.widgetParent=function(t){if(0===arguments.length)return n.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return n.widgetParent=t,y&&(z(),Q()),f},f.keepOpen=function(e){if(0===arguments.length)return n.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return n.keepOpen=e,f},f.focusOnShow=function(e){if(0===arguments.length)return n.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return n.focusOnShow=e,f},f.inline=function(e){if(0===arguments.length)return n.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return n.inline=e,f},f.clear=function(){return N(),f},f.keyBinds=function(e){return 0===arguments.length?n.keyBinds:(n.keyBinds=e,f)},f.getMoment=function(e){return M(e)},f.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return n.debug=e,f},f.allowInputToggle=function(e){if(0===arguments.length)return n.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return n.allowInputToggle=e,f},f.showClose=function(e){if(0===arguments.length)return n.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return n.showClose=e,f},f.keepInvalid=function(e){if(0===arguments.length)return n.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return n.keepInvalid=e,f},f.datepickerInput=function(e){if(0===arguments.length)return n.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return n.datepickerInput=e,f},f.parseInputDate=function(e){if(0===arguments.length)return n.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return n.parseInputDate=e,f},f.disabledTimeIntervals=function(t){if(0===arguments.length)return n.disabledTimeIntervals?e.extend({},n.disabledTimeIntervals):n.disabledTimeIntervals;if(!t)return n.disabledTimeIntervals=!1,L(),f;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return n.disabledTimeIntervals=t,L(),f},f.disabledHours=function(t){if(0===arguments.length)return n.disabledHours?e.extend({},n.disabledHours):n.disabledHours;if(!t)return n.disabledHours=!1,L(),f;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(n.disabledHours=$(t),n.enabledHours=!1,n.useCurrent&&!n.keepInvalid){for(var a=0;!j(r,"h");){if(r.add(1,"h"),24===a)throw"Tried 24 times to find a valid date";a++}W(r)}return L(),f},f.enabledHours=function(t){if(0===arguments.length)return n.enabledHours?e.extend({},n.enabledHours):n.enabledHours;if(!t)return n.enabledHours=!1,L(),f;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(n.enabledHours=$(t),n.disabledHours=!1,n.useCurrent&&!n.keepInvalid){for(var a=0;!j(r,"h");){if(r.add(1,"h"),24===a)throw"Tried 24 times to find a valid date";a++}W(r)}return L(),f},f.viewDate=function(e){if(0===arguments.length)return i.clone();if(!e)return i=r.clone(),f;if(!("string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return i=V(e),q(),f},a.is("input"))o=a;else if(0===(o=a.find(n.datepickerInput)).length)o=a.find("input");else if(!o.is("input"))throw new Error('CSS class "'+n.datepickerInput+'" cannot be applied to non input element');if(a.hasClass("input-group")&&(m=0===a.find(".datepickerbutton").length?a.find(".input-group-addon"):a.find(".datepickerbutton")),!n.inline&&!o.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return r=M(),i=r.clone(),e.extend(!0,n,(u={},(c=a.is("input")||n.inline?a.data():a.find("input").data()).dateOptions&&c.dateOptions instanceof Object&&(u=e.extend(!0,u,c.dateOptions)),e.each(n,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==c[t]&&(u[e]=c[t])}),u)),f.options(n),_(),o.on({change:K,blur:n.debug?"":z,keydown:G,keyup:J,focus:n.allowInputToggle?Q:""}),a.is("input")?o.on({focus:Q}):m&&(m.on("click",U),m.on("mousedown",!1)),o.prop("disabled")&&f.disable(),o.is("input")&&0!==o.val().trim().length?W(V(o.val().trim())):n.defaultDate&&void 0===o.attr("placeholder")&&W(n.defaultDate),n.inline&&Q(),f};return e.fn.datetimepicker=function(t){t=t||{};var n,r=Array.prototype.slice.call(arguments,1),i=!0;if("object"==typeof t)return this.each(function(){var n,r=e(this);r.data("DateTimePicker")||(n=e.extend(!0,{},e.fn.datetimepicker.defaults,t),r.data("DateTimePicker",a(r,n)))});if("string"==typeof t)return this.each(function(){var a=e(this).data("DateTimePicker");if(!a)throw new Error('bootstrap-datetimepicker("'+t+'") method was called on an element that is not using DateTimePicker');n=a[t].apply(a,r),i=n===a}),i||e.inArray(t,["destroy","hide","show","toggle"])>-1?this:n;throw new TypeError("Invalid arguments for DateTimePicker: "+t)},e.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:t.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},e.fn.datetimepicker});
\ No newline at end of file
index a16f68d..3b36967 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}});
\ No newline at end of file
+!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){var t,n,i,r;function o(t,n){var i,r,o,a=t.nodeName.toLowerCase();return"area"===a?(r=(i=t.parentNode).name,!(!t.href||!r||"map"!==i.nodeName.toLowerCase())&&(!!(o=e("img[usemap='#"+r+"']")[0])&&s(o))):(/^(input|select|textarea|button|object)$/.test(a)?!t.disabled:"a"===a&&t.href||n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(t){return o(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),i=isNaN(n);return(i||n>=0)&&o(t,!i)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function s(t,n,r,o){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}e.fn["inner"+n]=function(t){return void 0===t?o["inner"+n].call(this):this.each(function(){e(this).css(r,s(this,t)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?o["outer"+n].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=(n=e.fn.removeData,function(t){return arguments.length?n.call(this,e.camelCase(t)):n.call(this)})),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:(r=e.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var i=this;setTimeout(function(){e(i).focus(),n&&n.call(i)},t)}):r.apply(this,arguments)}),disableSelection:(i="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(i+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,i,r=e(this[0]);r.length&&r[0]!==document;){if(("absolute"===(n=r.css("position"))||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var r,o=e.ui[t].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}}});
\ No newline at end of file
index ccccdfe..0749a84 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return this._blurActiveElement(b),!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0))},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=this.document[0];if(this.handleElement.is(b.target))try{c.activeElement&&"body"!==c.activeElement.nodeName.toLowerCase()&&a(c.activeElement).blur()}catch(a){}},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._normalizeRightBottom(),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.focus(),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});
\ No newline at end of file
+!function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var s=this.options;return this._blurActiveElement(e),!(this.helper||s.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blockFrames(!0===s.iframeFix?"iframe":s.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var s=this.document[0];if(this.handleElement.is(e.target))try{s.activeElement&&"body"!==s.activeElement.nodeName.toLowerCase()&&t(s.activeElement).blur()}catch(t){}},_mouseStart:function(e){var s=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,s){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!s){var i=this._uiHash();if(!1===this._trigger("drag",e,i))return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var s=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==s._trigger("stop",e)&&s._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var s=this.options,i=t.isFunction(s.helper),o=i?t(s.helper.apply(this.element[0],[e])):"clone"===s.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===s.appendTo?this.element[0].parentNode:s.appendTo),i&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),s=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==s&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,s,i,o=this.options,n=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(i=(s=t(o.containment))[0])&&(e=/(scroll|auto)/.test(s.css("overflow")),this.containment=[(parseInt(s.css("borderLeftWidth"),10)||0)+(parseInt(s.css("paddingLeft"),10)||0),(parseInt(s.css("borderTopWidth"),10)||0)+(parseInt(s.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(s.css("borderRightWidth"),10)||0)-(parseInt(s.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(s.css("borderBottomWidth"),10)||0)-(parseInt(s.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=s)):this.containment=o.containment:this.containment=[0,0,t(n).width()-this.helperProportions.width-this.margins.left,(t(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var s="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*s,left:e.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*s}},_generatePosition:function(t,e){var s,i,o,n,r=this.options,l=this._isRootNode(this.scrollParent[0]),a=t.pageX,h=t.pageY;return l&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),s=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):s=this.containment,t.pageX-this.offset.click.left<s[0]&&(a=s[0]+this.offset.click.left),t.pageY-this.offset.click.top<s[1]&&(h=s[1]+this.offset.click.top),t.pageX-this.offset.click.left>s[2]&&(a=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3]&&(h=s[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=s?o-this.offset.click.top>=s[1]||o-this.offset.click.top>s[3]?o:o-this.offset.click.top>=s[1]?o-r.grid[1]:o+r.grid[1]:o,n=r.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,a=s?n-this.offset.click.left>=s[0]||n-this.offset.click.left>s[2]?n:n-this.offset.click.left>=s[0]?n-r.grid[0]:n+r.grid[0]:n),"y"===r.axis&&(a=this.originalPageX),"x"===r.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:l?0:this.offset.scroll.top),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:l?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,s,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[s,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,s,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,s,i){var o=t.extend({},s,{item:i.element});i.sortables=[],t(i.options.connectToSortable).each(function(){var s=t(this).sortable("instance");s&&!s.options.disabled&&(i.sortables.push(s),s.refreshPositions(),s._trigger("activate",e,o))})},stop:function(e,s,i){var o=t.extend({},s,{item:i.element});i.cancelHelperRemoval=!1,t.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))})},drag:function(e,s,i){t.each(i.sortables,function(){var o=!1,n=this;n.positionAbs=i.positionAbs,n.helperProportions=i.helperProportions,n.offset.click=i.offset.click,n._intersectsWith(n.containerCache)&&(o=!0,t.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==n&&this._intersectsWith(this.containerCache)&&t.contains(n.element[0],this.element[0])&&(o=!1),o})),o?(n.isOver||(n.isOver=1,i._parent=s.helper.parent(),n.currentItem=s.helper.appendTo(n.element).data("ui-sortable-item",!0),n.options._helper=n.options.helper,n.options.helper=function(){return s.helper[0]},e.target=n.currentItem[0],n._mouseCapture(e,!0),n._mouseStart(e,!0,!0),n.offset.click.top=i.offset.click.top,n.offset.click.left=i.offset.click.left,n.offset.parent.left-=i.offset.parent.left-n.offset.parent.left,n.offset.parent.top-=i.offset.parent.top-n.offset.parent.top,i._trigger("toSortable",e),i.dropped=n.element,t.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,n.fromOutside=i),n.currentItem&&(n._mouseDrag(e),s.position=n.position)):n.isOver&&(n.isOver=0,n.cancelHelperRemoval=!0,n.options._revert=n.options.revert,n.options.revert=!1,n._trigger("out",e,n._uiHash(n)),n._mouseStop(e,!0),n.options.revert=n.options._revert,n.options.helper=n.options._helper,n.placeholder&&n.placeholder.remove(),s.helper.appendTo(i._parent),i._refreshOffsets(e),s.position=i._generatePosition(e,!0),i._trigger("fromSortable",e),i.dropped=!1,t.each(i.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,s,i){var o=t("body"),n=i.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,s,i){var o=i.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,s,i){var o=t(s.helper),n=i.options;o.css("opacity")&&(n._opacity=o.css("opacity")),o.css("opacity",n.opacity)},stop:function(e,s,i){var o=i.options;o._opacity&&t(s.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,s){s.scrollParentNotHidden||(s.scrollParentNotHidden=s.helper.scrollParent(!1)),s.scrollParentNotHidden[0]!==s.document[0]&&"HTML"!==s.scrollParentNotHidden[0].tagName&&(s.overflowOffset=s.scrollParentNotHidden.offset())},drag:function(e,s,i){var o=i.options,n=!1,r=i.scrollParentNotHidden[0],l=i.document[0];r!==l&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+r.offsetHeight-e.pageY<o.scrollSensitivity?r.scrollTop=n=r.scrollTop+o.scrollSpeed:e.pageY-i.overflowOffset.top<o.scrollSensitivity&&(r.scrollTop=n=r.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(i.overflowOffset.left+r.offsetWidth-e.pageX<o.scrollSensitivity?r.scrollLeft=n=r.scrollLeft+o.scrollSpeed:e.pageX-i.overflowOffset.left<o.scrollSensitivity&&(r.scrollLeft=n=r.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(l).scrollTop()<o.scrollSensitivity?n=t(l).scrollTop(t(l).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(l).scrollTop())<o.scrollSensitivity&&(n=t(l).scrollTop(t(l).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(l).scrollLeft()<o.scrollSensitivity?n=t(l).scrollLeft(t(l).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(l).scrollLeft())<o.scrollSensitivity&&(n=t(l).scrollLeft(t(l).scrollLeft()+o.scrollSpeed)))),!1!==n&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,s,i){var o=i.options;i.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var e=t(this),s=e.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:s.top,left:s.left})})},drag:function(e,s,i){var o,n,r,l,a,h,p,c,f,d,g=i.options,u=g.snapTolerance,m=s.offset.left,v=m+i.helperProportions.width,_=s.offset.top,P=_+i.helperProportions.height;for(f=i.snapElements.length-1;f>=0;f--)h=(a=i.snapElements[f].left-i.margins.left)+i.snapElements[f].width,c=(p=i.snapElements[f].top-i.margins.top)+i.snapElements[f].height,v<a-u||m>h+u||P<p-u||_>c+u||!t.contains(i.snapElements[f].item.ownerDocument,i.snapElements[f].item)?(i.snapElements[f].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[f].item})),i.snapElements[f].snapping=!1):("inner"!==g.snapMode&&(o=Math.abs(p-P)<=u,n=Math.abs(c-_)<=u,r=Math.abs(a-v)<=u,l=Math.abs(h-m)<=u,o&&(s.position.top=i._convertPositionTo("relative",{top:p-i.helperProportions.height,left:0}).top),n&&(s.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),r&&(s.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),l&&(s.position.left=i._convertPositionTo("relative",{top:0,left:h}).left)),d=o||n||r||l,"outer"!==g.snapMode&&(o=Math.abs(p-_)<=u,n=Math.abs(c-P)<=u,r=Math.abs(a-m)<=u,l=Math.abs(h-v)<=u,o&&(s.position.top=i._convertPositionTo("relative",{top:p,left:0}).top),n&&(s.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),r&&(s.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),l&&(s.position.left=i._convertPositionTo("relative",{top:0,left:h-i.helperProportions.width}).left)),!i.snapElements[f].snapping&&(o||n||r||l||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[f].item})),i.snapElements[f].snapping=o||n||r||l||d)}}),t.ui.plugin.add("draggable","stack",{start:function(e,s,i){var o,n=i.options,r=t.makeArray(t(n.stack)).sort(function(e,s){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(s).css("zIndex"),10)||0)});r.length&&(o=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each(function(e){t(this).css("zIndex",o+e)}),this.css("zIndex",o+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,s,i){var o=t(s.helper),n=i.options;o.css("zIndex")&&(n._zIndex=o.css("zIndex")),o.css("zIndex",n.zIndex)},stop:function(e,s,i){var o=i.options;o._zIndex&&t(s.helper).css("zIndex",o._zIndex)}}),t.ui.draggable});
\ No newline at end of file
index d010827..1f959bf 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],a):a(jQuery)}(function(a){return a.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b,c=this.options,d=c.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(d)?d:function(a){return a.is(d)},this.proportions=function(){return arguments.length?void(b=arguments[0]):b?b:b={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(c.scope),c.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(b){a.ui.ddmanager.droppables[b]=a.ui.ddmanager.droppables[b]||[],a.ui.ddmanager.droppables[b].push(this)},_splice:function(a){for(var b=0;b<a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];this._splice(b),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){if("accept"===b)this.accept=a.isFunction(c)?c:function(a){return a.is(c)};else if("scope"===b){var d=a.ui.ddmanager.droppables[this.options.scope];this._splice(d),this._addToManager(c)}this._super(b,c)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return!(!d||(d.currentItem||d.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var c=a(this).droppable("instance");if(c.options.greedy&&!c.options.disabled&&c.options.scope===d.options.scope&&c.accept.call(c.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(c,{offset:c.element.offset()}),c.options.tolerance,b))return e=!0,!1}),!e&&(!!this.accept.call(this.element[0],d.currentItem||d.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element)))},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(){function a(a,b,c){return a>=b&&a<b+c}return function(b,c,d,e){if(!c.offset)return!1;var f=(b.positionAbs||b.position.absolute).left+b.margins.left,g=(b.positionAbs||b.position.absolute).top+b.margins.top,h=f+b.helperProportions.width,i=g+b.helperProportions.height,j=c.offset.left,k=c.offset.top,l=j+c.proportions().width,m=k+c.proportions().height;switch(d){case"fit":return j<=f&&h<=l&&k<=g&&i<=m;case"intersect":return j<f+b.helperProportions.width/2&&h-b.helperProportions.width/2<l&&k<g+b.helperProportions.height/2&&i-b.helperProportions.height/2<m;case"pointer":return a(e.pageY,k,c.proportions().height)&&a(e.pageX,j,c.proportions().width);case"touch":return(g>=k&&g<=m||i>=k&&i<=m||g<k&&i>m)&&(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l);default:return!1}}}(),a.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions().height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions({width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight}))}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance,c)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance,c),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a(this).droppable("instance").options.scope===e}),f.length&&(d=a(f[0]).droppable("instance"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}},a.ui.droppable});
\ No newline at end of file
+!function(e){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],e):e(jQuery)}(function(e){return e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,o=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))return o=!0,!1}),!o&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&e<t+i}return function(t,i,s,o){if(!i.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,l=r+t.helperProportions.height,p=i.offset.left,h=i.offset.top,c=p+i.proportions().width,d=h+i.proportions().height;switch(s){case"fit":return p<=n&&a<=c&&h<=r&&l<=d;case"intersect":return p<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<r+t.helperProportions.height/2&&l-t.helperProportions.height/2<d;case"pointer":return e(o.pageY,h,i.proportions().height)&&e(o.pageX,p,i.proportions().width);case"touch":return(r>=h&&r<=d||l>=h&&l<=d||r<h&&l>d)&&(n>=p&&n<=c||a>=p&&a<=c||n<p&&a>c);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,i){var s,o,n=e.ui.ddmanager.droppables[t.options.scope]||[],r=i?i.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;s<n.length;s++)if(!(n[s].options.disabled||t&&!n[s].accept.call(n[s].element[0],t.currentItem||t.element))){for(o=0;o<a.length;o++)if(a[o]===n[s].element[0]){n[s].proportions().height=0;continue e}n[s].visible="none"!==n[s].element.css("display"),n[s].visible&&("mousedown"===r&&n[s]._activate.call(n[s],i),n[s].offset=n[s].element.offset(),n[s].proportions({width:n[s].element[0].offsetWidth,height:n[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,o,n,r=e.ui.intersect(t,this,this.options.tolerance,i),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===o})).length&&((s=e(n[0]).droppable("instance")).greedyChild="isover"===a)),s&&"isover"===a&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),s&&"isout"===a&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable});
\ No newline at end of file
index e8a8da2..3eab062 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).mouseup(function(){b=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),b=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
\ No newline at end of file
+!function(e){"function"==typeof define&&define.amd?define(["jquery","./widget"],e):e(jQuery)}(function(e){var t=!1;return e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(s){if(!0===e.data(s.target,t.widgetName+".preventClickEvent"))return e.removeData(s.target,t.widgetName+".preventClickEvent"),s.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(s){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(s),this._mouseDownEvent=s;var i=this,o=1===s.which,u=!("string"!=typeof this.options.cancel||!s.target.nodeName)&&e(s.target).closest(this.options.cancel).length;return!(o&&!u&&this._mouseCapture(s))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(s)&&this._mouseDelayMet(s)&&(this._mouseStarted=!1!==this._mouseStart(s),!this._mouseStarted)?(s.preventDefault(),!0):(!0===e.data(s.target,this.widgetName+".preventClickEvent")&&e.removeData(s.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),s.preventDefault(),t=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(s){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,s.target===this._mouseDownEvent.target&&e.data(s.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(s)),t=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
\ No newline at end of file
index 6f74699..321ec6e 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());"right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:c<0?"left":b>0?"right":"center",vertical:f<0?"top":d>0?"bottom":"middle"};p<l&&h(b+c)<p&&(i.horizontal="center"),q<m&&h(d+f)<q&&(i.vertical="middle"),g(h(b),h(c))>g(h(d),h(f))?i.important="horizontal":i.important="vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&j<=0?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):j>0&&i<=0?a.left=e:i>j?a.left=e+f-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&j<=0?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):j>0&&i<=0?a.top=e:i>j?a.top=e+f-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];k<0?(c=a.left+m+n+o+b.collisionWidth-g-f,(c<0||c<h(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||h(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];k<0?(d=a.top+n+o+p+b.collisionHeight-g-f,(d<0||d<h(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||h(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position});
\ No newline at end of file
+!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return function(){t.ui=t.ui||{};var i,e,o=Math.max,n=Math.abs,l=Math.round,f=/left|center|right/,s=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,p=/%$/,c=t.fn.position;function d(t,i,e){return[parseFloat(t[0])*(p.test(t[0])?i/100:1),parseFloat(t[1])*(p.test(t[1])?e/100:1)]}function a(i,e){return parseInt(t.css(i,e),10)||0}t.position={scrollbarWidth:function(){if(void 0!==i)return i;var e,o,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),l=n.children()[0];return t("body").append(n),e=l.offsetWidth,n.css("overflow","scroll"),e===(o=l.offsetWidth)&&(o=n[0].clientWidth),n.remove(),i=e-o},getScrollInfo:function(i){var e=i.isWindow||i.isDocument?"":i.element.css("overflow-x"),o=i.isWindow||i.isDocument?"":i.element.css("overflow-y"),n="scroll"===e||"auto"===e&&i.width<i.element[0].scrollWidth;return{width:"scroll"===o||"auto"===o&&i.height<i.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(i){var e=t(i||window),o=t.isWindow(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:o,isDocument:n,offset:e.offset()||{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:o||n?e.width():e.outerWidth(),height:o||n?e.height():e.outerHeight()}}},t.fn.position=function(i){if(!i||!i.of)return c.apply(this,arguments);i=t.extend({},i);var p,g,u,m,w,W,y,v,b=t(i.of),H=t.position.getWithinInfo(i.within),x=t.position.getScrollInfo(H),T=(i.collision||"flip").split(" "),L={};return W=9===(v=(y=b)[0]).nodeType?{width:y.width(),height:y.height(),offset:{top:0,left:0}}:t.isWindow(v)?{width:y.width(),height:y.height(),offset:{top:y.scrollTop(),left:y.scrollLeft()}}:v.preventDefault?{width:0,height:0,offset:{top:v.pageY,left:v.pageX}}:{width:y.outerWidth(),height:y.outerHeight(),offset:y.offset()},b[0].preventDefault&&(i.at="left top"),g=W.width,u=W.height,m=W.offset,w=t.extend({},m),t.each(["my","at"],function(){var t,e,o=(i[this]||"").split(" ");1===o.length&&(o=f.test(o[0])?o.concat(["center"]):s.test(o[0])?["center"].concat(o):["center","center"]),o[0]=f.test(o[0])?o[0]:"center",o[1]=s.test(o[1])?o[1]:"center",t=h.exec(o[0]),e=h.exec(o[1]),L[this]=[t?t[0]:0,e?e[0]:0],i[this]=[r.exec(o[0])[0],r.exec(o[1])[0]]}),1===T.length&&(T[1]=T[0]),"right"===i.at[0]?w.left+=g:"center"===i.at[0]&&(w.left+=g/2),"bottom"===i.at[1]?w.top+=u:"center"===i.at[1]&&(w.top+=u/2),p=d(L.at,g,u),w.left+=p[0],w.top+=p[1],this.each(function(){var f,s,h=t(this),r=h.outerWidth(),c=h.outerHeight(),W=a(this,"marginLeft"),y=a(this,"marginTop"),v=r+W+a(this,"marginRight")+x.width,P=c+y+a(this,"marginBottom")+x.height,D=t.extend({},w),I=d(L.my,h.outerWidth(),h.outerHeight());"right"===i.my[0]?D.left-=r:"center"===i.my[0]&&(D.left-=r/2),"bottom"===i.my[1]?D.top-=c:"center"===i.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],e||(D.left=l(D.left),D.top=l(D.top)),f={marginLeft:W,marginTop:y},t.each(["left","top"],function(e,o){t.ui.position[T[e]]&&t.ui.position[T[e]][o](D,{targetWidth:g,targetHeight:u,elemWidth:r,elemHeight:c,collisionPosition:f,collisionWidth:v,collisionHeight:P,offset:[p[0]+I[0],p[1]+I[1]],my:i.my,at:i.at,within:H,elem:h})}),i.using&&(s=function(t){var e=m.left-D.left,l=e+g-r,f=m.top-D.top,s=f+u-c,p={target:{element:b,left:m.left,top:m.top,width:g,height:u},element:{element:h,left:D.left,top:D.top,width:r,height:c},horizontal:l<0?"left":e>0?"right":"center",vertical:s<0?"top":f>0?"bottom":"middle"};g<r&&n(e+l)<g&&(p.horizontal="center"),u<c&&n(f+s)<u&&(p.vertical="middle"),o(n(e),n(l))>o(n(f),n(s))?p.important="horizontal":p.important="vertical",i.using.call(this,t,p)}),h.offset(t.extend(D,{using:s}))})},t.ui.position={fit:{left:function(t,i){var e,n=i.within,l=n.isWindow?n.scrollLeft:n.offset.left,f=n.width,s=t.left-i.collisionPosition.marginLeft,h=l-s,r=s+i.collisionWidth-f-l;i.collisionWidth>f?h>0&&r<=0?(e=t.left+h+i.collisionWidth-f-l,t.left+=h-e):t.left=r>0&&h<=0?l:h>r?l+f-i.collisionWidth:l:h>0?t.left+=h:r>0?t.left-=r:t.left=o(t.left-s,t.left)},top:function(t,i){var e,n=i.within,l=n.isWindow?n.scrollTop:n.offset.top,f=i.within.height,s=t.top-i.collisionPosition.marginTop,h=l-s,r=s+i.collisionHeight-f-l;i.collisionHeight>f?h>0&&r<=0?(e=t.top+h+i.collisionHeight-f-l,t.top+=h-e):t.top=r>0&&h<=0?l:h>r?l+f-i.collisionHeight:l:h>0?t.top+=h:r>0?t.top-=r:t.top=o(t.top-s,t.top)}},flip:{left:function(t,i){var e,o,l=i.within,f=l.offset.left+l.scrollLeft,s=l.width,h=l.isWindow?l.scrollLeft:l.offset.left,r=t.left-i.collisionPosition.marginLeft,p=r-h,c=r+i.collisionWidth-s-h,d="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,a="left"===i.at[0]?i.targetWidth:"right"===i.at[0]?-i.targetWidth:0,g=-2*i.offset[0];p<0?((e=t.left+d+a+g+i.collisionWidth-s-f)<0||e<n(p))&&(t.left+=d+a+g):c>0&&((o=t.left-i.collisionPosition.marginLeft+d+a+g-h)>0||n(o)<c)&&(t.left+=d+a+g)},top:function(t,i){var e,o,l=i.within,f=l.offset.top+l.scrollTop,s=l.height,h=l.isWindow?l.scrollTop:l.offset.top,r=t.top-i.collisionPosition.marginTop,p=r-h,c=r+i.collisionHeight-s-h,d="top"===i.my[1]?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,a="top"===i.at[1]?i.targetHeight:"bottom"===i.at[1]?-i.targetHeight:0,g=-2*i.offset[1];p<0?((o=t.top+d+a+g+i.collisionHeight-s-f)<0||o<n(p))&&(t.top+=d+a+g):c>0&&((e=t.top-i.collisionPosition.marginTop+d+a+g-h)>0||n(e)<c)&&(t.top+=d+a+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var i,o,n,l,f,s=document.getElementsByTagName("body")[0],h=document.createElement("div");for(f in i=document.createElement(s?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"}),n)i.style[f]=n[f];i.appendChild(h),(o=s||document.documentElement).insertBefore(i,o.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",l=t(h).offset().left,e=l>10&&l<11,i.innerHTML="",o.removeChild(i)}()}(),t.ui.position});
\ No newline at end of file
index 496b2de..d8225ce 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),g.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),!!i&&(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.position.top+this.size.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];b<4;b++)c[b]=parseInt(d[b],10)||0,c[b]+=parseInt(e[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((o-k<=0||n-j<=0)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});
\ No newline at end of file
+!function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(i,e){if("hidden"===t(i).css("overflow"))return!1;var s,h=e&&"left"===e?"scrollLeft":"scrollTop";return i[h]>0||(i[h]=1,s=i[h]>0,i[h]=0,s)},_create:function(){var i,e,s,h,n=this,o=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=o.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s=t.trim(i[e]),(h=t("<div class='ui-resizable-handle "+("ui-resizable-"+s)+"'></div>")).css({zIndex:o.zIndex}),"se"===s&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(h);this._renderAxis=function(i){var e,s,h,o;for(e in i=i||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=t(this.handles[e]),this._on(this.handles[e],{mousedown:n._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[e],this.element),o=/sw|ne|nw|se|n|s/.test(e)?s.outerHeight():s.outerWidth(),h=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),i.css(h,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){n.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),n.axis=h&&h[1]?h[1]:"se")}),o.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||(t(this).removeClass("ui-resizable-autohide"),n._handles.show())}).mouseleave(function(){o.disabled||n.resizing||(t(this).addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var i,e=function(i){t(i).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(e(this.element),i=this.element,this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_mouseCapture:function(i){var e,s,h=!1;for(e in this.handles)((s=t(this.handles[e])[0])===i.target||t.contains(s,i.target))&&(h=!0);return!this.options.disabled&&h},_mouseStart:function(i){var e,s,h,n=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),n.containment&&(e+=t(n.containment).scrollLeft()||0,s+=t(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:e,top:s},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,h=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===h?this.axis+"-resize":h),o.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(i){var e,s,h=this.originalMousePosition,n=this.axis,o=i.pageX-h.left||0,a=i.pageY-h.top||0,l=this._change[n];return this._updatePrevProperties(),!!l&&(e=l.apply(this,[i,o,a]),this._updateVirtualBoundaries(i.shiftKey),(this._aspectRatio||i.shiftKey)&&(e=this._updateRatio(e,i)),e=this._respectSize(e,i),this._updateCache(e),this._propagate("resize",i),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",i,this.ui()),this._applyChanges()),!1)},_mouseStop:function(i){this.resizing=!1;var e,s,h,n,o,a,l,r=this.options,p=this;return this._helper&&(h=(s=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:p.sizeDiff.height,n=s?0:p.sizeDiff.width,o={width:p.helper.width()-n,height:p.helper.height()-h},a=parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left)||null,l=parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top)||null,r.animate||this.element.css(t.extend(o,{top:l,left:a})),p.helper.height(p.size.height),p.helper.width(p.size.width),this._helper&&!r.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",i),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var i,e,s,h,n,o=this.options;n={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||t)&&(i=n.minHeight*this.aspectRatio,s=n.minWidth/this.aspectRatio,e=n.maxHeight*this.aspectRatio,h=n.maxWidth/this.aspectRatio,i>n.minWidth&&(n.minWidth=i),s>n.minHeight&&(n.minHeight=s),e<n.maxWidth&&(n.maxWidth=e),h<n.maxHeight&&(n.maxHeight=h)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var i=this.position,e=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=i.left+(e.width-t.width),t.top=null),"nw"===s&&(t.top=i.top+(e.height-t.height),t.left=i.left+(e.width-t.width)),t},_respectSize:function(t){var i=this._vBoundaries,e=this.axis,s=this._isNumber(t.width)&&i.maxWidth&&i.maxWidth<t.width,h=this._isNumber(t.height)&&i.maxHeight&&i.maxHeight<t.height,n=this._isNumber(t.width)&&i.minWidth&&i.minWidth>t.width,o=this._isNumber(t.height)&&i.minHeight&&i.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,r=/sw|nw|w/.test(e),p=/nw|ne|n/.test(e);return n&&(t.width=i.minWidth),o&&(t.height=i.minHeight),s&&(t.width=i.maxWidth),h&&(t.height=i.maxHeight),n&&r&&(t.left=a-i.minWidth),s&&r&&(t.left=a-i.maxWidth),o&&p&&(t.top=l-i.minHeight),h&&p&&(t.top=l-i.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var i=0,e=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];i<4;i++)e[i]=parseInt(s[i],10)||0,e[i]+=parseInt(h[i],10)||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,i=0,e=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)t=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:e.height()-this.outerDimensions.height||0,width:e.width()-this.outerDimensions.width||0})},_renderProxy:function(){var i=this.element,e=this.options;this.elementOffset=i.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,i){return{width:this.originalSize.width+i}},w:function(t,i){var e=this.originalSize;return{left:this.originalPosition.left+i,width:e.width-i}},n:function(t,i,e){var s=this.originalSize;return{top:this.originalPosition.top+e,height:s.height-e}},s:function(t,i,e){return{height:this.originalSize.height+e}},se:function(i,e,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[i,e,s]))},sw:function(i,e,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[i,e,s]))},ne:function(i,e,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[i,e,s]))},nw:function(i,e,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[i,e,s]))}},_propagate:function(i,e){t.ui.plugin.call(this,i,[e,this.ui()]),"resize"!==i&&this._trigger(i,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(i){var e=t(this).resizable("instance"),s=e.options,h=e._proportionallyResizeElements,n=h.length&&/textarea/i.test(h[0].nodeName),o=n&&e._hasScroll(h[0],"left")?0:e.sizeDiff.height,a=n?0:e.sizeDiff.width,l={width:e.size.width-a,height:e.size.height-o},r=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null,p=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(t.extend(l,p&&r?{top:p,left:r}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};h&&h.length&&t(h[0]).css({width:s.width,height:s.height}),e._updateCache(s),e._propagate("resize",i)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,e,s,h,n,o,a,l=t(this).resizable("instance"),r=l.options,p=l.element,d=r.containment,g=d instanceof t?d.get(0):/parent/.test(d)?p.parent().get(0):d;g&&(l.containerElement=t(g),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(g),e=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){e[t]=l._num(i.css("padding"+s))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-e[3],width:i.innerWidth()-e[1]},s=l.containerOffset,h=l.containerSize.height,n=l.containerSize.width,o=l._hasScroll(g,"left")?g.scrollWidth:n,a=l._hasScroll(g)?g.scrollHeight:h,l.parentData={element:g,left:s.left,top:s.top,width:o,height:a}))},resize:function(i){var e,s,h,n,o=t(this).resizable("instance"),a=o.options,l=o.containerOffset,r=o.position,p=o._aspectRatio||i.shiftKey,d={top:0,left:0},g=o.containerElement,u=!0;g[0]!==document&&/static/.test(g.css("position"))&&(d=l),r.left<(o._helper?l.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-l.left:o.position.left-d.left),p&&(o.size.height=o.size.width/o.aspectRatio,u=!1),o.position.left=a.helper?l.left:0),r.top<(o._helper?l.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-l.top:o.position.top),p&&(o.size.width=o.size.height*o.aspectRatio,u=!1),o.position.top=o._helper?l.top:0),h=o.containerElement.get(0)===o.element.parent().get(0),n=/relative|absolute/.test(o.containerElement.css("position")),h&&n?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),e=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-l.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-l.top)),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,p&&(o.size.height=o.size.width/o.aspectRatio,u=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,p&&(o.size.width=o.size.height*o.aspectRatio,u=!1)),u||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var i=t(this).resizable("instance"),e=i.options,s=i.containerOffset,h=i.containerPosition,n=i.containerElement,o=t(i.helper),a=o.offset(),l=o.outerWidth()-i.sizeDiff.width,r=o.outerHeight()-i.sizeDiff.height;i._helper&&!e.animate&&/relative/.test(n.css("position"))&&t(this).css({left:a.left-h.left-s.left,width:l,height:r}),i._helper&&!e.animate&&/static/.test(n.css("position"))&&t(this).css({left:a.left-h.left-s.left,width:l,height:r})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var i=t(this).resizable("instance").options;t(i.alsoResize).each(function(){var i=t(this);i.data("ui-resizable-alsoresize",{width:parseInt(i.width(),10),height:parseInt(i.height(),10),left:parseInt(i.css("left"),10),top:parseInt(i.css("top"),10)})})},resize:function(i,e){var s=t(this).resizable("instance"),h=s.options,n=s.originalSize,o=s.originalPosition,a={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};t(h.alsoResize).each(function(){var i=t(this),s=t(this).data("ui-resizable-alsoresize"),h={},n=i.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(n,function(t,i){var e=(s[i]||0)+(a[i]||0);e&&e>=0&&(h[i]=e||null)}),i.css(h)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var i=t(this).resizable("instance"),e=i.options,s=i.size;i.ghost=i.originalElement.clone(),i.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof e.ghost?e.ghost:""),i.ghost.appendTo(i.helper)},resize:function(){var i=t(this).resizable("instance");i.ghost&&i.ghost.css({position:"relative",height:i.size.height,width:i.size.width})},stop:function(){var i=t(this).resizable("instance");i.ghost&&i.helper&&i.helper.get(0).removeChild(i.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var i,e=t(this).resizable("instance"),s=e.options,h=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,r=l[0]||1,p=l[1]||1,d=Math.round((h.width-n.width)/r)*r,g=Math.round((h.height-n.height)/p)*p,u=n.width+d,m=n.height+g,f=s.maxWidth&&s.maxWidth<u,c=s.maxHeight&&s.maxHeight<m,z=s.minWidth&&s.minWidth>u,w=s.minHeight&&s.minHeight>m;s.grid=l,z&&(u+=r),w&&(m+=p),f&&(u-=r),c&&(m-=p),/^(se|s|e)$/.test(a)?(e.size.width=u,e.size.height=m):/^(ne)$/.test(a)?(e.size.width=u,e.size.height=m,e.position.top=o.top-g):/^(sw)$/.test(a)?(e.size.width=u,e.size.height=m,e.position.left=o.left-d):((m-p<=0||u-r<=0)&&(i=e._getPaddingPlusBorderDimensions(this)),m-p>0?(e.size.height=m,e.position.top=o.top-g):(m=p-i.height,e.size.height=m,e.position.top=o.top+n.height-m),u-r>0?(e.size.width=u,e.position.left=o.left-d):(u=r-i.width,e.size.width=u,e.position.left=o.left+n.width-u))}}),t.ui.resizable});
\ No newline at end of file
index ebbb77d..6e855e9 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.selectable",a.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");if(e)return d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})});
\ No newline at end of file
+!function(e){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],e):e(jQuery)}(function(e){return e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,s=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){(t=e(s.options.filter,s.element[0])).addClass("ui-selectee"),t.each(function(){var t=e(this),s=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:s.left,top:s.top,right:s.left+t.outerWidth(),bottom:s.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var s=this,l=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(l.filter,this.element[0]),this._trigger("start",t),e(l.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),l.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var l=e.data(this,"selectable-item");l.startselected=!0,t.metaKey||t.ctrlKey||(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,s._trigger("unselecting",t,{unselecting:l.element}))}),e(t.target).parents().addBack().each(function(){var l,i=e.data(this,"selectable-item");if(i)return l=!t.metaKey&&!t.ctrlKey||!i.$element.hasClass("ui-selected"),i.$element.removeClass(l?"ui-unselecting":"ui-selected").addClass(l?"ui-selecting":"ui-unselecting"),i.unselecting=!l,i.selecting=l,i.selected=l,l?s._trigger("selecting",t,{selecting:i.element}):s._trigger("unselecting",t,{unselecting:i.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var s,l=this,i=this.options,n=this.opos[0],c=this.opos[1],a=t.pageX,r=t.pageY;return n>a&&(s=a,a=n,n=s),c>r&&(s=r,r=c,c=s),this.helper.css({left:n,top:c,width:a-n,height:r-c}),this.selectees.each(function(){var s=e.data(this,"selectable-item"),u=!1;s&&s.element!==l.element[0]&&("touch"===i.tolerance?u=!(s.left>a||s.right<n||s.top>r||s.bottom<c):"fit"===i.tolerance&&(u=s.left>n&&s.right<a&&s.top>c&&s.bottom<r),u?(s.selected&&(s.$element.removeClass("ui-selected"),s.selected=!1),s.unselecting&&(s.$element.removeClass("ui-unselecting"),s.unselecting=!1),s.selecting||(s.$element.addClass("ui-selecting"),s.selecting=!0,l._trigger("selecting",t,{selecting:s.element}))):(s.selecting&&((t.metaKey||t.ctrlKey)&&s.startselected?(s.$element.removeClass("ui-selecting"),s.selecting=!1,s.$element.addClass("ui-selected"),s.selected=!0):(s.$element.removeClass("ui-selecting"),s.selecting=!1,s.startselected&&(s.$element.addClass("ui-unselecting"),s.unselecting=!0),l._trigger("unselecting",t,{unselecting:s.element}))),s.selected&&(t.metaKey||t.ctrlKey||s.startselected||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,l._trigger("unselecting",t,{unselecting:s.element})))))}),!1}},_mouseStop:function(t){var s=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var l=e.data(this,"selectable-item");l.$element.removeClass("ui-unselecting"),l.unselecting=!1,l.startselected=!1,s._trigger("unselected",t,{unselected:l.element})}),e(".ui-selecting",this.element[0]).each(function(){var l=e.data(this,"selectable-item");l.$element.removeClass("ui-selecting").addClass("ui-selected"),l.selecting=!1,l.selected=!0,l.startselected=!0,s._trigger("selected",t,{selected:l.element})}),this._trigger("stop",t),this.helper.remove(),!1}})});
\ No newline at end of file
index a758758..f99aea6 100644 (file)
@@ -1 +1 @@
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(a){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;g<h;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget});
\ No newline at end of file
+!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e,i=0,n=Array.prototype.slice;return t.cleanData=(e=t.cleanData,function(i){var n,s,o;for(o=0;null!=(s=i[o]);o++)try{(n=t._data(s,"events"))&&n.remove&&t(s).triggerHandler("remove")}catch(t){}e(i)}),t.widget=function(e,i,n){var s,o,r,a,u={},d=e.split(".")[0];return e=e.split(".")[1],s=d+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[d]=t[d]||{},o=t[d][e],r=t[d][e]=function(t,e){if(!this._createWidget)return new r(t,e);arguments.length&&this._createWidget(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(n,function(e,n){var s,o;t.isFunction(n)?u[e]=(s=function(){return i.prototype[e].apply(this,arguments)},o=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}):u[e]=n}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o&&a.widgetEventPrefix||e},u,{constructor:r,namespace:d,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,s,o=n.call(arguments,1),r=0,a=o.length;r<a;r++)for(i in o[r])s=o[r][i],o[r].hasOwnProperty(i)&&void 0!==s&&(t.isPlainObject(s)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):e[i]=s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(o){var r="string"==typeof o,a=n.call(arguments,1),u=this;return r?this.each(function(){var i,n=t.data(this,s);return"instance"===o?(u=n,!1):n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(i=n[o].apply(n,a))!==n&&void 0!==i?(u=i&&i.jquery?u.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=t.widget.extend.apply(null,[o].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(o||{}),e._init&&e._init()):t.data(this,s,new i(o,this))})),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,s,o,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},e=(n=e.split(".")).shift(),n.length){for(s=r[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)s[n[o]]=s[n[o]]||{},s=s[n[o]];if(e=n.pop(),1===arguments.length)return void 0===s[e]?null:s[e];s[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,r){function a(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?o[r]:r).apply(o,arguments)}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++);var u=n.match(/^([\w:-]*)\s*(.*)$/),d=u[1]+o.eventNamespace,h=u[2];h?s.delegate(h,d,a):i.bind(d,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var s,o,r=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?!0===s||"number"==typeof s?i:s.effect||i:e;"number"==typeof(s=s||{})&&(s={duration:s}),r=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),r&&t.effects&&t.effects.effect[a]?n[e](s):a!==e&&n[a]?n[a](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}}),t.widget});
\ No newline at end of file
index 8f402a1..56962c1 100644 (file)
@@ -1 +1 @@
-!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.NProgress=b()}(this,function(){function a(a,b,c){return a<b?b:a>c?c:a}function b(a){return 100*(-1+a)}function c(a,c,d){var e;return e="translate3d"===j.positionUsing?{transform:"translate3d("+b(a)+"%,0,0)"}:"translate"===j.positionUsing?{transform:"translate("+b(a)+"%,0)"}:{"margin-left":b(a)+"%"},e.transition="all "+c+"ms "+d,e}function d(a,b){var c="string"==typeof a?a:g(a);return c.indexOf(" "+b+" ")>=0}function e(a,b){var c=g(a),e=c+b;d(c,b)||(a.className=e.substring(1))}function f(a,b){var c,e=g(a);d(a,b)&&(c=e.replace(" "+b+" "," "),a.className=c.substring(1,c.length-1))}function g(a){return(" "+(a.className||"")+" ").replace(/\s+/gi," ")}function h(a){a&&a.parentNode&&a.parentNode.removeChild(a)}var i={};i.version="0.2.0";var j=i.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};i.configure=function(a){var b,c;for(b in a)c=a[b],void 0!==c&&a.hasOwnProperty(b)&&(j[b]=c);return this},i.status=null,i.set=function(b){var d=i.isStarted();b=a(b,j.minimum,1),i.status=1===b?null:b;var e=i.render(!d),f=e.querySelector(j.barSelector),g=j.speed,h=j.easing;return e.offsetWidth,k(function(a){""===j.positionUsing&&(j.positionUsing=i.getPositioningCSS()),l(f,c(b,g,h)),1===b?(l(e,{transition:"none",opacity:1}),e.offsetWidth,setTimeout(function(){l(e,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){i.remove(),a()},g)},g)):setTimeout(a,g)}),this},i.isStarted=function(){return"number"==typeof i.status},i.start=function(){i.status||i.set(0);var a=function(){setTimeout(function(){i.status&&(i.trickle(),a())},j.trickleSpeed)};return j.trickle&&a(),this},i.done=function(a){return a||i.status?i.inc(.3+.5*Math.random()).set(1):this},i.inc=function(b){var c=i.status;return c?("number"!=typeof b&&(b=(1-c)*a(Math.random()*c,.1,.95)),c=a(c+b,0,.994),i.set(c)):i.start()},i.trickle=function(){return i.inc(Math.random()*j.trickleRate)},function(){var a=0,b=0;i.promise=function(c){return c&&"resolved"!==c.state()?(0===b&&i.start(),a++,b++,c.always(function(){b--,0===b?(a=0,i.done()):i.set((a-b)/a)}),this):this}}(),i.render=function(a){if(i.isRendered())return document.getElementById("nprogress");e(document.documentElement,"nprogress-busy");var c=document.createElement("div");c.id="nprogress",c.innerHTML=j.template;var d,f=c.querySelector(j.barSelector),g=a?"-100":b(i.status||0),k=document.querySelector(j.parent);return l(f,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),j.showSpinner||(d=c.querySelector(j.spinnerSelector),d&&h(d)),k!=document.body&&e(k,"nprogress-custom-parent"),k.appendChild(c),c},i.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(j.parent),"nprogress-custom-parent");var a=document.getElementById("nprogress");a&&h(a)},i.isRendered=function(){return!!document.getElementById("nprogress")},i.getPositioningCSS=function(){var a=document.body.style,b="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return b+"Perspective"in a?"translate3d":b+"Transform"in a?"translate":"margin"};var k=function(){function a(){var c=b.shift();c&&c(a)}var b=[];return function(c){b.push(c),1==b.length&&a()}}(),l=function(){function a(a){return a.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,b){return b.toUpperCase()})}function b(a){var b=document.body.style;if(a in b)return a;for(var c,d=e.length,f=a.charAt(0).toUpperCase()+a.slice(1);d--;)if(c=e[d]+f,c in b)return c;return a}function c(c){return c=a(c),f[c]||(f[c]=b(c))}function d(a,b,d){b=c(b),a.style[b]=d}var e=["Webkit","O","Moz","ms"],f={};return function(a,b){var c,e,f=arguments;if(2==f.length)for(c in b)e=b[c],void 0!==e&&b.hasOwnProperty(c)&&d(a,c,e);else d(a,f[1],f[2])}}();return i});
\ No newline at end of file
+!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():e.NProgress=n()}(this,function(){var e,n,t={version:"0.2.0"},r=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function i(e,n,t){return e<n?n:e>t?t:e}function s(e){return 100*(-1+e)}t.configure=function(e){var n,t;for(n in e)void 0!==(t=e[n])&&e.hasOwnProperty(n)&&(r[n]=t);return this},t.status=null,t.set=function(e){var n=t.isStarted();e=i(e,r.minimum,1),t.status=1===e?null:e;var u=t.render(!n),c=u.querySelector(r.barSelector),l=r.speed,f=r.easing;return u.offsetWidth,o(function(n){""===r.positionUsing&&(r.positionUsing=t.getPositioningCSS()),a(c,function(e,n,t){var i;i="translate3d"===r.positionUsing?{transform:"translate3d("+s(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+s(e)+"%,0)"}:{"margin-left":s(e)+"%"};return i.transition="all "+n+"ms "+t,i}(e,l,f)),1===e?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout(function(){a(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout(function(){t.remove(),n()},l)},l)):setTimeout(n,l)}),this},t.isStarted=function(){return"number"==typeof t.status},t.start=function(){t.status||t.set(0);var e=function(){setTimeout(function(){t.status&&(t.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var n=t.status;return n?("number"!=typeof e&&(e=(1-n)*i(Math.random()*n,.1,.95)),n=i(n+e,0,.994),t.set(n)):t.start()},t.trickle=function(){return t.inc(Math.random()*r.trickleRate)},e=0,n=0,t.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&t.start(),e++,n++,r.always(function(){0==--n?(e=0,t.done()):t.set((e-n)/e)}),this):this},t.render=function(e){if(t.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=r.template;var i,o=n.querySelector(r.barSelector),u=e?"-100":s(t.status||0),l=document.querySelector(r.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(i=n.querySelector(r.spinnerSelector))&&d(i),l!=document.body&&c(l,"nprogress-custom-parent"),l.appendChild(n),n},t.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var e=document.body.style,n="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return n+"Perspective"in e?"translate3d":n+"Transform"in e?"translate":"margin"};var o=function(){var e=[];function n(){var t=e.shift();t&&t(n)}return function(t){e.push(t),1==e.length&&n()}}(),a=function(){var e=["Webkit","O","Moz","ms"],n={};function t(t){return t=t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,n){return n.toUpperCase()}),n[t]||(n[t]=function(n){var t=document.body.style;if(n in t)return n;for(var r,i=e.length,s=n.charAt(0).toUpperCase()+n.slice(1);i--;)if((r=e[i]+s)in t)return r;return n}(t))}function r(e,n,r){n=t(n),e.style[n]=r}return function(e,n){var t,i,s=arguments;if(2==s.length)for(t in n)void 0!==(i=n[t])&&n.hasOwnProperty(t)&&r(e,t,i);else r(e,s[1],s[2])}}();function u(e,n){return("string"==typeof e?e:f(e)).indexOf(" "+n+" ")>=0}function c(e,n){var t=f(e),r=t+n;u(t,n)||(e.className=r.substring(1))}function l(e,n){var t,r=f(e);u(e,n)&&(t=r.replace(" "+n+" "," "),e.className=t.substring(1,t.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return t});
\ No newline at end of file
index 38c1a9e..31bde43 100644 (file)
@@ -1 +1 @@
-var requirejs,require,define;!function(global,setTimeout){function commentReplace(a,b){return b||""}function isFunction(a){return"[object Function]"===ostring.call(a)}function isArray(a){return"[object Array]"===ostring.call(a)}function each(a,b){if(a){var c;for(c=0;c<a.length&&(!a[c]||!b(a[c],c,a));c+=1);}}function eachReverse(a,b){if(a){var c;for(c=a.length-1;c>-1&&(!a[c]||!b(a[c],c,a));c-=1);}}function hasProp(a,b){return hasOwn.call(a,b)}function getOwn(a,b){return hasProp(a,b)&&a[b]}function eachProp(a,b){var c;for(c in a)if(hasProp(a,c)&&b(a[c],c))break}function mixin(a,b,c,d){return b&&eachProp(b,function(b,e){!c&&hasProp(a,e)||(!d||"object"!=typeof b||!b||isArray(b)||isFunction(b)||b instanceof RegExp?a[e]=b:(a[e]||(a[e]={}),mixin(a[e],b,c,d)))}),a}function bind(a,b){return function(){return b.apply(a,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(a){throw a}function getGlobal(a){if(!a)return a;var b=global;return each(a.split("."),function(a){b=b[a]}),b}function makeError(a,b,c,d){var e=new Error(b+"\nhttp://requirejs.org/docs/errors.html#"+a);return e.requireType=a,e.requireModules=d,c&&(e.originalError=c),e}function newContext(a){function b(a){var b,c;for(b=0;b<a.length;b++)if(c=a[b],"."===c)a.splice(b,1),b-=1;else if(".."===c){if(0===b||1===b&&".."===a[2]||".."===a[b-1])continue;b>0&&(a.splice(b-1,2),b-=2)}}function c(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q=c&&c.split("/"),r=x.map,s=r&&r["*"];if(a&&(a=a.split("/"),k=a.length-1,x.nodeIdCompat&&jsSuffixRegExp.test(a[k])&&(a[k]=a[k].replace(jsSuffixRegExp,"")),"."===a[0].charAt(0)&&q&&(p=q.slice(0,q.length-1),a=p.concat(a)),b(a),a=a.join("/")),d&&r&&(q||s)){g=a.split("/");a:for(h=g.length;h>0;h-=1){if(j=g.slice(0,h).join("/"),q)for(i=q.length;i>0;i-=1)if(f=getOwn(r,q.slice(0,i).join("/")),f&&(f=getOwn(f,j))){l=f,m=h;break a}!n&&s&&getOwn(s,j)&&(n=getOwn(s,j),o=h)}!l&&n&&(l=n,m=o),l&&(g.splice(0,m,l),a=g.join("/"))}return e=getOwn(x.pkgs,a),e?e:a}function d(a){isBrowser&&each(scripts(),function(b){if(b.getAttribute("data-requiremodule")===a&&b.getAttribute("data-requirecontext")===u.contextName)return b.parentNode.removeChild(b),!0})}function e(a){var b=getOwn(x.paths,a);if(b&&isArray(b)&&b.length>1)return b.shift(),u.require.undef(a),u.makeRequire(null,{skipMap:!0})([a]),!0}function f(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function g(a,b,d,e){var g,h,i,j,k=null,l=b?b.name:null,m=a,n=!0,o="";return a||(n=!1,a="_@r"+(F+=1)),j=f(a),k=j[0],a=j[1],k&&(k=c(k,l,e),h=getOwn(C,k)),a&&(k?o=d?a:h&&h.normalize?h.normalize(a,function(a){return c(a,l,e)}):a.indexOf("!")===-1?c(a,l,e):a:(o=c(a,l,e),j=f(o),k=j[0],o=j[1],d=!0,g=u.nameToUrl(o))),i=!k||h||d?"":"_unnormalized"+(G+=1),{prefix:k,name:o,parentMap:b,unnormalized:!!i,url:g,originalName:m,isDefine:n,id:(k?k+"!"+o:o)+i}}function h(a){var b=a.id,c=getOwn(y,b);return c||(c=y[b]=new u.Module(a)),c}function i(a,b,c){var d=a.id,e=getOwn(y,d);!hasProp(C,d)||e&&!e.defineEmitComplete?(e=h(a),e.error&&"error"===b?c(e.error):e.on(b,c)):"defined"===b&&c(C[d])}function j(a,b){var c=a.requireModules,d=!1;b?b(a):(each(c,function(b){var c=getOwn(y,b);c&&(c.error=a,c.events.error&&(d=!0,c.emit("error",a)))}),d||req.onError(a))}function k(){globalDefQueue.length&&(each(globalDefQueue,function(a){var b=a[0];"string"==typeof b&&(u.defQueueMap[b]=!0),B.push(a)}),globalDefQueue=[])}function l(a){delete y[a],delete z[a]}function m(a,b,c){var d=a.map.id;a.error?a.emit("error",a.error):(b[d]=!0,each(a.depMaps,function(d,e){var f=d.id,g=getOwn(y,f);!g||a.depMatched[e]||c[f]||(getOwn(b,f)?(a.defineDep(e,C[f]),a.check()):m(g,b,c))}),c[d]=!0)}function n(){var a,b,c=1e3*x.waitSeconds,f=c&&u.startTime+c<(new Date).getTime(),g=[],h=[],i=!1,k=!0;if(!s){if(s=!0,eachProp(z,function(a){var c=a.map,j=c.id;if(a.enabled&&(c.isDefine||h.push(a),!a.error))if(!a.inited&&f)e(j)?(b=!0,i=!0):(g.push(j),d(j));else if(!a.inited&&a.fetched&&c.isDefine&&(i=!0,!c.prefix))return k=!1}),f&&g.length)return a=makeError("timeout","Load timeout for modules: "+g,null,g),a.contextName=u.contextName,j(a);k&&each(h,function(a){m(a,{},{})}),f&&!b||!i||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,n()},50)),s=!1}}function o(a){hasProp(C,a[0])||h(g(a[0],null,!0)).init(a[1],a[2])}function p(a,b,c,d){a.detachEvent&&!isOpera?d&&a.detachEvent(d,b):a.removeEventListener(c,b,!1)}function q(a){var b=a.currentTarget||a.srcElement;return p(b,u.onScriptLoad,"load","onreadystatechange"),p(b,u.onScriptError,"error"),{node:b,id:b&&b.getAttribute("data-requiremodule")}}function r(){var a;for(k();B.length;){if(a=B.shift(),null===a[0])return j(makeError("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));o(a)}u.defQueueMap={}}var s,t,u,v,w,x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},y={},z={},A={},B=[],C={},D={},E={},F=1,G=1;return v={require:function(a){return a.require?a.require:a.require=u.makeRequire(a.map)},exports:function(a){if(a.usingExports=!0,a.map.isDefine)return a.exports?C[a.map.id]=a.exports:a.exports=C[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return getOwn(x.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}},t=function(a){this.events=getOwn(A,a.id)||{},this.map=a,this.shim=getOwn(x.shim,a.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},t.prototype={init:function(a,b,c,d){d=d||{},this.inited||(this.factory=b,c?this.on("error",c):this.events.error&&(c=bind(this,function(a){this.emit("error",a)})),this.depMaps=a&&a.slice(0),this.errback=c,this.inited=!0,this.ignore=d.ignore,d.enabled||this.enabled?this.enable():this.check())},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=(new Date).getTime();var a=this.map;return this.shim?void u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return a.prefix?this.callPlugin():this.load()})):a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;D[a]||(D[a]=!0,u.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id,d=this.depExports,e=this.exports,f=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{e=u.execCb(c,f,d,e)}catch(b){a=b}else e=u.execCb(c,f,d,e);if(this.map.isDefine&&void 0===e&&(b=this.module,b?e=b.exports:this.usingExports&&(e=this.exports)),a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",j(this.error=a)}else e=f;if(this.exports=e,this.map.isDefine&&!this.ignore&&(C[c]=e,req.onResourceLoad)){var g=[];each(this.depMaps,function(a){g.push(a.normalizedMap||a)}),req.onResourceLoad(u,this.map,g)}l(c),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(u.defQueueMap,c)||this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=g(a.prefix);this.depMaps.push(d),i(d,"defined",bind(this,function(d){var e,f,k,m=getOwn(E,this.map.id),n=this.map.name,o=this.map.parentMap?this.map.parentMap.name:null,p=u.makeRequire(a.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(d.normalize&&(n=d.normalize(n,function(a){return c(a,o,!0)})||""),f=g(a.prefix+"!"+n,this.map.parentMap,!0),i(f,"defined",bind(this,function(a){this.map.normalizedMap=f,this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),k=getOwn(y,f.id),void(k&&(this.depMaps.push(f),this.events.error&&k.on("error",bind(this,function(a){this.emit("error",a)})),k.enable()))):m?(this.map.url=u.nameToUrl(m),void this.load()):(e=bind(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),e.error=bind(this,function(a){this.inited=!0,this.error=a,a.requireModules=[b],eachProp(y,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&l(a.map.id)}),j(a)}),e.fromText=bind(this,function(c,d){var f=a.name,i=g(f),k=useInteractive;d&&(c=d),k&&(useInteractive=!1),h(i),hasProp(x.config,b)&&(x.config[f]=x.config[b]);try{req.exec(c)}catch(a){return j(makeError("fromtexteval","fromText eval for "+b+" failed: "+a,a,[b]))}k&&(useInteractive=!0),this.depMaps.push(i),u.completeLoad(f),p([f],e)}),void d.load(a.name,p,e,x))})),u.enable(d,this),this.pluginMaps[d.id]=d},enable:function(){z[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(a,b){var c,d,e;if("string"==typeof a){if(a=g(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[b]=a,e=getOwn(v,a.id))return void(this.depExports[b]=e(this));this.depCount+=1,i(a,"defined",bind(this,function(a){this.undefed||(this.defineDep(b,a),this.check())})),this.errback?i(a,"error",bind(this,this.errback)):this.events.error&&i(a,"error",bind(this,function(a){this.emit("error",a)}))}c=a.id,d=y[c],hasProp(v,c)||!d||d.enabled||u.enable(a,this)})),eachProp(this.pluginMaps,bind(this,function(a){var b=getOwn(y,a.id);b&&!b.enabled&&u.enable(a,this)})),this.enabling=!1,this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]),c.push(b)},emit:function(a,b){each(this.events[a],function(a){a(b)}),"error"===a&&delete this.events[a]}},u={config:x,contextName:a,registry:y,defined:C,urlFetched:D,defQueue:B,defQueueMap:{},Module:t,makeModuleMap:g,nextTick:req.nextTick,onError:j,configure:function(a){if(a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/"),"string"==typeof a.urlArgs){var b=a.urlArgs;a.urlArgs=function(a,c){return(c.indexOf("?")===-1?"?":"&")+b}}var c=x.shim,d={paths:!0,bundles:!0,config:!0,map:!0};eachProp(a,function(a,b){d[b]?(x[b]||(x[b]={}),mixin(x[b],a,!0,!0)):x[b]=a}),a.bundles&&eachProp(a.bundles,function(a,b){each(a,function(a){a!==b&&(E[a]=b)})}),a.shim&&(eachProp(a.shim,function(a,b){isArray(a)&&(a={deps:a}),!a.exports&&!a.init||a.exportsFn||(a.exportsFn=u.makeShimExports(a)),c[b]=a}),x.shim=c),a.packages&&each(a.packages,function(a){var b,c;a="string"==typeof a?{name:a}:a,c=a.name,b=a.location,b&&(x.paths[c]=a.location),x.pkgs[c]=a.name+"/"+(a.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(y,function(a,b){a.inited||a.map.unnormalized||(a.map=g(b,null,!0))}),(a.deps||a.callback)&&u.require(a.deps||[],a.callback)},makeShimExports:function(a){function b(){var b;return a.init&&(b=a.init.apply(global,arguments)),b||a.exports&&getGlobal(a.exports)}return b},makeRequire:function(b,e){function f(c,d,i){var k,l,m;return e.enableBuildCallback&&d&&isFunction(d)&&(d.__requireJsBuild=!0),"string"==typeof c?isFunction(d)?j(makeError("requireargs","Invalid require call"),i):b&&hasProp(v,c)?v[c](y[b.id]):req.get?req.get(u,c,b,f):(l=g(c,b,!1,!0),k=l.id,hasProp(C,k)?C[k]:j(makeError("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+a+(b?"":". Use require([])")))):(r(),u.nextTick(function(){r(),m=h(g(null,b)),m.skipMap=e.skipMap,m.init(c,d,i,{enabled:!0}),n()}),f)}return e=e||{},mixin(f,{isBrowser:isBrowser,toUrl:function(a){var d,e=a.lastIndexOf("."),f=a.split("/")[0],g="."===f||".."===f;return e!==-1&&(!g||e>1)&&(d=a.substring(e,a.length),a=a.substring(0,e)),u.nameToUrl(c(a,b&&b.id,!0),d,!0)},defined:function(a){return hasProp(C,g(a,b,!1,!0).id)},specified:function(a){return a=g(a,b,!1,!0).id,hasProp(C,a)||hasProp(y,a)}}),b||(f.undef=function(a){k();var c=g(a,b,!0),e=getOwn(y,a);e.undefed=!0,d(a),delete C[a],delete D[c.url],delete A[a],eachReverse(B,function(b,c){b[0]===a&&B.splice(c,1)}),delete u.defQueueMap[a],e&&(e.events.defined&&(A[a]=e.events),l(a))}),f},enable:function(a){var b=getOwn(y,a.id);b&&h(a).enable()},completeLoad:function(a){var b,c,d,f=getOwn(x.shim,a)||{},g=f.exports;for(k();B.length;){if(c=B.shift(),null===c[0]){if(c[0]=a,b)break;b=!0}else c[0]===a&&(b=!0);o(c)}if(u.defQueueMap={},d=getOwn(y,a),!b&&!hasProp(C,a)&&d&&!d.inited){if(!(!x.enforceDefine||g&&getGlobal(g)))return e(a)?void 0:j(makeError("nodefine","No define call for "+a,null,[a]));o([a,f.deps||[],f.exportsFn])}n()},nameToUrl:function(a,b,c){var d,e,f,g,h,i,j,k=getOwn(x.pkgs,a);if(k&&(a=k),j=getOwn(E,a))return u.nameToUrl(j,b,c);if(req.jsExtRegExp.test(a))h=a+(b||"");else{for(d=x.paths,e=a.split("/"),f=e.length;f>0;f-=1)if(g=e.slice(0,f).join("/"),i=getOwn(d,g)){isArray(i)&&(i=i[0]),e.splice(0,f,i);break}h=e.join("/"),h+=b||(/^data\:|^blob\:|\?/.test(h)||c?"":".js"),h=("/"===h.charAt(0)||h.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+h}return x.urlArgs&&!/^blob\:/.test(h)?h+x.urlArgs(a,h):h},load:function(a,b){req.load(u,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||readyRegExp.test((a.currentTarget||a.srcElement).readyState)){interactiveScript=null;var b=q(a);u.completeLoad(b.id)}},onScriptError:function(a){var b=q(a);if(!e(b.id)){var c=[];return eachProp(y,function(a,d){0!==d.indexOf("_@r")&&each(a.depMaps,function(a){if(a.id===b.id)return c.push(d),!0})}),j(makeError("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}},u.require=u.makeRequire(),u}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(a){if("interactive"===a.readyState)return interactiveScript=a}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.5",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(a,b,c,d){var e,f,g=defContextName;return isArray(a)||"string"==typeof a||(f=a,isArray(b)?(a=b,b=c,c=d):a=[]),f&&f.context&&(g=f.context),e=getOwn(contexts,g),e||(e=contexts[g]=req.s.newContext(g)),f&&e.configure(f),e.require(a,b,c)},req.config=function(a){return req(a)},req.nextTick="undefined"!=typeof setTimeout?function(a){setTimeout(a,4)}:function(a){a()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(a){req[a]=function(){var b=contexts[defContextName];return b.require[a].apply(b,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(a,b,c){var d=a.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return d.type=a.scriptType||"text/javascript",d.charset="utf-8",d.async=!0,d},req.load=function(a,b,c){var d,e=a&&a.config||{};if(isBrowser)return d=req.createNode(e,b,c),d.setAttribute("data-requirecontext",a.contextName),d.setAttribute("data-requiremodule",b),!d.attachEvent||d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0||isOpera?(d.addEventListener("load",a.onScriptLoad,!1),d.addEventListener("error",a.onScriptError,!1)):(useInteractive=!0,d.attachEvent("onreadystatechange",a.onScriptLoad)),d.src=c,e.onNodeCreated&&e.onNodeCreated(d,e,b,c),currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{setTimeout(function(){},0),importScripts(c),a.completeLoad(b)}catch(d){a.onError(makeError("importscripts","importScripts failed for "+b+" at "+c,d,[b]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(a){if(head||(head=a.parentNode),dataMain=a.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf("!")!==-1||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(a,b,c){var d,e;"string"!=typeof a&&(c=b,b=a,a=null),isArray(b)||(c=b,b=null),!b&&isFunction(c)&&(b=[],c.length&&(c.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(a,c){b.push(c)}),b=(1===c.length?["require"]:["require","exports","module"]).concat(b))),useInteractive&&(d=currentlyAddingScript||getInteractiveScript(),d&&(a||(a=d.getAttribute("data-requiremodule")),e=contexts[d.getAttribute("data-requirecontext")])),e?(e.defQueue.push([a,b,c]),e.defQueueMap[a]=!0):globalDefQueue.push([a,b,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout);
\ No newline at end of file
+var requirejs,require,define;!function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.5",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return(r=req.createNode(n,t,i)).setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,n.onNodeCreated&&n.onNodeCreated(r,n,t,i),currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,i,r,n,o,a={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},d=[],p={},f={},l={},h=1,m=1;function g(e,t,i){var r,n,o,s,u,c,d,p,f,l,h=t&&t.split("/"),m=a.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(h||g)){e:for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h)for(s=h.length;s>0;s-=1)if((r=getOwn(m,h.slice(0,s).join("/")))&&(r=getOwn(r,u))){d=r,p=o;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=o)}!d&&f&&(d=f,p=l),d&&(n.splice(0,p,d),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0})}function x(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function q(e,t,i,n){var o,a,s,u,c=null,d=t?t.name:null,f=e,l=!0,v="";return e||(l=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,d,n),a=getOwn(p,c)),e&&(c?v=i?e:a&&a.normalize?a.normalize(e,function(e){return g(e,d,n)}):-1===e.indexOf("!")?g(e,d,n):e:(c=(u=b(v=g(e,d,n)))[0],v=u[1],i=!0,o=r.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||i?"":"_unnormalized"+(m+=1)),url:o,originalName:f,isDefine:l,id:(c?c+"!"+v:v)+s}}function E(e){var t=e.id,i=getOwn(s,t);return i||(i=s[t]=new r.Module(e)),i}function w(e,t,i){var r=e.id,n=getOwn(s,r);!hasProp(p,r)||n&&!n.defineEmitComplete?(n=E(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(p[r])}function y(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,function(t){var i=getOwn(s,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))}),r||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(r.defQueueMap[t]=!0),d.push(e)}),globalDefQueue=[])}function k(e){delete s[e],delete u[e]}function M(){var e,i,n=1e3*a.waitSeconds,c=n&&r.startTime+n<(new Date).getTime(),d=[],f=[],l=!1,h=!0;if(!t){if(t=!0,eachProp(u,function(e){var t=e.map,r=t.id;if(e.enabled&&(t.isDefine||f.push(e),!e.error))if(!e.inited&&c)x(r)?(i=!0,l=!0):(d.push(r),v(r));else if(!e.inited&&e.fetched&&t.isDefine&&(l=!0,!t.prefix))return h=!1}),c&&d.length)return(e=makeError("timeout","Load timeout for modules: "+d,null,d)).contextName=r.contextName,y(e);h&&each(f,function(e){!function e(t,i,r){var n=t.map.id;t.error?t.emit("error",t.error):(i[n]=!0,each(t.depMaps,function(n,o){var a=n.id,u=getOwn(s,a);!u||t.depMatched[o]||r[a]||(getOwn(i,a)?(t.defineDep(o,p[a]),t.check()):e(u,i,r))}),r[n]=!0)}(e,{},{})}),c&&!i||!l||!isBrowser&&!isWebWorker||o||(o=setTimeout(function(){o=0,M()},50)),t=!1}}function O(e){hasProp(p,e[0])||E(q(e[0],null,!0)).init(e[1],e[2])}function j(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function P(e){var t=e.currentTarget||e.srcElement;return j(t,r.onScriptLoad,"load","onreadystatechange"),j(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function R(){var e;for(S();d.length;){if(null===(e=d.shift())[0])return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));O(e)}r.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?p[e.map.id]=e.exports:e.exports=p[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(i=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,r.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=r.execCb(i,a,n,o)}catch(t){e=t}else o=r.execCb(i,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else o=a;if(this.exports=o,this.map.isDefine&&!this.ignore&&(p[i]=o,req.onResourceLoad)){var s=[];each(this.depMaps,function(e){s.push(e.normalizedMap||e)}),req.onResourceLoad(r,this.map,s)}k(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(r.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=q(e.prefix);this.depMaps.push(i),w(i,"defined",bind(this,function(i){var n,o,u,c=getOwn(l,this.map.id),d=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,f=r.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(d=i.normalize(d,function(e){return g(e,p,!0)})||""),w(o=q(e.prefix+"!"+d,this.map.parentMap,!0),"defined",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):c?(this.map.url=r.nameToUrl(c),void this.load()):((n=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&k(e.map.id)}),y(e)}),n.fromText=bind(this,function(i,o){var s=e.name,u=q(s),c=useInteractive;o&&(i=o),c&&(useInteractive=!1),E(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(i)}catch(e){return y(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),r.completeLoad(s),f([s],n)}),void i.load(e.name,f,n,a))})),r.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,o,a;if("string"==typeof e){if(e=q(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,w(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,o=s[i],hasProp(n,i)||!o||o.enabled||r.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(s,e.id);t&&!t.enabled&&r.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},(r={config:a,contextName:e,registry:s,defined:p,urlFetched:f,defQueue:d,defQueueMap:{},Module:i,makeModuleMap:q,nextTick:req.nextTick,onError:y,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(-1===i.indexOf("?")?"?":"&")+t}}var i=a.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(l[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=r.makeShimExports(e)),i[t]=e}),a.shim=i),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(s,function(e,t){e.inited||e.map.unnormalized||(e.map=q(t,null,!0))}),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,i){function o(a,u,c){var d,f;return i.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?y(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(r,a,t,o):(d=q(a,t,!1,!0).id,hasProp(p,d)?p[d]:y(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(R(),r.nextTick(function(){R(),(f=E(q(null,t))).skipMap=i.skipMap,f.init(a,u,c,{enabled:!0}),M()}),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var i,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(i=e.substring(n,e.length),e=e.substring(0,n)),r.nameToUrl(g(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(p,q(e,t,!1,!0).id)},specified:function(e){return e=q(e,t,!1,!0).id,hasProp(p,e)||hasProp(s,e)}}),t||(o.undef=function(e){S();var i=q(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(e),delete p[e],delete f[i.url],delete c[e],eachReverse(d,function(t,i){t[0]===e&&d.splice(i,1)}),delete r.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),k(e))}),o},enable:function(e){getOwn(s,e.id)&&E(e).enable()},completeLoad:function(e){var t,i,n,o=getOwn(a.shim,e)||{},u=o.exports;for(S();d.length;){if(null===(i=d.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);O(i)}if(r.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(p,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return x(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));O([e,o.deps||[],o.exportsFn])}M()},nameToUrl:function(e,t,i){var n,o,s,u,c,d,p=getOwn(a.pkgs,e);if(p&&(e=p),d=getOwn(l,e))return r.nameToUrl(d,t,i);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data\:|^blob\:|\?/.test(u)||i?"":".js")).charAt(0)||u.match(/^[\w\+\.\-]+:/)?"":a.baseUrl)+u}return a.urlArgs&&!/^blob\:/.test(u)?u+a.urlArgs(e,u):u},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=P(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=P(e);if(!x(t.id)){var i=[];return eachProp(s,function(e,r){0!==r.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return i.push(r),!0})}),y(makeError("scripterror",'Script error for "'+t.id+(i.length?'", needed by: '+i.join(", "):'"'),e,[t.id]))}}}).require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout);
\ No newline at end of file
index ad6a34f..fb9bb31 100644 (file)
@@ -1 +1 @@
-(function(){var a,b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}},f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;d=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],c=0,d=f.length;c<d;c++)e=f[c],g.push(this.add_option(e,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if("OPTION"===a.nodeName.toUpperCase())return""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),d.select_to_array=function(a){var b,c,e,f,g;for(f=new d,g=a.childNodes,c=0,e=g.length;c<e;c++)b=g[c],f.add_node(b);return f.parsed},b=function(){function a(b,c){this.form_field=b,this.options=null!=c?c:{},this.label_click_handler=e(this.label_click_handler,this),a.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return a.prototype.set_default_values=function(){return this.click_test_action=function(a){return function(b){return a.test_active_click(b)}}(this),this.activate_action=function(a){return function(b){return a.activate_field(b)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},a.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||a.default_no_result_text},a.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(a){if(this.is_multiple){if(!this.active_field)return setTimeout(function(a){return function(){return a.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},a.prototype.input_blur=function(a){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(a){return function(){return a.blur_test()}}(this),100)},a.prototype.label_click_handler=function(a){return this.is_multiple?this.container_mousedown(a):this.activate_field()},a.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",h=0,g=this.results_data,e=0,f=g.length;e<f&&(c=g[e],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(h++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(h>=this.max_shown_results));e++);return b},a.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.highlighted_html||a.html,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.highlighted_html||this.escape_html(a.label),a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},a.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(c=this.results_data,e=[],a=0,b=c.length;a<b;a++)d=c[a],d.selected?e.push(d.selected=!1):e.push(void 0);return e},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;for(this.no_results_clear(),j=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=this.get_search_regex(a),h=this.results_data,c=0,d=h.length;c<d;c++)e=h[c],e.search_match=!1,k=null,l=null,e.highlighted_html="",this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(k=this.results_data[e.group_array_index],0===k.active_options&&k.search_match&&(j+=1),k.active_options+=1),o=e.group?e.label:e.text,e.group&&!this.group_search||(l=this.search_string_match(o,i),e.search_match=null!=l,e.search_match&&!e.group&&(j+=1),e.search_match?(g.length&&(m=l.index,f=o.slice(0,m),b=o.slice(m,m+g.length),n=o.slice(m+g.length),e.highlighted_html=this.escape_html(f)+"<em>"+this.escape_html(b)+"</em>"+this.escape_html(n)),null!=k&&(k.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),j<1&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},a.prototype.get_search_regex=function(a){var b,c;return c=this.search_contains?a:"(^|\\s|\\b)"+a+"[^\\s]*",this.enable_split_word_search||this.search_contains||(c="^"+c),b=this.case_sensitive_search?"":"i",new RegExp(c,b)},a.prototype.search_string_match=function(a,b){var c;return c=b.exec(a),!this.search_contains&&(null!=c?c[1]:void 0)&&(c.index+=1),c},a.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,a=0,b=d.length;a<b;a++)c=d[a],c.selected&&(this.selected_option_count+=1);return this.selected_option_count},a.prototype.choices_click=function(a){if(a.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},a.prototype.keydown_checker=function(a){var b,c;switch(c=null!=(b=a.which)?b:a.keyCode,this.search_field_scale(),8!==c&&this.pending_backstroke&&this.clear_backstroke(),c){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 27:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},a.prototype.keyup_checker=function(a){var b,c;switch(c=null!=(b=a.which)?b:a.keyCode,this.search_field_scale(),c){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:a.preventDefault(),this.results_showing&&this.result_select(a);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},a.prototype.clipboard_event_checker=function(a){if(!this.is_disabled)return setTimeout(function(a){return function(){return a.results_search()}}(this),50)},a.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},a.prototype.include_option_in_results=function(a){return!(this.is_multiple&&!this.display_selected_options&&a.selected)&&(!(!this.display_disabled_options&&a.disabled)&&!a.empty)},a.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},a.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},a.prototype.search_results_touchend=function(a){if(this.touch_started)return this.search_results_mouseup(a)},a.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},a.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n  <input class="chosen-search-input" type="text" autocomplete="off" />\n  <span>'+this.default_text+'</span>\n  <div><b></b></div>\n</a>\n<div class="chosen-drop">\n  <div class="chosen-search">\n  </div>\n  <ul class="chosen-results"></ul>\n</div>'},a.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n  <li class="search-field">\n    <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n  </li>\n</ul>\n<div class="chosen-drop">\n  <ul class="chosen-results"></ul>\n</div>'},a.prototype.get_no_results_html=function(a){return'<li class="no-results">\n  '+this.results_none_found+" <span>"+this.escape_html(a)+"</span>\n</li>"},a.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},a.default_multiple_text="Select Some Options",a.default_single_text="Select an Option",a.default_no_result_text="No results match",a}(),a=jQuery,a.fn.extend({chosen:function(d){return b.browser_is_supported()?this.each(function(b){var e,f;return e=a(this),f=e.data("chosen"),"destroy"===d?void(f instanceof c&&f.destroy()):void(f instanceof c||e.data("chosen",new c(this,d)))}):this}}),c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return f(c,b),c.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},c.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={class:b.join(" "),title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},c.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},c.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(a){return function(b){a.container_mousedown(b)}}(this)),this.container.on("touchend.chosen",function(a){return function(b){a.container_mouseup(b)}}(this)),this.container.on("mousedown.chosen",function(a){return function(b){a.container_mousedown(b)}}(this)),this.container.on("mouseup.chosen",function(a){return function(b){a.container_mouseup(b)}}(this)),this.container.on("mouseenter.chosen",function(a){return function(b){a.mouse_enter(b)}}(this)),this.container.on("mouseleave.chosen",function(a){return function(b){a.mouse_leave(b)}}(this)),this.search_results.on("mouseup.chosen",function(a){return function(b){a.search_results_mouseup(b)}}(this)),this.search_results.on("mouseover.chosen",function(a){return function(b){a.search_results_mouseover(b)}}(this)),this.search_results.on("mouseout.chosen",function(a){return function(b){a.search_results_mouseout(b)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(a){return function(b){a.search_results_mousewheel(b)}}(this)),this.search_results.on("touchstart.chosen",function(a){return function(b){a.search_results_touchstart(b)}}(this)),this.search_results.on("touchmove.chosen",function(a){return function(b){a.search_results_touchmove(b)}}(this)),this.search_results.on("touchend.chosen",function(a){return function(b){a.search_results_touchend(b)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(a){return function(b){a.results_update_field(b)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(a){return function(b){a.activate_field(b)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(a){return function(b){a.container_mousedown(b)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(a){return function(b){a.close_field(b)}}(this)),this.search_field.on("blur.chosen",function(a){return function(b){a.input_blur(b)}}(this)),this.search_field.on("keyup.chosen",function(a){return function(b){a.keyup_checker(b)}}(this)),this.search_field.on("keydown.chosen",function(a){return function(b){a.keydown_checker(b)}}(this)),this.search_field.on("focus.chosen",function(a){return function(b){a.input_focus(b)}}(this)),this.search_field.on("cut.chosen",function(a){return function(b){a.clipboard_event_checker(b)}}(this)),this.search_field.on("paste.chosen",function(a){return function(b){a.clipboard_event_checker(b)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(a){return function(b){a.choices_click(b)}}(this)):this.container.on("click.chosen",function(a){a.preventDefault()})},c.prototype.destroy=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},c.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},c.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return!b||"mousedown"!==(c=b.type)&&"touchstart"!==c||this.results_showing||b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},c.prototype.container_mouseup=function(a){if("ABBR"===a.target.nodeName&&!this.is_disabled)return this.results_reset(a)},c.prototype.search_results_mousewheel=function(a){var b;if(a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b)return a.preventDefault(),"DOMMouseScroll"===a.type&&(b*=40),this.search_results.scrollTop(b+this.search_results.scrollTop())},c.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},c.prototype.close_field=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},c.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},c.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},c.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=d.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},c.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},c.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},c.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple||this.search_container.append(this.search_field),this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},c.prototype.update_results_content=function(a){return this.search_results.html(a)},c.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.is_multiple||(this.selected_item.prepend(this.search_field),this.search_field.focus()),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},c.prototype.set_tab_index=function(a){var b;if(this.form_field.tabIndex)return b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b},c.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},c.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},c.prototype.search_results_mouseup=function(b){var c;if(c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length)return this.result_highlight=c,this.result_select(b),this.search_field.focus()},c.prototype.search_results_mouseover=function(b){var c;if(c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first())return this.result_do_highlight(c)},c.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result")||a(b.target).parents(".active-result").first())return this.result_clear_highlight()},c.prototype.choice_build=function(b){var c,d;return c=a("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{class:"search-choice-close","data-option-array-index":b.array_index}),d.on("click.chosen",function(a){return function(b){return a.choice_destroy_link_click(b)}}(this)),c.append(d)),this.search_container.before(c)},c.prototype.choice_destroy_link_click=function(b){if(b.preventDefault(),b.stopPropagation(),!this.is_disabled)return this.choice_destroy(a(b.target))},c.prototype.choice_destroy=function(a){if(this.result_deselect(a[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()},c.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},c.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},c.prototype.result_select=function(a){var b,c;if(this.result_highlight)return b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.search_field.val(""),this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),this.is_multiple&&(!this.hide_results_on_select||a.metaKey||a.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())},c.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},c.prototype.result_deselect=function(a){var b;return b=this.results_data[a],!this.form_field.options[b.options_index].disabled&&(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},c.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},c.prototype.get_search_field_value=function(){return this.search_field.val()},c.prototype.get_search_text=function(){return a.trim(this.get_search_field_value())},c.prototype.escape_html=function(b){return a("<div/>").text(b).html()},c.prototype.winnow_results_set_highlight=function(){var a,b;if(b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a)return this.result_do_highlight(a)},c.prototype.no_results=function(a){var b;return b=this.get_no_results_html(a),this.search_results.append(b),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},c.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},c.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},c.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},c.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},c.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},c.prototype.search_field_scale=function(){var b,c,d,e,f,g,h;if(this.is_multiple){for(f={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},g=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"],c=0,d=g.length;c<d;c++)e=g[c],f[e]=this.search_field.css(e);return b=a("<div />").css(f),b.text(this.get_search_field_value()),a("body").append(b),h=b.width()+25,b.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},c.prototype.trigger_form_field_change=function(a){return this.form_field_jq.trigger("input",a),this.form_field_jq.trigger("change",a)},c}(b)}).call(this);
\ No newline at end of file
+(function(){var t,e,s,i,o=function(t,e){return function(){return t.apply(e,arguments)}},r={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,o,r,h;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),h=[],s=0,i=(r=t.childNodes).length;s<i;s++)o=r[s],h.push(this.add_option(o,e,t.disabled));return h},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,o,r,h;for(r=new i,s=0,o=(h=t.childNodes).length;s<o;s++)e=h[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=o(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t,e;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=(e=this,function(t){return e.activate_field(t)}),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout((e=this,function(){return e.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var e},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((e=this,function(){return e.blur_test()}),100);var e},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,o,r,h,n;for(e="",n=0,o=0,r=(h=this.results_data).length;o<r&&(i="",""!==(i=(s=h[o]).group?this.result_add_group(s):this.result_add_option(s))&&(n++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(n>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,o;for(o=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?o.push(i.selected=!1):o.push(void 0);return o},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,o,r,h,n,l,c,_,a,u,d,p;for(this.no_results_clear(),c=0,t=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l=this.get_search_regex(t),s=0,i=(n=this.results_data).length;s<i;s++)(o=n[s]).search_match=!1,_=null,a=null,o.highlighted_html="",this.include_option_in_results(o)&&(o.group&&(o.group_match=!1,o.active_options=0),null!=o.group_array_index&&this.results_data[o.group_array_index]&&(0===(_=this.results_data[o.group_array_index]).active_options&&_.search_match&&(c+=1),_.active_options+=1),p=o.group?o.label:o.text,o.group&&!this.group_search||(a=this.search_string_match(p,l),o.search_match=null!=a,o.search_match&&!o.group&&(c+=1),o.search_match?(h.length&&(u=a.index,r=p.slice(0,u),e=p.slice(u,u+h.length),d=p.slice(u+h.length),o.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(e)+"</em>"+this.escape_html(d)),null!=_&&(_.group_match=!0)):null!=o.group_array_index&&this.results_data[o.group_array_index].search_match&&(o.search_match=!0)));return this.result_clear_highlight(),c<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e;if(!this.is_disabled)return setTimeout((e=this,function(){return e.results_search()}),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n  <input class="chosen-search-input" type="text" autocomplete="off" />\n  <span>'+this.default_text+'</span>\n  <div><b></b></div>\n</a>\n<div class="chosen-drop">\n  <div class="chosen-search">\n  </div>\n  <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n  <li class="search-field">\n    <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n  </li>\n</ul>\n<div class="chosen-drop">\n  <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n  '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var o,r;r=(o=t(this)).data("chosen"),"destroy"!==i?r instanceof s||o.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function o(){return o.__super__.constructor.apply(this,arguments)}return function(t,e){for(var s in e)r.call(e,s)&&(t[s]=e[s]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(o,e),o.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},o.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},o.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},o.prototype.register_observers=function(){var t,e,s,i,o,r,h,n,l,c,_,a,u,d,p,f,g,m,v,b,y,w,x,k;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",(e=this,function(t){e.container_mouseup(t)})),this.container.on("mousedown.chosen",(s=this,function(t){s.container_mousedown(t)})),this.container.on("mouseup.chosen",(i=this,function(t){i.container_mouseup(t)})),this.container.on("mouseenter.chosen",(o=this,function(t){o.mouse_enter(t)})),this.container.on("mouseleave.chosen",(r=this,function(t){r.mouse_leave(t)})),this.search_results.on("mouseup.chosen",(h=this,function(t){h.search_results_mouseup(t)})),this.search_results.on("mouseover.chosen",(n=this,function(t){n.search_results_mouseover(t)})),this.search_results.on("mouseout.chosen",(l=this,function(t){l.search_results_mouseout(t)})),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",(c=this,function(t){c.search_results_mousewheel(t)})),this.search_results.on("touchstart.chosen",(_=this,function(t){_.search_results_touchstart(t)})),this.search_results.on("touchmove.chosen",(a=this,function(t){a.search_results_touchmove(t)})),this.search_results.on("touchend.chosen",(u=this,function(t){u.search_results_touchend(t)})),this.form_field_jq.on("chosen:updated.chosen",(d=this,function(t){d.results_update_field(t)})),this.form_field_jq.on("chosen:activate.chosen",(p=this,function(t){p.activate_field(t)})),this.form_field_jq.on("chosen:open.chosen",(f=this,function(t){f.container_mousedown(t)})),this.form_field_jq.on("chosen:close.chosen",(g=this,function(t){g.close_field(t)})),this.search_field.on("blur.chosen",(m=this,function(t){m.input_blur(t)})),this.search_field.on("keyup.chosen",(v=this,function(t){v.keyup_checker(t)})),this.search_field.on("keydown.chosen",(b=this,function(t){b.keydown_checker(t)})),this.search_field.on("focus.chosen",(y=this,function(t){y.input_focus(t)})),this.search_field.on("cut.chosen",(w=this,function(t){w.clipboard_event_checker(t)})),this.search_field.on("paste.chosen",(x=this,function(t){x.clipboard_event_checker(t)})),this.is_multiple?this.search_choices.on("click.chosen",(k=this,function(t){k.choices_click(t)})):this.container.on("click.chosen",function(t){t.preventDefault()})},o.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},o.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},o.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},o.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},o.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},o.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},o.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},o.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},o.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},o.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},o.prototype.result_do_highlight=function(t){var e,s,i,o,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),o=(i=parseInt(this.search_results.css("maxHeight"),10))+(r=this.search_results.scrollTop()),(e=(s=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},o.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},o.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple||this.search_container.append(this.search_field),this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},o.prototype.update_results_content=function(t){return this.search_results.html(t)},o.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.is_multiple||(this.selected_item.prepend(this.search_field),this.search_field.focus()),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},o.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},o.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},o.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},o.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},o.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},o.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},o.prototype.choice_build=function(e){var s,i,o;return s=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(o=this,function(t){return o.choice_destroy_link_click(t)})),s.append(i)),this.search_container.before(s)},o.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},o.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},o.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},o.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},o.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(s=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.search_field.val(""),this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},o.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},o.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},o.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},o.prototype.get_search_field_value=function(){return this.search_field.val()},o.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},o.prototype.escape_html=function(e){return t("<div/>").text(e).html()},o.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},o.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},o.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},o.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},o.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},o.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},o.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},o.prototype.search_field_scale=function(){var e,s,i,o,r,h,n;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(h=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[o=h[s]]=this.search_field.css(o);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),n=e.width()+25,e.remove(),this.container.is(":visible")&&(n=Math.min(this.container.outerWidth()-10,n)),this.search_field.width(n)}},o.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},o}()}).call(this);
\ No newline at end of file
index c16823c..12509bf 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.search(f);return b==-1?0:b}function c(a,b,c){return/\bstring\b/.test(a.getTokenTypeAt(g(b.line,0)))&&!/^[\'\"\`]/.test(c)}function d(a,b){var c=a.getMode();return c.useInnerComments!==!1&&c.innerMode?a.getModeAt(b):c}var e={},f=/[^\s\u00a0]/,g=a.Pos;a.commands.toggleComment=function(a){a.toggleComment()},a.defineExtension("toggleComment",function(a){a||(a=e);for(var b=this,c=1/0,d=this.listSelections(),f=null,h=d.length-1;h>=0;h--){var i=d[h].from(),j=d[h].to();i.line>=c||(j.line>=c&&(j=g(c,0)),c=i.line,null==f?b.uncomment(i,j,a)?f="un":(b.lineComment(i,j,a),f="line"):"un"==f?b.uncomment(i,j,a):b.lineComment(i,j,a))}}),a.defineExtension("lineComment",function(a,h,i){i||(i=e);var j=this,k=d(j,a),l=j.getLine(a.line);if(null!=l&&!c(j,a,l)){var m=i.lineComment||k.lineComment;if(!m)return void((i.blockCommentStart||k.blockCommentStart)&&(i.fullLines=!0,j.blockComment(a,h,i)));var n=Math.min(0!=h.ch||h.line==a.line?h.line+1:h.line,j.lastLine()+1),o=null==i.padding?" ":i.padding,p=i.commentBlankLines||a.line==h.line;j.operation(function(){if(i.indent){for(var c=null,d=a.line;d<n;++d){var e=j.getLine(d),h=e.slice(0,b(e));(null==c||c.length>h.length)&&(c=h)}for(var d=a.line;d<n;++d){var e=j.getLine(d),k=c.length;(p||f.test(e))&&(e.slice(0,k)!=c&&(k=b(e)),j.replaceRange(c+m+o,g(d,0),g(d,k)))}}else for(var d=a.line;d<n;++d)(p||f.test(j.getLine(d)))&&j.replaceRange(m+o,g(d,0))})}}),a.defineExtension("blockComment",function(a,b,c){c||(c=e);var h=this,i=d(h,a),j=c.blockCommentStart||i.blockCommentStart,k=c.blockCommentEnd||i.blockCommentEnd;if(!j||!k)return void((c.lineComment||i.lineComment)&&0!=c.fullLines&&h.lineComment(a,b,c));if(!/\bcomment\b/.test(h.getTokenTypeAt(g(a.line,0)))){var l=Math.min(b.line,h.lastLine());l!=a.line&&0==b.ch&&f.test(h.getLine(l))&&--l;var m=null==c.padding?" ":c.padding;a.line>l||h.operation(function(){if(0!=c.fullLines){var d=f.test(h.getLine(l));h.replaceRange(m+k,g(l)),h.replaceRange(j+m,g(a.line,0));var e=c.blockCommentLead||i.blockCommentLead;if(null!=e)for(var n=a.line+1;n<=l;++n)(n!=l||d)&&h.replaceRange(e+m,g(n,0))}else h.replaceRange(k,b),h.replaceRange(j,a)})}}),a.defineExtension("uncomment",function(a,b,c){c||(c=e);var h,i=this,j=d(i,a),k=Math.min(0!=b.ch||b.line==a.line?b.line:b.line-1,i.lastLine()),l=Math.min(a.line,k),m=c.lineComment||j.lineComment,n=[],o=null==c.padding?" ":c.padding;a:if(m){for(var p=l;p<=k;++p){var q=i.getLine(p),r=q.indexOf(m);if(r>-1&&!/comment/.test(i.getTokenTypeAt(g(p,r+1)))&&(r=-1),r==-1&&f.test(q))break a;if(r>-1&&f.test(q.slice(0,r)))break a;n.push(q)}if(i.operation(function(){for(var a=l;a<=k;++a){var b=n[a-l],c=b.indexOf(m),d=c+m.length;c<0||(b.slice(d,d+o.length)==o&&(d+=o.length),h=!0,i.replaceRange("",g(a,c),g(a,d)))}}),h)return!0}var s=c.blockCommentStart||j.blockCommentStart,t=c.blockCommentEnd||j.blockCommentEnd;if(!s||!t)return!1;var u=c.blockCommentLead||j.blockCommentLead,v=i.getLine(l),w=v.indexOf(s);if(w==-1)return!1;var x=k==l?v:i.getLine(k),y=x.indexOf(t,k==l?w+s.length:0),z=g(l,w+1),A=g(k,y+1);if(y==-1||!/comment/.test(i.getTokenTypeAt(z))||!/comment/.test(i.getTokenTypeAt(A))||i.getRange(z,A,"\n").indexOf(t)>-1)return!1;var B=v.lastIndexOf(s,a.ch),C=B==-1?-1:v.slice(0,a.ch).indexOf(t,B+s.length);if(B!=-1&&C!=-1&&C+t.length!=a.ch)return!1;C=x.indexOf(t,b.ch);var D=x.slice(b.ch).lastIndexOf(s,C-b.ch);return B=C==-1||D==-1?-1:b.ch+D,(C==-1||B==-1||B==b.ch)&&(i.operation(function(){i.replaceRange("",g(k,y-(o&&x.slice(y-o.length,y)==o?o.length:0)),g(k,y+t.length));var a=w+s.length;if(o&&v.slice(a,a+o.length)==o&&(a+=o.length),i.replaceRange("",g(l,w),g(l,a)),u)for(var b=l+1;b<=k;++b){var c=i.getLine(b),d=c.indexOf(u);if(d!=-1&&!f.test(c.slice(0,d))){var e=d+u.length;o&&c.slice(e,e+o.length)==o&&(e+=o.length),i.replaceRange("",g(b,d),g(b,e))}}}),!0)})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos;function l(e){var n=e.search(t);return-1==n?0:n}function o(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=n);for(var t=this,l=1/0,o=this.listSelections(),r=null,a=o.length-1;a>=0;a--){var m=o[a].from(),c=o[a].to();m.line>=l||(c.line>=l&&(c=i(l,0)),l=m.line,null==r?t.uncomment(m,c,e)?r="un":(t.lineComment(m,c,e),r="line"):"un"==r?t.uncomment(m,c,e):t.lineComment(m,c,e))}}),e.defineExtension("lineComment",function(e,r,a){a||(a=n);var m=this,c=o(m,e),f=m.getLine(e.line);if(null!=f&&(g=e,s=f,!/\bstring\b/.test(m.getTokenTypeAt(i(g.line,0)))||/^[\'\"\`]/.test(s))){var g,s,d=a.lineComment||c.lineComment;if(d){var u=Math.min(0!=r.ch||r.line==e.line?r.line+1:r.line,m.lastLine()+1),h=null==a.padding?" ":a.padding,p=a.commentBlankLines||e.line==r.line;m.operation(function(){if(a.indent){for(var n=null,o=e.line;o<u;++o){var r=(c=m.getLine(o)).slice(0,l(c));(null==n||n.length>r.length)&&(n=r)}for(o=e.line;o<u;++o){var c=m.getLine(o),f=n.length;(p||t.test(c))&&(c.slice(0,f)!=n&&(f=l(c)),m.replaceRange(n+d+h,i(o,0),i(o,f)))}}else for(o=e.line;o<u;++o)(p||t.test(m.getLine(o)))&&m.replaceRange(d+h,i(o,0))})}else(a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,m.blockComment(e,r,a))}}),e.defineExtension("blockComment",function(e,l,r){r||(r=n);var a=this,m=o(a,e),c=r.blockCommentStart||m.blockCommentStart,f=r.blockCommentEnd||m.blockCommentEnd;if(c&&f){if(!/\bcomment\b/.test(a.getTokenTypeAt(i(e.line,0)))){var g=Math.min(l.line,a.lastLine());g!=e.line&&0==l.ch&&t.test(a.getLine(g))&&--g;var s=null==r.padding?" ":r.padding;e.line>g||a.operation(function(){if(0!=r.fullLines){var n=t.test(a.getLine(g));a.replaceRange(s+f,i(g)),a.replaceRange(c+s,i(e.line,0));var o=r.blockCommentLead||m.blockCommentLead;if(null!=o)for(var d=e.line+1;d<=g;++d)(d!=g||n)&&a.replaceRange(o+s,i(d,0))}else a.replaceRange(f,l),a.replaceRange(c,e)})}}else(r.lineComment||m.lineComment)&&0!=r.fullLines&&a.lineComment(e,l,r)}),e.defineExtension("uncomment",function(e,l,r){r||(r=n);var a,m=this,c=o(m,e),f=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),g=Math.min(e.line,f),s=r.lineComment||c.lineComment,d=[],u=null==r.padding?" ":r.padding;e:if(s){for(var h=g;h<=f;++h){var p=m.getLine(h),v=p.indexOf(s);if(v>-1&&!/comment/.test(m.getTokenTypeAt(i(h,v+1)))&&(v=-1),-1==v&&t.test(p))break e;if(v>-1&&t.test(p.slice(0,v)))break e;d.push(p)}if(m.operation(function(){for(var e=g;e<=f;++e){var n=d[e-g],t=n.indexOf(s),l=t+s.length;t<0||(n.slice(l,l+u.length)==u&&(l+=u.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}}),a)return!0}var C=r.blockCommentStart||c.blockCommentStart,b=r.blockCommentEnd||c.blockCommentEnd;if(!C||!b)return!1;var k=r.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(C);if(-1==x)return!1;var R=f==g?L:m.getLine(f),O=R.indexOf(b,f==g?x+C.length:0),T=i(g,x+1),y=i(f,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(y))||m.getRange(T,y,"\n").indexOf(b)>-1)return!1;var E=L.lastIndexOf(C,e.ch),M=-1==E?-1:L.slice(0,e.ch).indexOf(b,E+C.length);if(-1!=E&&-1!=M&&M+b.length!=e.ch)return!1;M=R.indexOf(b,l.ch);var S=R.slice(l.ch).lastIndexOf(C,M-l.ch);return E=-1==M||-1==S?-1:l.ch+S,(-1==M||-1==E||E==l.ch)&&(m.operation(function(){m.replaceRange("",i(f,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),i(f,O+b.length));var e=x+C.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",i(g,x),i(g,e)),k)for(var n=g+1;n<=f;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var r=o+k.length;u&&l.slice(r,r+u.length)==u&&(r+=u.length),m.replaceRange("",i(n,o),i(n,r))}}}),!0)})});
\ No newline at end of file
index 73f7012..a877912 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(b){if(b.getOption("disableInput"))return a.Pass;for(var d,e=b.listSelections(),f=[],g=0;g<e.length;g++){var h=e[g].head;if(!/\bcomment\b/.test(b.getTokenTypeAt(h)))return a.Pass;var i=b.getModeAt(h);if(d){if(d!=i)return a.Pass}else d=i;var j=null;if(d.blockCommentStart&&d.blockCommentContinue){var k,l=b.getLine(h.line).slice(0,h.ch),m=l.lastIndexOf(d.blockCommentEnd);if(m!=-1&&m==h.ch-d.blockCommentEnd.length);else if((k=l.lastIndexOf(d.blockCommentStart))>-1&&k>m){if(j=l.slice(0,k),/\S/.test(j)){j="";for(var n=0;n<k;++n)j+=" "}}else(k=l.indexOf(d.blockCommentContinue))>-1&&!/\S/.test(l.slice(0,k))&&(j=l.slice(0,k));null!=j&&(j+=d.blockCommentContinue)}if(null==j&&d.lineComment&&c(b)){var l=b.getLine(h.line),k=l.indexOf(d.lineComment);k>-1&&(j=l.slice(0,k),/\S/.test(j)?j=null:j+=d.lineComment+l.slice(k+d.lineComment.length).match(/^\s*/)[0])}if(null==j)return a.Pass;f[g]="\n"+j}b.operation(function(){for(var a=e.length-1;a>=0;a--)b.replaceRange(f[a],e[a].from(),e[a].to(),"+insert")})}function c(a){var b=a.getOption("continueComments");return!b||"object"!=typeof b||b.continueLineComment!==!1}a.defineOption("continueComments",null,function(c,d,e){if(e&&e!=a.Init&&c.removeKeyMap("continueComment"),d){var f="Enter";"string"==typeof d?f=d:"object"==typeof d&&d.key&&(f=d.key);var g={name:"continueComment"};g[f]=b,c.addKeyMap(g)}})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(n){if(n.getOption("disableInput"))return e.Pass;for(var o,i=n.listSelections(),l=[],r=0;r<i.length;r++){var m=i[r].head;if(!/\bcomment\b/.test(n.getTokenTypeAt(m)))return e.Pass;var c=n.getModeAt(m);if(o){if(o!=c)return e.Pass}else o=c;var f=null;if(o.blockCommentStart&&o.blockCommentContinue){var s,a,u=(s=n.getLine(m.line).slice(0,m.ch)).lastIndexOf(o.blockCommentEnd);if(-1!=u&&u==m.ch-o.blockCommentEnd.length);else if((a=s.lastIndexOf(o.blockCommentStart))>-1&&a>u){if(f=s.slice(0,a),/\S/.test(f)){f="";for(var d=0;d<a;++d)f+=" "}}else(a=s.indexOf(o.blockCommentContinue))>-1&&!/\S/.test(s.slice(0,a))&&(f=s.slice(0,a));null!=f&&(f+=o.blockCommentContinue)}if(null==f&&o.lineComment&&t(n))(a=(s=n.getLine(m.line)).indexOf(o.lineComment))>-1&&(f=s.slice(0,a),/\S/.test(f)?f=null:f+=o.lineComment+s.slice(a+o.lineComment.length).match(/^\s*/)[0]);if(null==f)return e.Pass;l[r]="\n"+f}n.operation(function(){for(var e=i.length-1;e>=0;e--)n.replaceRange(l[e],i[e].from(),i[e].to(),"+insert")})}function t(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}e.defineOption("continueComments",null,function(t,o,i){if(i&&i!=e.Init&&t.removeKeyMap("continueComment"),o){var l="Enter";"string"==typeof o?l=o:"object"==typeof o&&o.key&&(l=o.key);var r={name:"continueComment"};r[l]=n,t.addKeyMap(r)}})});
\ No newline at end of file
index 5f1f6af..99cbb03 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,c){var d,e=a.getWrapperElement();return d=e.appendChild(document.createElement("div")),c?d.className="CodeMirror-dialog CodeMirror-dialog-bottom":d.className="CodeMirror-dialog CodeMirror-dialog-top","string"==typeof b?d.innerHTML=b:d.appendChild(b),d}function c(a,b){a.state.currentNotificationClose&&a.state.currentNotificationClose(),a.state.currentNotificationClose=b}a.defineExtension("openDialog",function(d,e,f){function g(a){if("string"==typeof a)l.value=a;else{if(j)return;j=!0,i.parentNode.removeChild(i),k.focus(),f.onClose&&f.onClose(i)}}f||(f={}),c(this,null);var h,i=b(this,d,f.bottom),j=!1,k=this,l=i.getElementsByTagName("input")[0];return l?(l.focus(),f.value&&(l.value=f.value,f.selectValueOnOpen!==!1&&l.select()),f.onInput&&a.on(l,"input",function(a){f.onInput(a,l.value,g)}),f.onKeyUp&&a.on(l,"keyup",function(a){f.onKeyUp(a,l.value,g)}),a.on(l,"keydown",function(b){f&&f.onKeyDown&&f.onKeyDown(b,l.value,g)||((27==b.keyCode||f.closeOnEnter!==!1&&13==b.keyCode)&&(l.blur(),a.e_stop(b),g()),13==b.keyCode&&e(l.value,b))}),f.closeOnBlur!==!1&&a.on(l,"blur",g)):(h=i.getElementsByTagName("button")[0])&&(a.on(h,"click",function(){g(),k.focus()}),f.closeOnBlur!==!1&&a.on(h,"blur",g),h.focus()),g}),a.defineExtension("openConfirm",function(d,e,f){function g(){j||(j=!0,h.parentNode.removeChild(h),k.focus())}c(this,null);var h=b(this,d,f&&f.bottom),i=h.getElementsByTagName("button"),j=!1,k=this,l=1;i[0].focus();for(var m=0;m<i.length;++m){var n=i[m];!function(b){a.on(n,"click",function(c){a.e_preventDefault(c),g(),b&&b(k)})}(e[m]),a.on(n,"blur",function(){--l,setTimeout(function(){l<=0&&g()},200)}),a.on(n,"focus",function(){++l})}}),a.defineExtension("openNotification",function(d,e){function f(){i||(i=!0,clearTimeout(g),h.parentNode.removeChild(h))}c(this,f);var g,h=b(this,d,e&&e.bottom),i=!1,j=e&&"undefined"!=typeof e.duration?e.duration:5e3;return a.on(h,"click",function(b){a.e_preventDefault(b),f()}),j&&(g=setTimeout(f,j)),f})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function o(e,o,n){var t;return(t=e.getWrapperElement().appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?t.innerHTML=o:t.appendChild(o),t}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",function(t,i,r){r||(r={}),n(this,null);var u=o(this,t,r.bottom),l=!1,c=this;function a(e){if("string"==typeof e)s.value=e;else{if(l)return;l=!0,u.parentNode.removeChild(u),c.focus(),r.onClose&&r.onClose(u)}}var f,s=u.getElementsByTagName("input")[0];return s?(s.focus(),r.value&&(s.value=r.value,!1!==r.selectValueOnOpen&&s.select()),r.onInput&&e.on(s,"input",function(e){r.onInput(e,s.value,a)}),r.onKeyUp&&e.on(s,"keyup",function(e){r.onKeyUp(e,s.value,a)}),e.on(s,"keydown",function(o){r&&r.onKeyDown&&r.onKeyDown(o,s.value,a)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(s.blur(),e.e_stop(o),a()),13==o.keyCode&&i(s.value,o))}),!1!==r.closeOnBlur&&e.on(s,"blur",a)):(f=u.getElementsByTagName("button")[0])&&(e.on(f,"click",function(){a(),c.focus()}),!1!==r.closeOnBlur&&e.on(f,"blur",a),f.focus()),a}),e.defineExtension("openConfirm",function(t,i,r){n(this,null);var u=o(this,t,r&&r.bottom),l=u.getElementsByTagName("button"),c=!1,a=this,f=1;function s(){c||(c=!0,u.parentNode.removeChild(u),a.focus())}l[0].focus();for(var d=0;d<l.length;++d){var p=l[d];!function(o){e.on(p,"click",function(n){e.e_preventDefault(n),s(),o&&o(a)})}(i[d]),e.on(p,"blur",function(){--f,setTimeout(function(){f<=0&&s()},200)}),e.on(p,"focus",function(){++f})}}),e.defineExtension("openNotification",function(t,i){n(this,a);var r,u=o(this,t,i&&i.bottom),l=!1,c=i&&void 0!==i.duration?i.duration:5e3;function a(){l||(l=!0,clearTimeout(r),u.parentNode.removeChild(u))}return e.on(u,"click",function(o){e.e_preventDefault(o),a()}),c&&(r=setTimeout(a,c)),a})});
\ No newline at end of file
index c72c06b..900cefc 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d){function e(){b.display.wrapper.offsetHeight?(c(b,d),b.display.lastWrapHeight!=b.display.wrapper.clientHeight&&b.refresh()):d.timeout=setTimeout(e,d.delay)}d.timeout=setTimeout(e,d.delay),d.hurry=function(){clearTimeout(d.timeout),d.timeout=setTimeout(e,50)},a.on(window,"mouseup",d.hurry),a.on(window,"keyup",d.hurry)}function c(b,c){clearTimeout(c.timeout),a.off(window,"mouseup",c.hurry),a.off(window,"keyup",c.hurry)}a.defineOption("autoRefresh",!1,function(a,d){a.state.autoRefresh&&(c(a,a.state.autoRefresh),a.state.autoRefresh=null),d&&0==a.display.wrapper.offsetHeight&&b(a,a.state.autoRefresh={delay:d.delay||250})})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,o){clearTimeout(o.timeout),e.off(window,"mouseup",o.hurry),e.off(window,"keyup",o.hurry)}e.defineOption("autoRefresh",!1,function(o,i){o.state.autoRefresh&&(t(o,o.state.autoRefresh),o.state.autoRefresh=null),i&&0==o.display.wrapper.offsetHeight&&function(o,i){function r(){o.display.wrapper.offsetHeight?(t(o,i),o.display.lastWrapHeight!=o.display.wrapper.clientHeight&&o.refresh()):i.timeout=setTimeout(r,i.delay)}i.timeout=setTimeout(r,i.delay),i.hurry=function(){clearTimeout(i.timeout),i.timeout=setTimeout(r,50)},e.on(window,"mouseup",i.hurry),e.on(window,"keyup",i.hurry)}(o,o.state.autoRefresh={delay:i.delay||250})})});
\ No newline at end of file
index 2c97706..b824970 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.getWrapperElement();a.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:b.style.width,height:b.style.height},b.style.width="",b.style.height="auto",b.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",a.refresh()}function c(a){var b=a.getWrapperElement();b.className=b.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var c=a.state.fullScreenRestore;b.style.width=c.width,b.style.height=c.height,window.scrollTo(c.scrollLeft,c.scrollTop),a.refresh()}a.defineOption("fullScreen",!1,function(d,e,f){f==a.Init&&(f=!1),!f!=!e&&(e?b(d):c(d))})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineOption("fullScreen",!1,function(t,o,r){var l,i;(r==e.Init&&(r=!1),!r!=!o)&&(o?(i=(l=t).getWrapperElement(),l.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:i.style.width,height:i.style.height},i.style.width="",i.style.height="auto",i.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",l.refresh()):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(t))})});
\ No newline at end of file
index c8c4819..22b8727 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,c,d){this.cm=a,this.node=b,this.options=c,this.height=d,this.cleared=!1}function c(a){var b=a.getWrapperElement(),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d=parseInt(c.height),e=a.state.panels={setHeight:b.style.height,heightLeft:d,panels:0,wrapper:document.createElement("div")};b.parentNode.insertBefore(e.wrapper,b);var f=a.hasFocus();e.wrapper.appendChild(b),f&&a.focus(),a._setSize=a.setSize,null!=d&&(a.setSize=function(b,c){if(null==c)return this._setSize(b,c);if(e.setHeight=c,"number"!=typeof c){var f=/^(\d+\.?\d*)px$/.exec(c);f?c=Number(f[1]):(e.wrapper.style.height=c,c=e.wrapper.offsetHeight,e.wrapper.style.height="")}a._setSize(b,e.heightLeft+=c-d),d=c})}function d(a){var b=a.state.panels;a.state.panels=null;var c=a.getWrapperElement();b.wrapper.parentNode.replaceChild(c,b.wrapper),c.style.height=b.setHeight,a.setSize=a._setSize,a.setSize()}function e(a,b){for(var c=b.nextSibling;c;c=c.nextSibling)if(c==a.getWrapperElement())return!0;return!1}a.defineExtension("addPanel",function(a,d){d=d||{},this.state.panels||c(this);var f=this.state.panels,g=f.wrapper,h=this.getWrapperElement();d.after instanceof b&&!d.after.cleared?g.insertBefore(a,d.before.node.nextSibling):d.before instanceof b&&!d.before.cleared?g.insertBefore(a,d.before.node):d.replace instanceof b&&!d.replace.cleared?(g.insertBefore(a,d.replace.node),d.replace.clear()):"bottom"==d.position?g.appendChild(a):"before-bottom"==d.position?g.insertBefore(a,h.nextSibling):"after-top"==d.position?g.insertBefore(a,h):g.insertBefore(a,g.firstChild);var i=d&&d.height||a.offsetHeight;return this._setSize(null,f.heightLeft-=i),f.panels++,d.stable&&e(this,a)&&this.scrollTo(null,this.getScrollInfo().top+i),new b(this,a,d,i)}),b.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var a=this.cm.state.panels;this.cm._setSize(null,a.heightLeft+=this.height),this.options.stable&&e(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),a.wrapper.removeChild(this.node),0==--a.panels&&d(this.cm)}},b.prototype.changed=function(a){var b=null==a?this.node.offsetHeight:a,c=this.cm.state.panels;this.cm._setSize(null,c.heightLeft-=b-this.height),this.height=b}});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i,r){this.cm=e,this.node=t,this.options=i,this.height=r,this.cleared=!1}function i(e,t){for(var i=t.nextSibling;i;i=i.nextSibling)if(i==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",function(e,r){r=r||{},this.state.panels||function(e){var t=e.getWrapperElement(),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r=parseInt(i.height),n=e.state.panels={setHeight:t.style.height,heightLeft:r,panels:0,wrapper:document.createElement("div")};t.parentNode.insertBefore(n.wrapper,t);var s=e.hasFocus();n.wrapper.appendChild(t),s&&e.focus();e._setSize=e.setSize,null!=r&&(e.setSize=function(t,i){if(null==i)return this._setSize(t,i);if(n.setHeight=i,"number"!=typeof i){var s=/^(\d+\.?\d*)px$/.exec(i);s?i=Number(s[1]):(n.wrapper.style.height=i,i=n.wrapper.offsetHeight,n.wrapper.style.height="")}e._setSize(t,n.heightLeft+=i-r),r=i})}(this);var n=this.state.panels,s=n.wrapper,o=this.getWrapperElement();r.after instanceof t&&!r.after.cleared?s.insertBefore(e,r.before.node.nextSibling):r.before instanceof t&&!r.before.cleared?s.insertBefore(e,r.before.node):r.replace instanceof t&&!r.replace.cleared?(s.insertBefore(e,r.replace.node),r.replace.clear()):"bottom"==r.position?s.appendChild(e):"before-bottom"==r.position?s.insertBefore(e,o.nextSibling):"after-top"==r.position?s.insertBefore(e,o):s.insertBefore(e,s.firstChild);var h=r&&r.height||e.offsetHeight;return this._setSize(null,n.heightLeft-=h),n.panels++,r.stable&&i(this,e)&&this.scrollTo(null,this.getScrollInfo().top+h),new t(this,e,r,h)}),t.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var e=this.cm.state.panels;this.cm._setSize(null,e.heightLeft+=this.height),this.options.stable&&i(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),e.wrapper.removeChild(this.node),0==--e.panels&&function(e){var t=e.state.panels;e.state.panels=null;var i=e.getWrapperElement();t.wrapper.parentNode.replaceChild(i,t.wrapper),i.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}(this.cm)}},t.prototype.changed=function(e){var t=null==e?this.node.offsetHeight:e,i=this.cm.state.panels;this.cm._setSize(null,i.heightLeft-=t-this.height),this.height=t}});
\ No newline at end of file
index adaab1d..f14a1e6 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a){a.state.placeholder&&(a.state.placeholder.parentNode.removeChild(a.state.placeholder),a.state.placeholder=null)}function c(a){b(a);var c=a.state.placeholder=document.createElement("pre");c.style.cssText="height: 0; overflow: visible",c.style.direction=a.getOption("direction"),c.className="CodeMirror-placeholder";var d=a.getOption("placeholder");"string"==typeof d&&(d=document.createTextNode(d)),c.appendChild(d),a.display.lineSpace.insertBefore(c,a.display.lineSpace.firstChild)}function d(a){f(a)&&c(a)}function e(a){var d=a.getWrapperElement(),e=f(a);d.className=d.className.replace(" CodeMirror-empty","")+(e?" CodeMirror-empty":""),e?c(a):b(a)}function f(a){return 1===a.lineCount()&&""===a.getLine(0)}a.defineOption("placeholder","",function(c,f,g){var h=g&&g!=a.Init;if(f&&!h)c.on("blur",d),c.on("change",e),c.on("swapDoc",e),e(c);else if(!f&&h){c.off("blur",d),c.off("change",e),c.off("swapDoc",e),b(c);var i=c.getWrapperElement();i.className=i.className.replace(" CodeMirror-empty","")}f&&!c.hasFocus()&&d(c)})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function o(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){o(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder";var t=e.getOption("placeholder");"string"==typeof t&&(t=document.createTextNode(t)),r.appendChild(t),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function t(e){i(e)&&r(e)}function n(e){var t=e.getWrapperElement(),n=i(e);t.className=t.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?r(e):o(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(r,i,a){var l=a&&a!=e.Init;if(i&&!l)r.on("blur",t),r.on("change",n),r.on("swapDoc",n),n(r);else if(!i&&l){r.off("blur",t),r.off("change",n),r.off("swapDoc",n),o(r);var c=r.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}i&&!r.hasFocus()&&t(r)})});
\ No newline at end of file
index 2d965eb..22ded85 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b){b.state.rulerDiv.textContent="";var c=b.getOption("rulers"),d=b.defaultCharWidth(),e=b.charCoords(a.Pos(b.firstLine(),0),"div").left;b.state.rulerDiv.style.minHeight=b.display.scroller.offsetHeight+30+"px";for(var f=0;f<c.length;f++){var g=document.createElement("div");g.className="CodeMirror-ruler";var h,i=c[f];"number"==typeof i?h=i:(h=i.column,i.className&&(g.className+=" "+i.className),i.color&&(g.style.borderColor=i.color),i.lineStyle&&(g.style.borderLeftStyle=i.lineStyle),i.width&&(g.style.borderLeftWidth=i.width)),g.style.left=e+h*d+"px",b.state.rulerDiv.appendChild(g)}}a.defineOption("rulers",!1,function(a,c){a.state.rulerDiv&&(a.state.rulerDiv.parentElement.removeChild(a.state.rulerDiv),a.state.rulerDiv=null,a.off("refresh",b)),c&&c.length&&(a.state.rulerDiv=a.display.lineSpace.parentElement.insertBefore(document.createElement("div"),a.display.lineSpace),a.state.rulerDiv.className="CodeMirror-rulers",b(a),a.on("refresh",b))})});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function r(r){r.state.rulerDiv.textContent="";var t=r.getOption("rulers"),l=r.defaultCharWidth(),i=r.charCoords(e.Pos(r.firstLine(),0),"div").left;r.state.rulerDiv.style.minHeight=r.display.scroller.offsetHeight+30+"px";for(var o=0;o<t.length;o++){var s=document.createElement("div");s.className="CodeMirror-ruler";var n,a=t[o];"number"==typeof a?n=a:(n=a.column,a.className&&(s.className+=" "+a.className),a.color&&(s.style.borderColor=a.color),a.lineStyle&&(s.style.borderLeftStyle=a.lineStyle),a.width&&(s.style.borderLeftWidth=a.width)),s.style.left=i+n*l+"px",r.state.rulerDiv.appendChild(s)}}e.defineOption("rulers",!1,function(e,t){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",r)),t&&t.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",r(e),e.on("refresh",r))})});
\ No newline at end of file
index c4296da..053df8c 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b){return"pairs"==b&&"string"==typeof a?a:"object"==typeof a&&null!=a[b]?a[b]:m[b]}function c(a){for(var b=0;b<a.length;b++){var c=a.charAt(b),e="'"+c+"'";o[e]||(o[e]=d(c))}}function d(a){return function(b){return i(b,a)}}function e(a){var b=a.state.closeBrackets;if(!b||b.override)return b;var c=a.getModeAt(a.getCursor());return c.closeBrackets||b}function f(c){var d=e(c);if(!d||c.getOption("disableInput"))return a.Pass;for(var f=b(d,"pairs"),g=c.listSelections(),h=0;h<g.length;h++){if(!g[h].empty())return a.Pass;var i=k(c,g[h].head);if(!i||f.indexOf(i)%2!=0)return a.Pass}for(var h=g.length-1;h>=0;h--){var j=g[h].head;c.replaceRange("",n(j.line,j.ch-1),n(j.line,j.ch+1),"+delete")}}function g(c){var d=e(c),f=d&&b(d,"explode");if(!f||c.getOption("disableInput"))return a.Pass;for(var g=c.listSelections(),h=0;h<g.length;h++){if(!g[h].empty())return a.Pass;var i=k(c,g[h].head);if(!i||f.indexOf(i)%2!=0)return a.Pass}c.operation(function(){var a=c.lineSeparator()||"\n";c.replaceSelection(a+a,null),c.execCommand("goCharLeft"),g=c.listSelections();for(var b=0;b<g.length;b++){var d=g[b].head.line;c.indentLine(d,null,!0),c.indentLine(d+1,null,!0)}})}function h(b){var c=a.cmpPos(b.anchor,b.head)>0;return{anchor:new n(b.anchor.line,b.anchor.ch+(c?-1:1)),head:new n(b.head.line,b.head.ch+(c?1:-1))}}function i(c,d){var f=e(c);if(!f||c.getOption("disableInput"))return a.Pass;var g=b(f,"pairs"),i=g.indexOf(d);if(i==-1)return a.Pass;for(var k,m=b(f,"triples"),o=g.charAt(i+1)==d,p=c.listSelections(),q=i%2==0,r=0;r<p.length;r++){var s,t=p[r],u=t.head,v=c.getRange(u,n(u.line,u.ch+1));if(q&&!t.empty())s="surround";else if(!o&&q||v!=d)if(o&&u.ch>1&&m.indexOf(d)>=0&&c.getRange(n(u.line,u.ch-2),u)==d+d){if(u.ch>2&&/\bstring/.test(c.getTokenTypeAt(n(u.line,u.ch-2))))return a.Pass;s="addFour"}else if(o){var w=0==u.ch?" ":c.getRange(n(u.line,u.ch-1),u);if(a.isWordChar(v)||w==d||a.isWordChar(w))return a.Pass;s="both"}else{if(!q||c.getLine(u.line).length!=u.ch&&!j(v,g)&&!/\s/.test(v))return a.Pass;s="both"}else s=o&&l(c,u)?"both":m.indexOf(d)>=0&&c.getRange(u,n(u.line,u.ch+3))==d+d+d?"skipThree":"skip";if(k){if(k!=s)return a.Pass}else k=s}var x=i%2?g.charAt(i-1):d,y=i%2?d:g.charAt(i+1);c.operation(function(){if("skip"==k)c.execCommand("goCharRight");else if("skipThree"==k)for(var a=0;a<3;a++)c.execCommand("goCharRight");else if("surround"==k){for(var b=c.getSelections(),a=0;a<b.length;a++)b[a]=x+b[a]+y;c.replaceSelections(b,"around"),b=c.listSelections().slice();for(var a=0;a<b.length;a++)b[a]=h(b[a]);c.setSelections(b)}else"both"==k?(c.replaceSelection(x+y,null),c.triggerElectric(x+y),c.execCommand("goCharLeft")):"addFour"==k&&(c.replaceSelection(x+x+x+x,"before"),c.execCommand("goCharRight"))})}function j(a,b){var c=b.lastIndexOf(a);return c>-1&&c%2==1}function k(a,b){var c=a.getRange(n(b.line,b.ch-1),n(b.line,b.ch+1));return 2==c.length?c:null}function l(a,b){var c=a.getTokenAt(n(b.line,b.ch+1));return/\bstring/.test(c.type)&&c.start==b.ch&&(0==b.ch||!/\bstring/.test(a.getTokenTypeAt(b)))}var m={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},n=a.Pos;a.defineOption("autoCloseBrackets",!1,function(d,e,f){f&&f!=a.Init&&(d.removeKeyMap(o),d.state.closeBrackets=null),e&&(c(b(e,"pairs")),d.state.closeBrackets=e,d.addKeyMap(o))});var o={Backspace:f,Enter:g};c(m.pairs+"`")});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){var t={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,function(t,r,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),r&&(a(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(i))});var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=n(i,"pairs"),o=t.listSelections(),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var f=l(t,o[c].head);if(!f||a.indexOf(f)%2!=0)return e.Pass}for(var c=o.length-1;c>=0;c--){var h=o[c].head;t.replaceRange("",r(h.line,h.ch-1),r(h.line,h.ch+1),"+delete")}},Enter:function(t){var r=s(t),i=r&&n(r,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var c=l(t,a[o].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}t.operation(function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),a=t.listSelections();for(var r=0;r<a.length;r++){var n=a[r].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}})}};function a(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";i[n]||(i[n]=o(r))}}function o(t){return function(i){return function(t,i){var a=s(t);if(!a||t.getOption("disableInput"))return e.Pass;var o=n(a,"pairs"),l=o.indexOf(i);if(-1==l)return e.Pass;for(var c,f=n(a,"triples"),h=o.charAt(l+1)==i,d=t.listSelections(),u=l%2==0,g=0;g<d.length;g++){var p,v=d[g],m=v.head,b=t.getRange(m,r(m.line,m.ch+1));if(u&&!v.empty())p="surround";else if(!h&&u||b!=i)if(h&&m.ch>1&&f.indexOf(i)>=0&&t.getRange(r(m.line,m.ch-2),m)==i+i){if(m.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(m.line,m.ch-2))))return e.Pass;p="addFour"}else if(h){var C=0==m.ch?" ":t.getRange(r(m.line,m.ch-1),m);if(e.isWordChar(b)||C==i||e.isWordChar(C))return e.Pass;p="both"}else{if(!u||!(t.getLine(m.line).length==m.ch||(x=b,void 0,(P=o.lastIndexOf(x))>-1&&P%2==1)||/\s/.test(b)))return e.Pass;p="both"}else p=!h||(y=m,void 0,S=(k=t).getTokenAt(r(y.line,y.ch+1)),!/\bstring/.test(S.type)||S.start!=y.ch||0!=y.ch&&/\bstring/.test(k.getTokenTypeAt(y)))?f.indexOf(i)>=0&&t.getRange(m,r(m.line,m.ch+3))==i+i+i?"skipThree":"skip":"both";if(c){if(c!=p)return e.Pass}else c=p}var x,P;var k,y,S;var O=l%2?o.charAt(l-1):i,R=l%2?i:o.charAt(l+1);t.operation(function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var n=0;n<3;n++)t.execCommand("goCharRight");else if("surround"==c){for(var i=t.getSelections(),n=0;n<i.length;n++)i[n]=O+i[n]+R;t.replaceSelections(i,"around"),i=t.listSelections().slice();for(var n=0;n<i.length;n++)i[n]=(a=i[n],void 0,o=e.cmpPos(a.anchor,a.head)>0,{anchor:new r(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new r(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==c?(t.replaceSelection(O+R,null),t.triggerElectric(O+R),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(O+O+O+O,"before"),t.execCommand("goCharRight"));var a,o})}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var n=e.getRange(r(t.line,t.ch-1),r(t.line,t.ch+1));return 2==n.length?n:null}a(t.pairs+"`")});
\ No newline at end of file
index dcd4228..b9c69a8 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){function b(b){if(b.getOption("disableInput"))return a.Pass;for(var c=b.listSelections(),d=[],i=b.getOption("autoCloseTags"),j=0;j<c.length;j++){if(!c[j].empty())return a.Pass;var k=c[j].head,l=b.getTokenAt(k),m=a.innerMode(b.getMode(),l.state),n=m.state;if("xml"!=m.mode.name||!n.tagName)return a.Pass;var o="html"==m.mode.configuration,p="object"==typeof i&&i.dontCloseTags||o&&g,q="object"==typeof i&&i.indentTags||o&&h,r=n.tagName;l.end>k.ch&&(r=r.slice(0,r.length-l.end+k.ch));var s=r.toLowerCase();if(!r||"string"==l.type&&(l.end!=k.ch||!/[\"\']/.test(l.string.charAt(l.string.length-1))||1==l.string.length)||"tag"==l.type&&"closeTag"==n.type||l.string.indexOf("/")==l.string.length-1||p&&e(p,s)>-1||f(b,r,k,n,!0))return a.Pass;var t=q&&e(q,s)>-1;d[j]={indent:t,text:">"+(t?"\n\n":"")+"</"+r+">",newPos:t?a.Pos(k.line+1,0):a.Pos(k.line,k.ch+1)}}for(var u="object"==typeof i&&i.dontIndentOnAutoClose,j=c.length-1;j>=0;j--){var v=d[j];b.replaceRange(v.text,c[j].head,c[j].anchor,"+insert");var w=b.listSelections().slice(0);w[j]={head:v.newPos,anchor:v.newPos},b.setSelections(w),!u&&v.indent&&(b.indentLine(v.newPos.line,null,!0),b.indentLine(v.newPos.line+1,null,!0))}}function c(b,c){for(var d=b.listSelections(),e=[],g=c?"/":"</",h=b.getOption("autoCloseTags"),i="object"==typeof h&&h.dontIndentOnSlash,j=0;j<d.length;j++){if(!d[j].empty())return a.Pass;var k=d[j].head,l=b.getTokenAt(k),m=a.innerMode(b.getMode(),l.state),n=m.state;if(c&&("string"==l.type||"<"!=l.string.charAt(0)||l.start!=k.ch-1))return a.Pass;var o;if("xml"!=m.mode.name)if("htmlmixed"==b.getMode().name&&"javascript"==m.mode.name)o=g+"script";else{if("htmlmixed"!=b.getMode().name||"css"!=m.mode.name)return a.Pass;o=g+"style"}else{if(!n.context||!n.context.tagName||f(b,n.context.tagName,k,n))return a.Pass;o=g+n.context.tagName}">"!=b.getLine(k.line).charAt(l.end)&&(o+=">"),e[j]=o}if(b.replaceSelections(e),d=b.listSelections(),!i)for(var j=0;j<d.length;j++)(j==d.length-1||d[j].head.line<d[j+1].head.line)&&b.indentLine(d[j].head.line)}function d(b){return b.getOption("disableInput")?a.Pass:c(b,!0)}function e(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;++c)if(a[c]==b)return c;return-1}function f(b,c,d,e,f){if(!a.scanForClosingTag)return!1;var g=Math.min(b.lastLine()+1,d.line+500),h=a.scanForClosingTag(b,d,null,g);if(!h||h.tag!=c)return!1;for(var i=e.context,j=f?1:0;i&&i.tagName==c;i=i.prev)++j;d=h.to;for(var k=1;k<j;k++){var l=a.scanForClosingTag(b,d,null,g);if(!l||l.tag!=c)return!1;d=l.to}return!0}a.defineOption("autoCloseTags",!1,function(c,e,f){if(f!=a.Init&&f&&c.removeKeyMap("autoCloseTags"),e){var g={name:"autoCloseTags"};("object"!=typeof e||e.whenClosing)&&(g["'/'"]=function(a){return d(a)}),("object"!=typeof e||e.whenOpening)&&(g["'>'"]=function(a){return b(a)}),c.addKeyMap(g)}});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];a.commands.closeTag=function(a){return c(a)}});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){e.defineOption("autoCloseTags",!1,function(i,s,l){if(l!=e.Init&&l&&i.removeKeyMap("autoCloseTags"),s){var d={name:"autoCloseTags"};("object"!=typeof s||s.whenClosing)&&(d["'/'"]=function(t){return(n=t).getOption("disableInput")?e.Pass:o(n,!0);var n}),("object"!=typeof s||s.whenOpening)&&(d["'>'"]=function(o){return function(o){if(o.getOption("disableInput"))return e.Pass;for(var i=o.listSelections(),s=[],l=o.getOption("autoCloseTags"),d=0;d<i.length;d++){if(!i[d].empty())return e.Pass;var c=i[d].head,f=o.getTokenAt(c),g=e.innerMode(o.getMode(),f.state),u=g.state;if("xml"!=g.mode.name||!u.tagName)return e.Pass;var m="html"==g.mode.configuration,h="object"==typeof l&&l.dontCloseTags||m&&t,p="object"==typeof l&&l.indentTags||m&&n,v=u.tagName;f.end>c.ch&&(v=v.slice(0,v.length-f.end+c.ch));var b=v.toLowerCase();if(!v||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&"closeTag"==u.type||f.string.indexOf("/")==f.string.length-1||h&&a(h,b)>-1||r(o,v,c,u,!0))return e.Pass;var y=p&&a(p,b)>-1;s[d]={indent:y,text:">"+(y?"\n\n":"")+"</"+v+">",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var x="object"==typeof l&&l.dontIndentOnAutoClose,d=i.length-1;d>=0;d--){var P=s[d];o.replaceRange(P.text,i[d].head,i[d].anchor,"+insert");var T=o.listSelections().slice(0);T[d]={head:P.newPos,anchor:P.newPos},o.setSelections(T),!x&&P.indent&&(o.indentLine(P.newPos.line,null,!0),o.indentLine(P.newPos.line+1,null,!0))}}(o)}),i.addKeyMap(d)}});var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function o(t,n){for(var o=t.listSelections(),a=[],i=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,d=0;d<o.length;d++){if(!o[d].empty())return e.Pass;var c,f=o[d].head,g=t.getTokenAt(f),u=e.innerMode(t.getMode(),g.state),m=u.state;if(n&&("string"==g.type||"<"!=g.string.charAt(0)||g.start!=f.ch-1))return e.Pass;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)c=i+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;c=i+"style"}else{if(!m.context||!m.context.tagName||r(t,m.context.tagName,f,m))return e.Pass;c=i+m.context.tagName}">"!=t.getLine(f.line).charAt(g.end)&&(c+=">"),a[d]=c}if(t.replaceSelections(a),o=t.listSelections(),!l)for(d=0;d<o.length;d++)(d==o.length-1||o[d].head.line<o[d+1].head.line)&&t.indentLine(o[d].head.line)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function r(t,n,o,a,r){if(!e.scanForClosingTag)return!1;var i=Math.min(t.lastLine()+1,o.line+500),s=e.scanForClosingTag(t,o,null,i);if(!s||s.tag!=n)return!1;for(var l=a.context,d=r?1:0;l&&l.tagName==n;l=l.prev)++d;o=s.to;for(var c=1;c<d;c++){var f=e.scanForClosingTag(t,o,null,i);if(!f||f.tag!=n)return!1;o=f.to}return!0}e.commands.closeTag=function(e){return o(e)}});
\ No newline at end of file
index ed6d258..6d3d7ab 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){var d=b.line,e=0,f=0,g=c.exec(a.getLine(d)),h=g[1];do{e+=1;var i=d+e,j=a.getLine(i),k=c.exec(j);if(k){var l=k[1],m=parseInt(g[3],10)+e-f,n=parseInt(k[3],10),o=n;if(h===l)m===n&&(o=n+1),m>n&&(o=m+1),a.replaceRange(j.replace(c,l+o+k[4]+k[5]),{line:i,ch:0},{line:i,ch:j.length});else{if(h.length>l.length)return;if(h.length<l.length&&1===e)return;f+=1}}}while(k)}var c=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,d=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,e=/[*+-]\s/;a.commands.newlineAndIndentContinueMarkdownList=function(f){if(f.getOption("disableInput"))return a.Pass;for(var g=f.listSelections(),h=[],i=0;i<g.length;i++){var j=g[i].head,k=f.getStateAfter(j.line),l=k.list!==!1,m=0!==k.quote,n=f.getLine(j.line),o=c.exec(n),p=/^\s*$/.test(n.slice(0,j.ch));if(!g[i].empty()||!l&&!m||!o||p)return void f.execCommand("newlineAndIndent");if(d.test(n))/>\s*$/.test(n)||f.replaceRange("",{line:j.line,ch:0},{line:j.line,ch:j.ch+1}),h[i]="\n";else{var q=o[1],r=o[5],s=!(e.test(o[2])||o[2].indexOf(">")>=0),t=s?parseInt(o[3],10)+1+o[4]:o[2].replace("x"," ");h[i]="\n"+q+t+r,s&&b(f,j)}}f.replaceSelections(h)}});
\ No newline at end of file
+!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,t){var i=t.line,r=0,l=0,s=n.exec(e.getLine(i)),c=s[1];do{var o=i+(r+=1),a=e.getLine(o),d=n.exec(a);if(d){var f=d[1],p=parseInt(s[3],10)+r-l,u=parseInt(d[3],10),h=u;if(c===f)p===u&&(h=u+1),p>u&&(h=p+1),e.replaceRange(a.replace(n,f+h+d[4]+d[5]),{line:o,ch:0},{line:o,ch:a.length});else{if(c.length>f.length)return;if(c.length<f.length&&1===r)return;l+=1}}}while(d)}e.commands.newlineAndIndentContinueMarkdownList=function(l){if(l.getOption("disableInput"))return e.Pass;for(var s=l.listSelections(),c=[],o=0;o<s.length;o++){var a=s[o].head,d=l.getStateAfter(a.line),f=!1!==d.list,p=0!==d.quote,u=l.getLine(a.line),h=n.exec(u),g=/^\s*$/.test(u.slice(0,a.ch));if(!s[o].empty()||!f&&!p||!h||g)return void l.execCommand("newlineAndIndent");if(t.test(u))/>\s*$/.test(u)||l.replaceRange("",{line:a.line,ch:0},{line:a.line,ch:a.ch+1}),c[o]="\n";else{var m=h[1],x=h[5],v=!(i.test(h[2])||h[2].indexOf(">")>=0),I=v?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");c[o]="\n"+m+I+x,v&&r(l,a)}}l.replaceSelections(c)}});
\ No newline at end of file
index 59545da..5b8b3d6 100644 (file)
@@ -1 +1 @@
-!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d){var e=a.getLineHandle(b.line),f=b.ch-1,i=d&&d.afterCursor;null==i&&(i=/(^| )cm-fat-cursor($| )/.test(a.getWrapperElement().className));var j=!i&&f>=0&&h[e.text.charAt(f)]||h[e.text.charAt(++f)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&d.strict&&k>0!=(f==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,f+1)),m=c(a,g(b.line,f+(k>0?1:0)),k,l||null,d);return null==m?null:{from:g(b.line,f),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(c<0?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c!=(c>0?a.lastLine():a.firstLine())&&null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){a.state.matchBrackets.currentlyHighlighted&&(a.state.matchBrackets.currentlyHighlighted(),a.state.matchBrackets.currentlyHighlighted=null),a.state.matchBrackets.currentlyHighlighted=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.off("cursorActivity",e),b.state.matchBrackets&&b.state.matchBrackets.currentlyHighlighted&&(b.state.matchBrackets.currentlyHighlighted(),b.state.matchBrackets.currentlyHighlighted=null)),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return(d||"boolean"==typeof c)&&(d?(d.strict=c,c=d):c=c?{strict:!0}:null),b(this,a,c)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})});
\ No newline at end of file
+!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r=