From dbf8072343b4c1c972719fd98192d2a0a0cd8c03 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Mon, 22 May 2017 09:56:42 +0200 Subject: [PATCH] deploy dev version --- ...piskel-style-packaged-2017-05-05-12-13.css | 3917 -- clear_before_scale/img/icons.png | Bin 11499 -> 0 bytes clear_before_scale/img/icons@2x.png | Bin 25053 -> 0 bytes clear_before_scale/index.html | 1136 - .../js/piskel-packaged-2017-05-05-12-13.js | 31616 --------------- .../piskel-packaged-min-2017-05-05-12-13.js | 17 - clear_before_scale/logo.png | Bin 414 -> 0 bytes .../piskelapp-partials/main-partial.html | 1083 - clear_before_scale_v2/css/fonts/icomoon.eot | Bin 4416 -> 0 bytes clear_before_scale_v2/css/fonts/icomoon.svg | 28 - clear_before_scale_v2/css/fonts/icomoon.ttf | Bin 4252 -> 0 bytes clear_before_scale_v2/css/fonts/icomoon.woff | Bin 4328 -> 0 bytes clear_before_scale_v2/css/fonts/piskel.eot | Bin 2588 -> 0 bytes clear_before_scale_v2/css/fonts/piskel.svg | 13 - clear_before_scale_v2/css/fonts/piskel.ttf | Bin 2424 -> 0 bytes clear_before_scale_v2/css/fonts/piskel.woff | Bin 1848 -> 0 bytes ...piskel-style-packaged-2017-05-05-12-15.css | 3917 -- .../canvas-background-light.png | Bin 222 -> 0 bytes .../canvas-background-lowcontrast-dark.png | Bin 255 -> 0 bytes .../canvas-background-lowcontrast-medium.png | Bin 255 -> 0 bytes .../canvas-background-medium.png | Bin 254 -> 0 bytes clear_before_scale_v2/img/cursors/circle.png | Bin 766 -> 0 bytes .../img/cursors/color-palette.png | Bin 209 -> 0 bytes clear_before_scale_v2/img/cursors/dither.png | Bin 702 -> 0 bytes clear_before_scale_v2/img/cursors/dropper.png | Bin 543 -> 0 bytes clear_before_scale_v2/img/cursors/eraser.png | Bin 656 -> 0 bytes clear_before_scale_v2/img/cursors/hand.png | Bin 672 -> 0 bytes clear_before_scale_v2/img/cursors/lighten.png | Bin 606 -> 0 bytes .../img/cursors/mirror-pen.png | Bin 557 -> 0 bytes .../img/cursors/paint-bucket.png | Bin 707 -> 0 bytes clear_before_scale_v2/img/cursors/pen.png | Bin 450 -> 0 bytes .../img/cursors/rectangle.png | Bin 660 -> 0 bytes clear_before_scale_v2/img/cursors/select.png | Bin 1145 -> 0 bytes clear_before_scale_v2/img/cursors/stroke.png | Bin 617 -> 0 bytes .../img/cursors/vertical-mirror-pen.png | Bin 603 -> 0 bytes clear_before_scale_v2/img/cursors/wand.png | Bin 570 -> 0 bytes clear_before_scale_v2/img/favicon.png | Bin 177 -> 0 bytes clear_before_scale_v2/img/icons.png | Bin 11499 -> 0 bytes .../img/icons/common/common-keyboard-gold.png | Bin 340 -> 0 bytes .../icons/common/common-keyboard-gold@2x.png | Bin 570 -> 0 bytes .../common/common-swapcolors-arrow-grey.png | Bin 565 -> 0 bytes .../common-swapcolors-arrow-grey@2x.png | Bin 960 -> 0 bytes .../img/icons/common/common-warning-red.png | Bin 446 -> 0 bytes .../icons/common/common-warning-red@2x.png | Bin 851 -> 0 bytes .../img/icons/frame/frame-dragndrop-white.png | Bin 324 -> 0 bytes .../icons/frame/frame-dragndrop-white@2x.png | Bin 537 -> 0 bytes .../img/icons/frame/frame-duplicate-white.png | Bin 387 -> 0 bytes .../icons/frame/frame-duplicate-white@2x.png | Bin 664 -> 0 bytes .../img/icons/frame/frame-plus-white.png | Bin 210 -> 0 bytes .../img/icons/frame/frame-plus-white@2x.png | Bin 262 -> 0 bytes .../icons/frame/frame-recyclebin-white.png | Bin 319 -> 0 bytes .../icons/frame/frame-recyclebin-white@2x.png | Bin 539 -> 0 bytes .../minimap-popup-preview-arrow-gold.png | Bin 301 -> 0 bytes .../minimap-popup-preview-arrow-gold@2x.png | Bin 367 -> 0 bytes .../minimap-popup-preview-arrow-white.png | Bin 246 -> 0 bytes .../minimap-popup-preview-arrow-white@2x.png | Bin 357 -> 0 bytes .../icons/settings/settings-export-white.png | Bin 589 -> 0 bytes .../settings/settings-export-white@2x.png | Bin 1016 -> 0 bytes .../icons/settings/settings-gear-white.png | Bin 668 -> 0 bytes .../icons/settings/settings-gear-white@2x.png | Bin 1322 -> 0 bytes .../settings/settings-open-folder-white.png | Bin 587 -> 0 bytes .../settings-open-folder-white@2x.png | Bin 1008 -> 0 bytes .../icons/settings/settings-resize-white.png | Bin 392 -> 0 bytes .../settings/settings-resize-white@2x.png | Bin 656 -> 0 bytes .../icons/settings/settings-save-white.png | Bin 381 -> 0 bytes .../icons/settings/settings-save-white@2x.png | Bin 652 -> 0 bytes .../img/icons/tools/tool-circle.png | Bin 495 -> 0 bytes .../img/icons/tools/tool-circle@2x.png | Bin 1079 -> 0 bytes .../img/icons/tools/tool-colorpicker.png | Bin 563 -> 0 bytes .../img/icons/tools/tool-colorpicker@2x.png | Bin 1154 -> 0 bytes .../img/icons/tools/tool-colorswap.png | Bin 1329 -> 0 bytes .../img/icons/tools/tool-colorswap@2x.png | Bin 2844 -> 0 bytes .../img/icons/tools/tool-dithering.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-dithering@2x.png | Bin 393 -> 0 bytes .../img/icons/tools/tool-eraser.png | Bin 524 -> 0 bytes .../img/icons/tools/tool-eraser@2x.png | Bin 963 -> 0 bytes .../img/icons/tools/tool-lasso-select.png | Bin 827 -> 0 bytes .../img/icons/tools/tool-lasso-select@2x.png | Bin 1718 -> 0 bytes .../img/icons/tools/tool-lighten.png | Bin 690 -> 0 bytes .../img/icons/tools/tool-lighten@2x.png | Bin 1480 -> 0 bytes .../img/icons/tools/tool-move.png | Bin 547 -> 0 bytes .../img/icons/tools/tool-move@2x.png | Bin 1015 -> 0 bytes .../img/icons/tools/tool-paint-bucket.png | Bin 741 -> 0 bytes .../img/icons/tools/tool-paint-bucket@2x.png | Bin 1582 -> 0 bytes .../img/icons/tools/tool-pen.png | Bin 670 -> 0 bytes .../img/icons/tools/tool-pen@2x.png | Bin 1488 -> 0 bytes .../img/icons/tools/tool-rectangle-select.png | Bin 276 -> 0 bytes .../icons/tools/tool-rectangle-select@2x.png | Bin 425 -> 0 bytes .../img/icons/tools/tool-rectangle.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-rectangle@2x.png | Bin 395 -> 0 bytes .../img/icons/tools/tool-shape-select.png | Bin 580 -> 0 bytes .../img/icons/tools/tool-shape-select@2x.png | Bin 1288 -> 0 bytes .../img/icons/tools/tool-stroke.png | Bin 802 -> 0 bytes .../img/icons/tools/tool-stroke@2x.png | Bin 1687 -> 0 bytes .../icons/tools/tool-vertical-mirror-pen.png | Bin 744 -> 0 bytes .../tools/tool-vertical-mirror-pen@2x.png | Bin 1570 -> 0 bytes .../img/icons/transform/tool-center.png | Bin 297 -> 0 bytes .../img/icons/transform/tool-center@2x.png | Bin 457 -> 0 bytes .../img/icons/transform/tool-clone.png | Bin 621 -> 0 bytes .../img/icons/transform/tool-clone@2x.png | Bin 1206 -> 0 bytes .../img/icons/transform/tool-flip.png | Bin 708 -> 0 bytes .../img/icons/transform/tool-flip@2x.png | Bin 1237 -> 0 bytes .../img/icons/transform/tool-rotate.png | Bin 815 -> 0 bytes .../img/icons/transform/tool-rotate@2x.png | Bin 1707 -> 0 bytes clear_before_scale_v2/img/icons@2x.png | Bin 25053 -> 0 bytes .../img/unused/circle-dark.png | Bin 3356 -> 0 bytes .../img/unused/eraser-dark.png | Bin 909 -> 0 bytes .../img/unused/eyedropper-dark.png | Bin 3918 -> 0 bytes clear_before_scale_v2/img/unused/gallery.png | Bin 305 -> 0 bytes .../img/unused/hand-dark.png | Bin 1519 -> 0 bytes .../img/unused/lasso-dark.png | Bin 2779 -> 0 bytes .../img/unused/magicwand-dark.png | Bin 7703 -> 0 bytes .../img/unused/paintbucket-dark.png | Bin 4104 -> 0 bytes clear_before_scale_v2/img/unused/pen-dark.png | Bin 1679 -> 0 bytes .../img/unused/rectangle-dark.png | Bin 253 -> 0 bytes .../img/unused/rectangle_selection-dark.png | Bin 376 -> 0 bytes .../js/lib/gif/gif.ie.worker.js | 1 - .../js/piskel-packaged-2017-05-05-12-15.js | 31616 --------------- .../piskel-packaged-min-2017-05-05-12-15.js | 17 - clear_before_scale_v2/logo.png | Bin 414 -> 0 bytes .../piskelapp-partials/main-partial.html | 1083 - clear_before_translate/css/fonts/icomoon.eot | Bin 4416 -> 0 bytes clear_before_translate/css/fonts/icomoon.svg | 28 - clear_before_translate/css/fonts/icomoon.ttf | Bin 4252 -> 0 bytes clear_before_translate/css/fonts/icomoon.woff | Bin 4328 -> 0 bytes clear_before_translate/css/fonts/piskel.eot | Bin 2588 -> 0 bytes clear_before_translate/css/fonts/piskel.svg | 13 - clear_before_translate/css/fonts/piskel.ttf | Bin 2424 -> 0 bytes clear_before_translate/css/fonts/piskel.woff | Bin 1848 -> 0 bytes ...piskel-style-packaged-2017-05-05-12-17.css | 3917 -- .../canvas-background-light.png | Bin 222 -> 0 bytes .../canvas-background-lowcontrast-dark.png | Bin 255 -> 0 bytes .../canvas-background-lowcontrast-medium.png | Bin 255 -> 0 bytes .../canvas-background-medium.png | Bin 254 -> 0 bytes clear_before_translate/img/cursors/circle.png | Bin 766 -> 0 bytes .../img/cursors/color-palette.png | Bin 209 -> 0 bytes clear_before_translate/img/cursors/dither.png | Bin 702 -> 0 bytes .../img/cursors/dropper.png | Bin 543 -> 0 bytes clear_before_translate/img/cursors/eraser.png | Bin 656 -> 0 bytes clear_before_translate/img/cursors/hand.png | Bin 672 -> 0 bytes .../img/cursors/lighten.png | Bin 606 -> 0 bytes .../img/cursors/mirror-pen.png | Bin 557 -> 0 bytes .../img/cursors/paint-bucket.png | Bin 707 -> 0 bytes clear_before_translate/img/cursors/pen.png | Bin 450 -> 0 bytes .../img/cursors/rectangle.png | Bin 660 -> 0 bytes clear_before_translate/img/cursors/select.png | Bin 1145 -> 0 bytes clear_before_translate/img/cursors/stroke.png | Bin 617 -> 0 bytes .../img/cursors/vertical-mirror-pen.png | Bin 603 -> 0 bytes clear_before_translate/img/cursors/wand.png | Bin 570 -> 0 bytes clear_before_translate/img/favicon.png | Bin 177 -> 0 bytes clear_before_translate/img/icons.png | Bin 11499 -> 0 bytes .../img/icons/common/common-keyboard-gold.png | Bin 340 -> 0 bytes .../icons/common/common-keyboard-gold@2x.png | Bin 570 -> 0 bytes .../common/common-swapcolors-arrow-grey.png | Bin 565 -> 0 bytes .../common-swapcolors-arrow-grey@2x.png | Bin 960 -> 0 bytes .../img/icons/common/common-warning-red.png | Bin 446 -> 0 bytes .../icons/common/common-warning-red@2x.png | Bin 851 -> 0 bytes .../img/icons/frame/frame-dragndrop-white.png | Bin 324 -> 0 bytes .../icons/frame/frame-dragndrop-white@2x.png | Bin 537 -> 0 bytes .../img/icons/frame/frame-duplicate-white.png | Bin 387 -> 0 bytes .../icons/frame/frame-duplicate-white@2x.png | Bin 664 -> 0 bytes .../img/icons/frame/frame-plus-white.png | Bin 210 -> 0 bytes .../img/icons/frame/frame-plus-white@2x.png | Bin 262 -> 0 bytes .../icons/frame/frame-recyclebin-white.png | Bin 319 -> 0 bytes .../icons/frame/frame-recyclebin-white@2x.png | Bin 539 -> 0 bytes .../minimap-popup-preview-arrow-gold.png | Bin 301 -> 0 bytes .../minimap-popup-preview-arrow-gold@2x.png | Bin 367 -> 0 bytes .../minimap-popup-preview-arrow-white.png | Bin 246 -> 0 bytes .../minimap-popup-preview-arrow-white@2x.png | Bin 357 -> 0 bytes .../icons/settings/settings-export-white.png | Bin 589 -> 0 bytes .../settings/settings-export-white@2x.png | Bin 1016 -> 0 bytes .../icons/settings/settings-gear-white.png | Bin 668 -> 0 bytes .../icons/settings/settings-gear-white@2x.png | Bin 1322 -> 0 bytes .../settings/settings-open-folder-white.png | Bin 587 -> 0 bytes .../settings-open-folder-white@2x.png | Bin 1008 -> 0 bytes .../icons/settings/settings-resize-white.png | Bin 392 -> 0 bytes .../settings/settings-resize-white@2x.png | Bin 656 -> 0 bytes .../icons/settings/settings-save-white.png | Bin 381 -> 0 bytes .../icons/settings/settings-save-white@2x.png | Bin 652 -> 0 bytes .../img/icons/tools/tool-circle.png | Bin 495 -> 0 bytes .../img/icons/tools/tool-circle@2x.png | Bin 1079 -> 0 bytes .../img/icons/tools/tool-colorpicker.png | Bin 563 -> 0 bytes .../img/icons/tools/tool-colorpicker@2x.png | Bin 1154 -> 0 bytes .../img/icons/tools/tool-colorswap.png | Bin 1329 -> 0 bytes .../img/icons/tools/tool-colorswap@2x.png | Bin 2844 -> 0 bytes .../img/icons/tools/tool-dithering.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-dithering@2x.png | Bin 393 -> 0 bytes .../img/icons/tools/tool-eraser.png | Bin 524 -> 0 bytes .../img/icons/tools/tool-eraser@2x.png | Bin 963 -> 0 bytes .../img/icons/tools/tool-lasso-select.png | Bin 827 -> 0 bytes .../img/icons/tools/tool-lasso-select@2x.png | Bin 1718 -> 0 bytes .../img/icons/tools/tool-lighten.png | Bin 690 -> 0 bytes .../img/icons/tools/tool-lighten@2x.png | Bin 1480 -> 0 bytes .../img/icons/tools/tool-move.png | Bin 547 -> 0 bytes .../img/icons/tools/tool-move@2x.png | Bin 1015 -> 0 bytes .../img/icons/tools/tool-paint-bucket.png | Bin 741 -> 0 bytes .../img/icons/tools/tool-paint-bucket@2x.png | Bin 1582 -> 0 bytes .../img/icons/tools/tool-pen.png | Bin 670 -> 0 bytes .../img/icons/tools/tool-pen@2x.png | Bin 1488 -> 0 bytes .../img/icons/tools/tool-rectangle-select.png | Bin 276 -> 0 bytes .../icons/tools/tool-rectangle-select@2x.png | Bin 425 -> 0 bytes .../img/icons/tools/tool-rectangle.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-rectangle@2x.png | Bin 395 -> 0 bytes .../img/icons/tools/tool-shape-select.png | Bin 580 -> 0 bytes .../img/icons/tools/tool-shape-select@2x.png | Bin 1288 -> 0 bytes .../img/icons/tools/tool-stroke.png | Bin 802 -> 0 bytes .../img/icons/tools/tool-stroke@2x.png | Bin 1687 -> 0 bytes .../icons/tools/tool-vertical-mirror-pen.png | Bin 744 -> 0 bytes .../tools/tool-vertical-mirror-pen@2x.png | Bin 1570 -> 0 bytes .../img/icons/transform/tool-center.png | Bin 297 -> 0 bytes .../img/icons/transform/tool-center@2x.png | Bin 457 -> 0 bytes .../img/icons/transform/tool-clone.png | Bin 621 -> 0 bytes .../img/icons/transform/tool-clone@2x.png | Bin 1206 -> 0 bytes .../img/icons/transform/tool-flip.png | Bin 708 -> 0 bytes .../img/icons/transform/tool-flip@2x.png | Bin 1237 -> 0 bytes .../img/icons/transform/tool-rotate.png | Bin 815 -> 0 bytes .../img/icons/transform/tool-rotate@2x.png | Bin 1707 -> 0 bytes clear_before_translate/img/icons@2x.png | Bin 25053 -> 0 bytes .../img/unused/circle-dark.png | Bin 3356 -> 0 bytes .../img/unused/eraser-dark.png | Bin 909 -> 0 bytes .../img/unused/eyedropper-dark.png | Bin 3918 -> 0 bytes clear_before_translate/img/unused/gallery.png | Bin 305 -> 0 bytes .../img/unused/hand-dark.png | Bin 1519 -> 0 bytes .../img/unused/lasso-dark.png | Bin 2779 -> 0 bytes .../img/unused/magicwand-dark.png | Bin 7703 -> 0 bytes .../img/unused/paintbucket-dark.png | Bin 4104 -> 0 bytes .../img/unused/pen-dark.png | Bin 1679 -> 0 bytes .../img/unused/rectangle-dark.png | Bin 253 -> 0 bytes .../img/unused/rectangle_selection-dark.png | Bin 376 -> 0 bytes clear_before_translate/index.html | 1136 - .../js/lib/gif/gif.ie.worker.js | 1 - .../js/piskel-packaged-2017-05-05-12-17.js | 31620 --------------- .../piskel-packaged-min-2017-05-05-12-17.js | 17 - clear_before_translate/logo.png | Bin 414 -> 0 bytes .../piskelapp-partials/main-partial.html | 1083 - clear_capped/css/fonts/icomoon.eot | Bin 4416 -> 0 bytes clear_capped/css/fonts/icomoon.svg | 28 - clear_capped/css/fonts/icomoon.ttf | Bin 4252 -> 0 bytes clear_capped/css/fonts/icomoon.woff | Bin 4328 -> 0 bytes clear_capped/css/fonts/piskel.eot | Bin 2588 -> 0 bytes clear_capped/css/fonts/piskel.svg | 13 - clear_capped/css/fonts/piskel.ttf | Bin 2424 -> 0 bytes clear_capped/css/fonts/piskel.woff | Bin 1848 -> 0 bytes ...piskel-style-packaged-2017-05-05-01-56.css | 3917 -- .../canvas-background-light.png | Bin 222 -> 0 bytes .../canvas-background-lowcontrast-dark.png | Bin 255 -> 0 bytes .../canvas-background-lowcontrast-medium.png | Bin 255 -> 0 bytes .../canvas-background-medium.png | Bin 254 -> 0 bytes clear_capped/img/cursors/circle.png | Bin 766 -> 0 bytes clear_capped/img/cursors/color-palette.png | Bin 209 -> 0 bytes clear_capped/img/cursors/dither.png | Bin 702 -> 0 bytes clear_capped/img/cursors/dropper.png | Bin 543 -> 0 bytes clear_capped/img/cursors/eraser.png | Bin 656 -> 0 bytes clear_capped/img/cursors/hand.png | Bin 672 -> 0 bytes clear_capped/img/cursors/lighten.png | Bin 606 -> 0 bytes clear_capped/img/cursors/mirror-pen.png | Bin 557 -> 0 bytes clear_capped/img/cursors/paint-bucket.png | Bin 707 -> 0 bytes clear_capped/img/cursors/pen.png | Bin 450 -> 0 bytes clear_capped/img/cursors/rectangle.png | Bin 660 -> 0 bytes clear_capped/img/cursors/select.png | Bin 1145 -> 0 bytes clear_capped/img/cursors/stroke.png | Bin 617 -> 0 bytes .../img/cursors/vertical-mirror-pen.png | Bin 603 -> 0 bytes clear_capped/img/cursors/wand.png | Bin 570 -> 0 bytes clear_capped/img/favicon.png | Bin 177 -> 0 bytes clear_capped/img/icons.png | Bin 11499 -> 0 bytes .../img/icons/common/common-keyboard-gold.png | Bin 340 -> 0 bytes .../icons/common/common-keyboard-gold@2x.png | Bin 570 -> 0 bytes .../common/common-swapcolors-arrow-grey.png | Bin 565 -> 0 bytes .../common-swapcolors-arrow-grey@2x.png | Bin 960 -> 0 bytes .../img/icons/common/common-warning-red.png | Bin 446 -> 0 bytes .../icons/common/common-warning-red@2x.png | Bin 851 -> 0 bytes .../img/icons/frame/frame-dragndrop-white.png | Bin 324 -> 0 bytes .../icons/frame/frame-dragndrop-white@2x.png | Bin 537 -> 0 bytes .../img/icons/frame/frame-duplicate-white.png | Bin 387 -> 0 bytes .../icons/frame/frame-duplicate-white@2x.png | Bin 664 -> 0 bytes .../img/icons/frame/frame-plus-white.png | Bin 210 -> 0 bytes .../img/icons/frame/frame-plus-white@2x.png | Bin 262 -> 0 bytes .../icons/frame/frame-recyclebin-white.png | Bin 319 -> 0 bytes .../icons/frame/frame-recyclebin-white@2x.png | Bin 539 -> 0 bytes .../minimap-popup-preview-arrow-gold.png | Bin 301 -> 0 bytes .../minimap-popup-preview-arrow-gold@2x.png | Bin 367 -> 0 bytes .../minimap-popup-preview-arrow-white.png | Bin 246 -> 0 bytes .../minimap-popup-preview-arrow-white@2x.png | Bin 357 -> 0 bytes .../icons/settings/settings-export-white.png | Bin 589 -> 0 bytes .../settings/settings-export-white@2x.png | Bin 1016 -> 0 bytes .../icons/settings/settings-gear-white.png | Bin 668 -> 0 bytes .../icons/settings/settings-gear-white@2x.png | Bin 1322 -> 0 bytes .../settings/settings-open-folder-white.png | Bin 587 -> 0 bytes .../settings-open-folder-white@2x.png | Bin 1008 -> 0 bytes .../icons/settings/settings-resize-white.png | Bin 392 -> 0 bytes .../settings/settings-resize-white@2x.png | Bin 656 -> 0 bytes .../icons/settings/settings-save-white.png | Bin 381 -> 0 bytes .../icons/settings/settings-save-white@2x.png | Bin 652 -> 0 bytes clear_capped/img/icons/tools/tool-circle.png | Bin 495 -> 0 bytes .../img/icons/tools/tool-circle@2x.png | Bin 1079 -> 0 bytes .../img/icons/tools/tool-colorpicker.png | Bin 563 -> 0 bytes .../img/icons/tools/tool-colorpicker@2x.png | Bin 1154 -> 0 bytes .../img/icons/tools/tool-colorswap.png | Bin 1329 -> 0 bytes .../img/icons/tools/tool-colorswap@2x.png | Bin 2844 -> 0 bytes .../img/icons/tools/tool-dithering.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-dithering@2x.png | Bin 393 -> 0 bytes clear_capped/img/icons/tools/tool-eraser.png | Bin 524 -> 0 bytes .../img/icons/tools/tool-eraser@2x.png | Bin 963 -> 0 bytes .../img/icons/tools/tool-lasso-select.png | Bin 827 -> 0 bytes .../img/icons/tools/tool-lasso-select@2x.png | Bin 1718 -> 0 bytes clear_capped/img/icons/tools/tool-lighten.png | Bin 690 -> 0 bytes .../img/icons/tools/tool-lighten@2x.png | Bin 1480 -> 0 bytes clear_capped/img/icons/tools/tool-move.png | Bin 547 -> 0 bytes clear_capped/img/icons/tools/tool-move@2x.png | Bin 1015 -> 0 bytes .../img/icons/tools/tool-paint-bucket.png | Bin 741 -> 0 bytes .../img/icons/tools/tool-paint-bucket@2x.png | Bin 1582 -> 0 bytes clear_capped/img/icons/tools/tool-pen.png | Bin 670 -> 0 bytes clear_capped/img/icons/tools/tool-pen@2x.png | Bin 1488 -> 0 bytes .../img/icons/tools/tool-rectangle-select.png | Bin 276 -> 0 bytes .../icons/tools/tool-rectangle-select@2x.png | Bin 425 -> 0 bytes .../img/icons/tools/tool-rectangle.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-rectangle@2x.png | Bin 395 -> 0 bytes .../img/icons/tools/tool-shape-select.png | Bin 580 -> 0 bytes .../img/icons/tools/tool-shape-select@2x.png | Bin 1288 -> 0 bytes clear_capped/img/icons/tools/tool-stroke.png | Bin 802 -> 0 bytes .../img/icons/tools/tool-stroke@2x.png | Bin 1687 -> 0 bytes .../icons/tools/tool-vertical-mirror-pen.png | Bin 744 -> 0 bytes .../tools/tool-vertical-mirror-pen@2x.png | Bin 1570 -> 0 bytes .../img/icons/transform/tool-center.png | Bin 297 -> 0 bytes .../img/icons/transform/tool-center@2x.png | Bin 457 -> 0 bytes .../img/icons/transform/tool-clone.png | Bin 621 -> 0 bytes .../img/icons/transform/tool-clone@2x.png | Bin 1206 -> 0 bytes .../img/icons/transform/tool-flip.png | Bin 708 -> 0 bytes .../img/icons/transform/tool-flip@2x.png | Bin 1237 -> 0 bytes .../img/icons/transform/tool-rotate.png | Bin 815 -> 0 bytes .../img/icons/transform/tool-rotate@2x.png | Bin 1707 -> 0 bytes clear_capped/img/icons@2x.png | Bin 25053 -> 0 bytes clear_capped/img/unused/circle-dark.png | Bin 3356 -> 0 bytes clear_capped/img/unused/eraser-dark.png | Bin 909 -> 0 bytes clear_capped/img/unused/eyedropper-dark.png | Bin 3918 -> 0 bytes clear_capped/img/unused/gallery.png | Bin 305 -> 0 bytes clear_capped/img/unused/hand-dark.png | Bin 1519 -> 0 bytes clear_capped/img/unused/lasso-dark.png | Bin 2779 -> 0 bytes clear_capped/img/unused/magicwand-dark.png | Bin 7703 -> 0 bytes clear_capped/img/unused/paintbucket-dark.png | Bin 4104 -> 0 bytes clear_capped/img/unused/pen-dark.png | Bin 1679 -> 0 bytes clear_capped/img/unused/rectangle-dark.png | Bin 253 -> 0 bytes .../img/unused/rectangle_selection-dark.png | Bin 376 -> 0 bytes clear_capped/index.html | 1136 - clear_capped/js/lib/gif/gif.ie.worker.js | 1 - .../js/piskel-packaged-2017-05-05-01-56.js | 31620 --------------- .../piskel-packaged-min-2017-05-05-01-56.js | 17 - clear_capped/logo.png | Bin 414 -> 0 bytes .../piskelapp-partials/main-partial.html | 1083 - clear_capped_v2/css/fonts/icomoon.eot | Bin 4416 -> 0 bytes clear_capped_v2/css/fonts/icomoon.svg | 28 - clear_capped_v2/css/fonts/icomoon.ttf | Bin 4252 -> 0 bytes clear_capped_v2/css/fonts/icomoon.woff | Bin 4328 -> 0 bytes clear_capped_v2/css/fonts/piskel.eot | Bin 2588 -> 0 bytes clear_capped_v2/css/fonts/piskel.svg | 13 - clear_capped_v2/css/fonts/piskel.ttf | Bin 2424 -> 0 bytes clear_capped_v2/css/fonts/piskel.woff | Bin 1848 -> 0 bytes ...piskel-style-packaged-2017-05-05-03-16.css | 3917 -- .../canvas-background-light.png | Bin 222 -> 0 bytes .../canvas-background-lowcontrast-dark.png | Bin 255 -> 0 bytes .../canvas-background-lowcontrast-medium.png | Bin 255 -> 0 bytes .../canvas-background-medium.png | Bin 254 -> 0 bytes clear_capped_v2/img/cursors/circle.png | Bin 766 -> 0 bytes clear_capped_v2/img/cursors/color-palette.png | Bin 209 -> 0 bytes clear_capped_v2/img/cursors/dither.png | Bin 702 -> 0 bytes clear_capped_v2/img/cursors/dropper.png | Bin 543 -> 0 bytes clear_capped_v2/img/cursors/eraser.png | Bin 656 -> 0 bytes clear_capped_v2/img/cursors/hand.png | Bin 672 -> 0 bytes clear_capped_v2/img/cursors/lighten.png | Bin 606 -> 0 bytes clear_capped_v2/img/cursors/mirror-pen.png | Bin 557 -> 0 bytes clear_capped_v2/img/cursors/paint-bucket.png | Bin 707 -> 0 bytes clear_capped_v2/img/cursors/pen.png | Bin 450 -> 0 bytes clear_capped_v2/img/cursors/rectangle.png | Bin 660 -> 0 bytes clear_capped_v2/img/cursors/select.png | Bin 1145 -> 0 bytes clear_capped_v2/img/cursors/stroke.png | Bin 617 -> 0 bytes .../img/cursors/vertical-mirror-pen.png | Bin 603 -> 0 bytes clear_capped_v2/img/cursors/wand.png | Bin 570 -> 0 bytes clear_capped_v2/img/favicon.png | Bin 177 -> 0 bytes clear_capped_v2/img/icons.png | Bin 11499 -> 0 bytes .../img/icons/common/common-keyboard-gold.png | Bin 340 -> 0 bytes .../icons/common/common-keyboard-gold@2x.png | Bin 570 -> 0 bytes .../common/common-swapcolors-arrow-grey.png | Bin 565 -> 0 bytes .../common-swapcolors-arrow-grey@2x.png | Bin 960 -> 0 bytes .../img/icons/common/common-warning-red.png | Bin 446 -> 0 bytes .../icons/common/common-warning-red@2x.png | Bin 851 -> 0 bytes .../img/icons/frame/frame-dragndrop-white.png | Bin 324 -> 0 bytes .../icons/frame/frame-dragndrop-white@2x.png | Bin 537 -> 0 bytes .../img/icons/frame/frame-duplicate-white.png | Bin 387 -> 0 bytes .../icons/frame/frame-duplicate-white@2x.png | Bin 664 -> 0 bytes .../img/icons/frame/frame-plus-white.png | Bin 210 -> 0 bytes .../img/icons/frame/frame-plus-white@2x.png | Bin 262 -> 0 bytes .../icons/frame/frame-recyclebin-white.png | Bin 319 -> 0 bytes .../icons/frame/frame-recyclebin-white@2x.png | Bin 539 -> 0 bytes .../minimap-popup-preview-arrow-gold.png | Bin 301 -> 0 bytes .../minimap-popup-preview-arrow-gold@2x.png | Bin 367 -> 0 bytes .../minimap-popup-preview-arrow-white.png | Bin 246 -> 0 bytes .../minimap-popup-preview-arrow-white@2x.png | Bin 357 -> 0 bytes .../icons/settings/settings-export-white.png | Bin 589 -> 0 bytes .../settings/settings-export-white@2x.png | Bin 1016 -> 0 bytes .../icons/settings/settings-gear-white.png | Bin 668 -> 0 bytes .../icons/settings/settings-gear-white@2x.png | Bin 1322 -> 0 bytes .../settings/settings-open-folder-white.png | Bin 587 -> 0 bytes .../settings-open-folder-white@2x.png | Bin 1008 -> 0 bytes .../icons/settings/settings-resize-white.png | Bin 392 -> 0 bytes .../settings/settings-resize-white@2x.png | Bin 656 -> 0 bytes .../icons/settings/settings-save-white.png | Bin 381 -> 0 bytes .../icons/settings/settings-save-white@2x.png | Bin 652 -> 0 bytes .../img/icons/tools/tool-circle.png | Bin 495 -> 0 bytes .../img/icons/tools/tool-circle@2x.png | Bin 1079 -> 0 bytes .../img/icons/tools/tool-colorpicker.png | Bin 563 -> 0 bytes .../img/icons/tools/tool-colorpicker@2x.png | Bin 1154 -> 0 bytes .../img/icons/tools/tool-colorswap.png | Bin 1329 -> 0 bytes .../img/icons/tools/tool-colorswap@2x.png | Bin 2844 -> 0 bytes .../img/icons/tools/tool-dithering.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-dithering@2x.png | Bin 393 -> 0 bytes .../img/icons/tools/tool-eraser.png | Bin 524 -> 0 bytes .../img/icons/tools/tool-eraser@2x.png | Bin 963 -> 0 bytes .../img/icons/tools/tool-lasso-select.png | Bin 827 -> 0 bytes .../img/icons/tools/tool-lasso-select@2x.png | Bin 1718 -> 0 bytes .../img/icons/tools/tool-lighten.png | Bin 690 -> 0 bytes .../img/icons/tools/tool-lighten@2x.png | Bin 1480 -> 0 bytes clear_capped_v2/img/icons/tools/tool-move.png | Bin 547 -> 0 bytes .../img/icons/tools/tool-move@2x.png | Bin 1015 -> 0 bytes .../img/icons/tools/tool-paint-bucket.png | Bin 741 -> 0 bytes .../img/icons/tools/tool-paint-bucket@2x.png | Bin 1582 -> 0 bytes clear_capped_v2/img/icons/tools/tool-pen.png | Bin 670 -> 0 bytes .../img/icons/tools/tool-pen@2x.png | Bin 1488 -> 0 bytes .../img/icons/tools/tool-rectangle-select.png | Bin 276 -> 0 bytes .../icons/tools/tool-rectangle-select@2x.png | Bin 425 -> 0 bytes .../img/icons/tools/tool-rectangle.png | Bin 245 -> 0 bytes .../img/icons/tools/tool-rectangle@2x.png | Bin 395 -> 0 bytes .../img/icons/tools/tool-shape-select.png | Bin 580 -> 0 bytes .../img/icons/tools/tool-shape-select@2x.png | Bin 1288 -> 0 bytes .../img/icons/tools/tool-stroke.png | Bin 802 -> 0 bytes .../img/icons/tools/tool-stroke@2x.png | Bin 1687 -> 0 bytes .../icons/tools/tool-vertical-mirror-pen.png | Bin 744 -> 0 bytes .../tools/tool-vertical-mirror-pen@2x.png | Bin 1570 -> 0 bytes .../img/icons/transform/tool-center.png | Bin 297 -> 0 bytes .../img/icons/transform/tool-center@2x.png | Bin 457 -> 0 bytes .../img/icons/transform/tool-clone.png | Bin 621 -> 0 bytes .../img/icons/transform/tool-clone@2x.png | Bin 1206 -> 0 bytes .../img/icons/transform/tool-flip.png | Bin 708 -> 0 bytes .../img/icons/transform/tool-flip@2x.png | Bin 1237 -> 0 bytes .../img/icons/transform/tool-rotate.png | Bin 815 -> 0 bytes .../img/icons/transform/tool-rotate@2x.png | Bin 1707 -> 0 bytes clear_capped_v2/img/icons@2x.png | Bin 25053 -> 0 bytes clear_capped_v2/img/unused/circle-dark.png | Bin 3356 -> 0 bytes clear_capped_v2/img/unused/eraser-dark.png | Bin 909 -> 0 bytes .../img/unused/eyedropper-dark.png | Bin 3918 -> 0 bytes clear_capped_v2/img/unused/gallery.png | Bin 305 -> 0 bytes clear_capped_v2/img/unused/hand-dark.png | Bin 1519 -> 0 bytes clear_capped_v2/img/unused/lasso-dark.png | Bin 2779 -> 0 bytes clear_capped_v2/img/unused/magicwand-dark.png | Bin 7703 -> 0 bytes .../img/unused/paintbucket-dark.png | Bin 4104 -> 0 bytes clear_capped_v2/img/unused/pen-dark.png | Bin 1679 -> 0 bytes clear_capped_v2/img/unused/rectangle-dark.png | Bin 253 -> 0 bytes .../img/unused/rectangle_selection-dark.png | Bin 376 -> 0 bytes clear_capped_v2/index.html | 1136 - clear_capped_v2/js/lib/gif/gif.ie.worker.js | 1 - .../js/piskel-packaged-2017-05-05-03-16.js | 31614 --------------- .../piskel-packaged-min-2017-05-05-03-16.js | 17 - clear_capped_v2/logo.png | Bin 414 -> 0 bytes .../piskelapp-partials/main-partial.html | 1083 - dev/css/animations.css | 9 + .../bootstrap/bootstrap-tooltip-custom.css | 8 + dev/css/bootstrap/bootstrap.css | 112 + dev/css/bootstrap/readme.txt | 1 + dev/css/color-picker-slider.css | 105 + dev/css/dialogs-browse-local.css | 51 + dev/css/dialogs-cheatsheet.css | 227 + dev/css/dialogs-create-palette.css | 169 + dev/css/dialogs-import.css | 292 + dev/css/dialogs-performance-info.css | 68 + dev/css/dialogs-unsupported-browser.css | 32 + dev/css/dialogs.css | 84 + dev/css/font-icon.css | 96 + .../css/fonts/icomoon.eot | Bin .../css/fonts/icomoon.svg | 0 .../css/fonts/icomoon.ttf | Bin .../css/fonts/icomoon.woff | Bin .../css/fonts/piskel.eot | Bin .../css/fonts/piskel.svg | 0 .../css/fonts/piskel.ttf | Bin .../css/fonts/piskel.woff | Bin dev/css/forms.css | 78 + dev/css/frames-list.css | 182 + dev/css/icons.css | 362 + dev/css/layout.css | 160 + dev/css/minimap.css | 8 + dev/css/notifications.css | 72 + dev/css/pensize.css | 57 + dev/css/reset.css | 52 + dev/css/settings-application.css | 94 + dev/css/settings-export.css | 185 + dev/css/settings-import.css | 18 + dev/css/settings-resize.css | 12 + dev/css/settings-save.css | 36 + dev/css/settings.css | 96 + dev/css/spectrum/spectrum-overrides.css | 118 + dev/css/spectrum/spectrum.css | 477 + dev/css/style.css | 91 + dev/css/toolbox-animated-preview.css | 200 + dev/css/toolbox-layers-list.css | 92 + dev/css/toolbox-palettes-list.css | 174 + dev/css/toolbox.css | 44 + dev/css/tools.css | 167 + dev/css/transformations.css | 40 + dev/css/variables.css | 3 + dev/css/widgets-anchor.css | 98 + dev/css/widgets-frame-picker.css | 55 + dev/css/widgets-wizard.css | 32 + .../canvas-background-light.png | Bin .../canvas-background-lowcontrast-dark.png | Bin .../canvas-background-lowcontrast-medium.png | Bin .../canvas-background-medium.png | Bin .../img/cursors/circle.png | Bin .../img/cursors/color-palette.png | Bin .../img/cursors/dither.png | Bin .../img/cursors/dropper.png | Bin .../img/cursors/eraser.png | Bin .../img/cursors/hand.png | Bin .../img/cursors/lighten.png | Bin .../img/cursors/mirror-pen.png | Bin .../img/cursors/paint-bucket.png | Bin .../img/cursors/pen.png | Bin .../img/cursors/rectangle.png | Bin .../img/cursors/select.png | Bin .../img/cursors/stroke.png | Bin .../img/cursors/vertical-mirror-pen.png | Bin .../img/cursors/wand.png | Bin {clear_before_scale => dev}/img/favicon.png | Bin dev/img/icons.png | Bin 0 -> 11775 bytes .../img/icons/common/common-keyboard-gold.png | Bin .../icons/common/common-keyboard-gold@2x.png | Bin .../common/common-swapcolors-arrow-grey.png | Bin .../common-swapcolors-arrow-grey@2x.png | Bin .../img/icons/common/common-warning-red.png | Bin .../icons/common/common-warning-red@2x.png | Bin .../img/icons/frame/frame-dragndrop-white.png | Bin .../icons/frame/frame-dragndrop-white@2x.png | Bin .../img/icons/frame/frame-duplicate-white.png | Bin .../icons/frame/frame-duplicate-white@2x.png | Bin .../img/icons/frame/frame-plus-white.png | Bin .../img/icons/frame/frame-plus-white@2x.png | Bin .../icons/frame/frame-recyclebin-white.png | Bin .../icons/frame/frame-recyclebin-white@2x.png | Bin .../minimap-popup-preview-arrow-gold.png | Bin .../minimap-popup-preview-arrow-gold@2x.png | Bin .../minimap-popup-preview-arrow-white.png | Bin .../minimap-popup-preview-arrow-white@2x.png | Bin .../icons/settings/settings-export-white.png | Bin .../settings/settings-export-white@2x.png | Bin .../icons/settings/settings-gear-white.png | Bin .../icons/settings/settings-gear-white@2x.png | Bin .../settings/settings-open-folder-white.png | Bin .../settings-open-folder-white@2x.png | Bin .../icons/settings/settings-resize-white.png | Bin .../settings/settings-resize-white@2x.png | Bin .../icons/settings/settings-save-white.png | Bin .../icons/settings/settings-save-white@2x.png | Bin .../img/icons/tools/tool-circle.png | Bin .../img/icons/tools/tool-circle@2x.png | Bin .../img/icons/tools/tool-colorpicker.png | Bin .../img/icons/tools/tool-colorpicker@2x.png | Bin .../img/icons/tools/tool-colorswap.png | Bin .../img/icons/tools/tool-colorswap@2x.png | Bin .../img/icons/tools/tool-dithering.png | Bin .../img/icons/tools/tool-dithering@2x.png | Bin .../img/icons/tools/tool-eraser.png | Bin .../img/icons/tools/tool-eraser@2x.png | Bin .../img/icons/tools/tool-lasso-select.png | Bin .../img/icons/tools/tool-lasso-select@2x.png | Bin .../img/icons/tools/tool-lighten.png | Bin .../img/icons/tools/tool-lighten@2x.png | Bin .../img/icons/tools/tool-move.png | Bin .../img/icons/tools/tool-move@2x.png | Bin .../img/icons/tools/tool-paint-bucket.png | Bin .../img/icons/tools/tool-paint-bucket@2x.png | Bin .../img/icons/tools/tool-pen.png | Bin .../img/icons/tools/tool-pen@2x.png | Bin .../img/icons/tools/tool-rectangle-select.png | Bin .../icons/tools/tool-rectangle-select@2x.png | Bin .../img/icons/tools/tool-rectangle.png | Bin .../img/icons/tools/tool-rectangle@2x.png | Bin .../img/icons/tools/tool-shape-select.png | Bin .../img/icons/tools/tool-shape-select@2x.png | Bin .../img/icons/tools/tool-stroke.png | Bin .../img/icons/tools/tool-stroke@2x.png | Bin .../icons/tools/tool-vertical-mirror-pen.png | Bin .../tools/tool-vertical-mirror-pen@2x.png | Bin .../img/icons/transform/tool-center.png | Bin .../img/icons/transform/tool-center@2x.png | Bin .../img/icons/transform/tool-clone.png | Bin .../img/icons/transform/tool-clone@2x.png | Bin dev/img/icons/transform/tool-crop.png | Bin 0 -> 393 bytes dev/img/icons/transform/tool-crop@2x.png | Bin 0 -> 693 bytes .../img/icons/transform/tool-flip.png | Bin .../img/icons/transform/tool-flip@2x.png | Bin .../img/icons/transform/tool-rotate.png | Bin .../img/icons/transform/tool-rotate@2x.png | Bin dev/img/icons@2x.png | Bin 0 -> 25403 bytes .../img/unused/circle-dark.png | Bin .../img/unused/eraser-dark.png | Bin .../img/unused/eyedropper-dark.png | Bin .../img/unused/gallery.png | Bin .../img/unused/hand-dark.png | Bin .../img/unused/lasso-dark.png | Bin .../img/unused/magicwand-dark.png | Bin .../img/unused/paintbucket-dark.png | Bin .../img/unused/pen-dark.png | Bin .../img/unused/rectangle-dark.png | Bin .../img/unused/rectangle_selection-dark.png | Bin {clear_before_scale_v2 => dev}/index.html | 290 +- dev/js/Constants.js | 65 + dev/js/Events.js | 94 + dev/js/app.js | 248 + .../controller/CanvasBackgroundController.js | 27 + .../controller/CursorCoordinatesController.js | 71 + dev/js/controller/DrawingController.js | 478 + dev/js/controller/FramesListController.js | 325 + dev/js/controller/HeaderController.js | 55 + dev/js/controller/LayersListController.js | 201 + dev/js/controller/MinimapController.js | 148 + dev/js/controller/NotificationController.js | 43 + dev/js/controller/PaletteController.js | 130 + dev/js/controller/PalettesListController.js | 204 + dev/js/controller/PenSizeController.js | 43 + dev/js/controller/ProgressBarController.js | 61 + dev/js/controller/ToolController.js | 128 + .../controller/TransformationsController.js | 72 + dev/js/controller/UserWarningController.js | 59 + .../dialogs/AbstractDialogController.js | 29 + .../dialogs/BrowseLocalController.js | 59 + .../dialogs/CheatsheetController.js | 185 + .../dialogs/CreatePaletteController.js | 132 + .../controller/dialogs/DialogsController.js | 144 + .../dialogs/PerformanceInfoController.js | 11 + .../dialogs/UnsupportedBrowserController.js | 13 + .../dialogs/importwizard/ImportWizard.js | 198 + .../importwizard/steps/AbstractImportStep.js | 65 + .../dialogs/importwizard/steps/AdjustSize.js | 110 + .../dialogs/importwizard/steps/ImageImport.js | 279 + .../importwizard/steps/InsertLocation.js | 59 + .../dialogs/importwizard/steps/SelectMode.js | 42 + dev/js/controller/drawing/DragHandler.js | 84 + dev/js/controller/piskel/PiskelController.js | 300 + .../piskel/PublicPiskelController.js | 116 + .../preview/PopupPreviewController.js | 87 + .../controller/preview/PreviewController.js | 350 + .../settings/AbstractSettingController.js | 24 + .../settings/ApplicationSettingsController.js | 144 + .../controller/settings/ImportController.js | 125 + dev/js/controller/settings/SaveController.js | 184 + .../controller/settings/SettingsController.js | 123 + .../settings/exportimage/ExportController.js | 125 + .../exportimage/GifExportController.js | 173 + .../exportimage/MiscExportController.js | 89 + .../exportimage/PngExportController.js | 212 + .../exportimage/ZipExportController.js | 74 + .../settings/resize/DefaultSizeController.js | 47 + .../settings/resize/ResizeController.js | 104 + dev/js/devtools/DrawingTestPlayer.js | 207 + dev/js/devtools/DrawingTestRecorder.js | 159 + dev/js/devtools/DrawingTestRunner.js | 24 + dev/js/devtools/DrawingTestSuiteController.js | 85 + dev/js/devtools/DrawingTestSuiteRunner.js | 68 + dev/js/devtools/MouseEvent.js | 25 + dev/js/devtools/TestRecordController.js | 76 + dev/js/devtools/init.js | 34 + dev/js/devtools/lib/Blob.js | 195 + dev/js/lib/bootstrap/bootstrap.js | 275 + dev/js/lib/bootstrap/readme.txt | 1 + .../js/lib/gif/gif.ie.worker.js | 0 dev/js/lib/gif/gif.js | 3 + dev/js/lib/gif/gif.worker.js | 24 + dev/js/lib/gif/libgif.js | 667 + dev/js/lib/iframeLoader-0.1.0.js | 52 + dev/js/lib/jquery-1.8.0.js | 9227 +++++ dev/js/lib/jquery-ui-1.10.3.custom.js | 2252 ++ dev/js/lib/jszip/jszip.min.js | 14 + dev/js/lib/pubsub.js | 25 + dev/js/lib/q.js | 1986 + dev/js/lib/scrollifneeded/scrollifneeded.js | 27 + dev/js/lib/smoothscroll/LICENSE.txt | 20 + dev/js/lib/smoothscroll/smoothscroll.js | 277 + dev/js/lib/spectrum/spectrum.js | 1966 + dev/js/model/Frame.js | 154 + dev/js/model/Layer.js | 122 + dev/js/model/Palette.js | 46 + dev/js/model/Piskel.js | 140 + .../model/frame/AsyncCachedFrameProcessor.js | 49 + dev/js/model/frame/CachedFrameProcessor.js | 83 + dev/js/model/frame/RenderedFrame.js | 49 + dev/js/model/piskel/Descriptor.js | 9 + dev/js/rendering/AbstractRenderer.js | 22 + dev/js/rendering/CanvasRenderer.js | 45 + dev/js/rendering/CompositeRenderer.js | 68 + dev/js/rendering/DrawingLoop.js | 63 + dev/js/rendering/FramesheetRenderer.js | 46 + dev/js/rendering/OnionSkinRenderer.js | 90 + dev/js/rendering/PiskelRenderer.js | 39 + .../frame/BackgroundImageFrameRenderer.js | 56 + dev/js/rendering/frame/CachedFrameRenderer.js | 49 + dev/js/rendering/frame/FrameRenderer.js | 320 + dev/js/rendering/layer/LayersRenderer.js | 96 + dev/js/selection/BaseSelection.js | 34 + dev/js/selection/LassoSelection.js | 73 + dev/js/selection/RectangularSelection.js | 9 + dev/js/selection/SelectionManager.js | 178 + dev/js/selection/ShapeSelection.js | 9 + dev/js/service/BackupService.js | 65 + dev/js/service/BeforeUnloadService.js | 45 + dev/js/service/CurrentColorsService.js | 129 + dev/js/service/FileDropperService.js | 92 + dev/js/service/HistoryService.js | 199 + dev/js/service/ImageUploadService.js | 24 + dev/js/service/ImportService.js | 141 + dev/js/service/MouseStateService.js | 43 + dev/js/service/SavedStatusService.js | 31 + dev/js/service/SelectedColorsService.js | 29 + dev/js/service/color/ColorSorter.js | 104 + dev/js/service/keyboard/KeyUtils.js | 80 + dev/js/service/keyboard/KeycodeTranslator.js | 46 + dev/js/service/keyboard/Shortcut.js | 135 + dev/js/service/keyboard/ShortcutService.js | 130 + dev/js/service/keyboard/Shortcuts.js | 85 + .../service/palette/CurrentColorsPalette.js | 15 + dev/js/service/palette/PaletteGplWriter.js | 40 + .../service/palette/PaletteImportService.js | 52 + dev/js/service/palette/PaletteService.js | 72 + .../reader/AbstractPaletteFileReader.js | 35 + .../palette/reader/PaletteGplReader.js | 23 + .../palette/reader/PaletteImageReader.js | 54 + .../palette/reader/PalettePalReader.js | 19 + .../palette/reader/PaletteTxtReader.js | 17 + dev/js/service/pensize/PenSizeService.js | 50 + .../service/performance/PerformanceReport.js | 45 + .../performance/PerformanceReportService.js | 29 + .../service/storage/DesktopStorageService.js | 62 + .../storage/FileDownloadStorageService.js | 27 + .../service/storage/GalleryStorageService.js | 60 + dev/js/service/storage/LocalStorageService.js | 92 + dev/js/service/storage/StorageService.js | 111 + dev/js/snippets.js | 1 + dev/js/tools/Tool.js | 25 + dev/js/tools/ToolIconBuilder.js | 21 + dev/js/tools/ToolsHelper.js | 23 + dev/js/tools/drawing/BaseTool.js | 93 + dev/js/tools/drawing/Circle.js | 88 + dev/js/tools/drawing/ColorPicker.js | 30 + dev/js/tools/drawing/ColorSwap.js | 66 + dev/js/tools/drawing/DitheringTool.js | 50 + dev/js/tools/drawing/Eraser.js | 26 + dev/js/tools/drawing/Lighten.js | 72 + dev/js/tools/drawing/Move.js | 109 + dev/js/tools/drawing/PaintBucket.js | 34 + dev/js/tools/drawing/Rectangle.js | 38 + dev/js/tools/drawing/ShapeTool.js | 121 + dev/js/tools/drawing/SimplePen.js | 106 + dev/js/tools/drawing/Stroke.js | 134 + dev/js/tools/drawing/VerticalMirrorPen.js | 53 + .../drawing/selection/AbstractDragSelect.js | 59 + dev/js/tools/drawing/selection/BaseSelect.js | 184 + dev/js/tools/drawing/selection/LassoSelect.js | 88 + .../drawing/selection/RectangleSelect.js | 44 + dev/js/tools/drawing/selection/ShapeSelect.js | 39 + .../tools/transform/AbstractTransformTool.js | 38 + dev/js/tools/transform/Center.js | 19 + dev/js/tools/transform/Clone.js | 21 + dev/js/tools/transform/Crop.js | 53 + dev/js/tools/transform/Flip.js | 28 + dev/js/tools/transform/Rotate.js | 27 + dev/js/tools/transform/TransformUtils.js | 130 + dev/js/utils/Array.js | 41 + dev/js/utils/Base64.js | 56 + dev/js/utils/BlobUtils.js | 43 + dev/js/utils/CanvasUtils.js | 147 + dev/js/utils/ColorUtils.js | 41 + dev/js/utils/DateUtils.js | 25 + dev/js/utils/Dom.js | 54 + dev/js/utils/Environment.js | 29 + dev/js/utils/Event.js | 47 + dev/js/utils/FileUtils.js | 51 + dev/js/utils/FileUtilsDesktop.js | 77 + dev/js/utils/FrameUtils.js | 287 + dev/js/utils/FunctionUtils.js | 40 + dev/js/utils/ImageResizer.js | 26 + dev/js/utils/LayerUtils.js | 91 + dev/js/utils/Math.js | 18 + dev/js/utils/MergeUtils.js | 89 + dev/js/utils/PiskelFileUtils.js | 57 + dev/js/utils/PixelUtils.js | 317 + dev/js/utils/ResizeUtils.js | 85 + dev/js/utils/StringUtils.js | 14 + dev/js/utils/Template.js | 104 + dev/js/utils/TooltipFormatter.js | 38 + dev/js/utils/UserAgent.js | 61 + dev/js/utils/UserSettings.js | 119 + dev/js/utils/Uuid.js | 17 + dev/js/utils/WorkerUtils.js | 22 + dev/js/utils/Xhr.js | 46 + dev/js/utils/core.js | 225 + dev/js/utils/serialization/Deserializer.js | 111 + dev/js/utils/serialization/Serializer.js | 91 + .../arraybuffer/ArrayBufferDeserializer.js | 123 + .../arraybuffer/ArrayBufferSerializer.js | 183 + .../serialization/backward/Deserializer_v0.js | 19 + .../serialization/backward/Deserializer_v1.js | 37 + dev/js/widgets/AnchorWidget.js | 110 + dev/js/widgets/ColorsList.js | 149 + dev/js/widgets/FramePicker.js | 168 + dev/js/widgets/HslRgbColorPicker.js | 273 + dev/js/widgets/SizeInput.js | 73 + dev/js/widgets/SynchronizedInputs.js | 40 + dev/js/widgets/Wizard.js | 107 + dev/js/worker/framecolors/FrameColors.js | 33 + .../worker/framecolors/FrameColorsWorker.js | 82 + dev/js/worker/hash/Hash.js | 32 + dev/js/worker/hash/HashWorker.js | 34 + .../worker/imageprocessor/ImageProcessor.js | 36 + .../imageprocessor/ImageProcessorWorker.js | 95 + dev/piskel-script-list.js | 258 + dev/piskel-style-list.js | 43 + fix_v1/css/fonts/icomoon.eot | Bin 4416 -> 0 bytes fix_v1/css/fonts/icomoon.svg | 28 - fix_v1/css/fonts/icomoon.ttf | Bin 4252 -> 0 bytes fix_v1/css/fonts/icomoon.woff | Bin 4328 -> 0 bytes fix_v1/css/fonts/piskel.eot | Bin 2588 -> 0 bytes fix_v1/css/fonts/piskel.svg | 13 - fix_v1/css/fonts/piskel.ttf | Bin 2424 -> 0 bytes fix_v1/css/fonts/piskel.woff | Bin 1848 -> 0 bytes ...piskel-style-packaged-2017-05-06-11-21.css | 3917 -- .../canvas-background-light.png | Bin 222 -> 0 bytes .../canvas-background-lowcontrast-dark.png | Bin 255 -> 0 bytes .../canvas-background-lowcontrast-medium.png | Bin 255 -> 0 bytes .../canvas-background-medium.png | Bin 254 -> 0 bytes fix_v1/img/cursors/circle.png | Bin 766 -> 0 bytes fix_v1/img/cursors/color-palette.png | Bin 209 -> 0 bytes fix_v1/img/cursors/dither.png | Bin 702 -> 0 bytes fix_v1/img/cursors/dropper.png | Bin 543 -> 0 bytes fix_v1/img/cursors/eraser.png | Bin 656 -> 0 bytes fix_v1/img/cursors/hand.png | Bin 672 -> 0 bytes fix_v1/img/cursors/lighten.png | Bin 606 -> 0 bytes fix_v1/img/cursors/mirror-pen.png | Bin 557 -> 0 bytes fix_v1/img/cursors/paint-bucket.png | Bin 707 -> 0 bytes fix_v1/img/cursors/pen.png | Bin 450 -> 0 bytes fix_v1/img/cursors/rectangle.png | Bin 660 -> 0 bytes fix_v1/img/cursors/select.png | Bin 1145 -> 0 bytes fix_v1/img/cursors/stroke.png | Bin 617 -> 0 bytes fix_v1/img/cursors/vertical-mirror-pen.png | Bin 603 -> 0 bytes fix_v1/img/cursors/wand.png | Bin 570 -> 0 bytes fix_v1/img/favicon.png | Bin 177 -> 0 bytes fix_v1/img/icons.png | Bin 11499 -> 0 bytes .../img/icons/common/common-keyboard-gold.png | Bin 340 -> 0 bytes .../icons/common/common-keyboard-gold@2x.png | Bin 570 -> 0 bytes .../common/common-swapcolors-arrow-grey.png | Bin 565 -> 0 bytes .../common-swapcolors-arrow-grey@2x.png | Bin 960 -> 0 bytes .../img/icons/common/common-warning-red.png | Bin 446 -> 0 bytes .../icons/common/common-warning-red@2x.png | Bin 851 -> 0 bytes .../img/icons/frame/frame-dragndrop-white.png | Bin 324 -> 0 bytes .../icons/frame/frame-dragndrop-white@2x.png | Bin 537 -> 0 bytes .../img/icons/frame/frame-duplicate-white.png | Bin 387 -> 0 bytes .../icons/frame/frame-duplicate-white@2x.png | Bin 664 -> 0 bytes fix_v1/img/icons/frame/frame-plus-white.png | Bin 210 -> 0 bytes .../img/icons/frame/frame-plus-white@2x.png | Bin 262 -> 0 bytes .../icons/frame/frame-recyclebin-white.png | Bin 319 -> 0 bytes .../icons/frame/frame-recyclebin-white@2x.png | Bin 539 -> 0 bytes .../minimap-popup-preview-arrow-gold.png | Bin 301 -> 0 bytes .../minimap-popup-preview-arrow-gold@2x.png | Bin 367 -> 0 bytes .../minimap-popup-preview-arrow-white.png | Bin 246 -> 0 bytes .../minimap-popup-preview-arrow-white@2x.png | Bin 357 -> 0 bytes .../icons/settings/settings-export-white.png | Bin 589 -> 0 bytes .../settings/settings-export-white@2x.png | Bin 1016 -> 0 bytes .../icons/settings/settings-gear-white.png | Bin 668 -> 0 bytes .../icons/settings/settings-gear-white@2x.png | Bin 1322 -> 0 bytes .../settings/settings-open-folder-white.png | Bin 587 -> 0 bytes .../settings-open-folder-white@2x.png | Bin 1008 -> 0 bytes .../icons/settings/settings-resize-white.png | Bin 392 -> 0 bytes .../settings/settings-resize-white@2x.png | Bin 656 -> 0 bytes .../icons/settings/settings-save-white.png | Bin 381 -> 0 bytes .../icons/settings/settings-save-white@2x.png | Bin 652 -> 0 bytes fix_v1/img/icons/tools/tool-circle.png | Bin 495 -> 0 bytes fix_v1/img/icons/tools/tool-circle@2x.png | Bin 1079 -> 0 bytes fix_v1/img/icons/tools/tool-colorpicker.png | Bin 563 -> 0 bytes .../img/icons/tools/tool-colorpicker@2x.png | Bin 1154 -> 0 bytes fix_v1/img/icons/tools/tool-colorswap.png | Bin 1329 -> 0 bytes fix_v1/img/icons/tools/tool-colorswap@2x.png | Bin 2844 -> 0 bytes fix_v1/img/icons/tools/tool-dithering.png | Bin 245 -> 0 bytes fix_v1/img/icons/tools/tool-dithering@2x.png | Bin 393 -> 0 bytes fix_v1/img/icons/tools/tool-eraser.png | Bin 524 -> 0 bytes fix_v1/img/icons/tools/tool-eraser@2x.png | Bin 963 -> 0 bytes fix_v1/img/icons/tools/tool-lasso-select.png | Bin 827 -> 0 bytes .../img/icons/tools/tool-lasso-select@2x.png | Bin 1718 -> 0 bytes fix_v1/img/icons/tools/tool-lighten.png | Bin 690 -> 0 bytes fix_v1/img/icons/tools/tool-lighten@2x.png | Bin 1480 -> 0 bytes fix_v1/img/icons/tools/tool-move.png | Bin 547 -> 0 bytes fix_v1/img/icons/tools/tool-move@2x.png | Bin 1015 -> 0 bytes fix_v1/img/icons/tools/tool-paint-bucket.png | Bin 741 -> 0 bytes .../img/icons/tools/tool-paint-bucket@2x.png | Bin 1582 -> 0 bytes fix_v1/img/icons/tools/tool-pen.png | Bin 670 -> 0 bytes fix_v1/img/icons/tools/tool-pen@2x.png | Bin 1488 -> 0 bytes .../img/icons/tools/tool-rectangle-select.png | Bin 276 -> 0 bytes .../icons/tools/tool-rectangle-select@2x.png | Bin 425 -> 0 bytes fix_v1/img/icons/tools/tool-rectangle.png | Bin 245 -> 0 bytes fix_v1/img/icons/tools/tool-rectangle@2x.png | Bin 395 -> 0 bytes fix_v1/img/icons/tools/tool-shape-select.png | Bin 580 -> 0 bytes .../img/icons/tools/tool-shape-select@2x.png | Bin 1288 -> 0 bytes fix_v1/img/icons/tools/tool-stroke.png | Bin 802 -> 0 bytes fix_v1/img/icons/tools/tool-stroke@2x.png | Bin 1687 -> 0 bytes .../icons/tools/tool-vertical-mirror-pen.png | Bin 744 -> 0 bytes .../tools/tool-vertical-mirror-pen@2x.png | Bin 1570 -> 0 bytes fix_v1/img/icons/transform/tool-center.png | Bin 297 -> 0 bytes fix_v1/img/icons/transform/tool-center@2x.png | Bin 457 -> 0 bytes fix_v1/img/icons/transform/tool-clone.png | Bin 621 -> 0 bytes fix_v1/img/icons/transform/tool-clone@2x.png | Bin 1206 -> 0 bytes fix_v1/img/icons/transform/tool-flip.png | Bin 708 -> 0 bytes fix_v1/img/icons/transform/tool-flip@2x.png | Bin 1237 -> 0 bytes fix_v1/img/icons/transform/tool-rotate.png | Bin 815 -> 0 bytes fix_v1/img/icons/transform/tool-rotate@2x.png | Bin 1707 -> 0 bytes fix_v1/img/icons@2x.png | Bin 25053 -> 0 bytes fix_v1/img/unused/circle-dark.png | Bin 3356 -> 0 bytes fix_v1/img/unused/eraser-dark.png | Bin 909 -> 0 bytes fix_v1/img/unused/eyedropper-dark.png | Bin 3918 -> 0 bytes fix_v1/img/unused/gallery.png | Bin 305 -> 0 bytes fix_v1/img/unused/hand-dark.png | Bin 1519 -> 0 bytes fix_v1/img/unused/lasso-dark.png | Bin 2779 -> 0 bytes fix_v1/img/unused/magicwand-dark.png | Bin 7703 -> 0 bytes fix_v1/img/unused/paintbucket-dark.png | Bin 4104 -> 0 bytes fix_v1/img/unused/pen-dark.png | Bin 1679 -> 0 bytes fix_v1/img/unused/rectangle-dark.png | Bin 253 -> 0 bytes .../img/unused/rectangle_selection-dark.png | Bin 376 -> 0 bytes fix_v1/index.html | 1136 - fix_v1/js/lib/gif/gif.ie.worker.js | 1 - fix_v1/js/piskel-packaged-2017-05-06-11-21.js | 31624 ---------------- .../piskel-packaged-min-2017-05-06-11-21.js | 17 - fix_v1/logo.png | Bin 414 -> 0 bytes fix_v1/piskelapp-partials/main-partial.html | 1083 - 937 files changed, 38520 insertions(+), 225771 deletions(-) delete mode 100644 clear_before_scale/css/piskel-style-packaged-2017-05-05-12-13.css delete mode 100644 clear_before_scale/img/icons.png delete mode 100644 clear_before_scale/img/icons@2x.png delete mode 100644 clear_before_scale/index.html delete mode 100644 clear_before_scale/js/piskel-packaged-2017-05-05-12-13.js delete mode 100644 clear_before_scale/js/piskel-packaged-min-2017-05-05-12-13.js delete mode 100644 clear_before_scale/logo.png delete mode 100644 clear_before_scale/piskelapp-partials/main-partial.html delete mode 100644 clear_before_scale_v2/css/fonts/icomoon.eot delete mode 100644 clear_before_scale_v2/css/fonts/icomoon.svg delete mode 100644 clear_before_scale_v2/css/fonts/icomoon.ttf delete mode 100644 clear_before_scale_v2/css/fonts/icomoon.woff delete mode 100644 clear_before_scale_v2/css/fonts/piskel.eot delete mode 100644 clear_before_scale_v2/css/fonts/piskel.svg delete mode 100644 clear_before_scale_v2/css/fonts/piskel.ttf delete mode 100644 clear_before_scale_v2/css/fonts/piskel.woff delete mode 100644 clear_before_scale_v2/css/piskel-style-packaged-2017-05-05-12-15.css delete mode 100644 clear_before_scale_v2/img/canvas-backgrounds/canvas-background-light.png delete mode 100644 clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png delete mode 100644 clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png delete mode 100644 clear_before_scale_v2/img/canvas-backgrounds/canvas-background-medium.png delete mode 100644 clear_before_scale_v2/img/cursors/circle.png delete mode 100644 clear_before_scale_v2/img/cursors/color-palette.png delete mode 100644 clear_before_scale_v2/img/cursors/dither.png delete mode 100644 clear_before_scale_v2/img/cursors/dropper.png delete mode 100644 clear_before_scale_v2/img/cursors/eraser.png delete mode 100644 clear_before_scale_v2/img/cursors/hand.png delete mode 100644 clear_before_scale_v2/img/cursors/lighten.png delete mode 100644 clear_before_scale_v2/img/cursors/mirror-pen.png delete mode 100644 clear_before_scale_v2/img/cursors/paint-bucket.png delete mode 100644 clear_before_scale_v2/img/cursors/pen.png delete mode 100644 clear_before_scale_v2/img/cursors/rectangle.png delete mode 100644 clear_before_scale_v2/img/cursors/select.png delete mode 100644 clear_before_scale_v2/img/cursors/stroke.png delete mode 100644 clear_before_scale_v2/img/cursors/vertical-mirror-pen.png delete mode 100644 clear_before_scale_v2/img/cursors/wand.png delete mode 100644 clear_before_scale_v2/img/favicon.png delete mode 100644 clear_before_scale_v2/img/icons.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-keyboard-gold.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-keyboard-gold@2x.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-swapcolors-arrow-grey.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-swapcolors-arrow-grey@2x.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-warning-red.png delete mode 100644 clear_before_scale_v2/img/icons/common/common-warning-red@2x.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-dragndrop-white.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-dragndrop-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-duplicate-white.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-duplicate-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-plus-white.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-plus-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-recyclebin-white.png delete mode 100644 clear_before_scale_v2/img/icons/frame/frame-recyclebin-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-gold.png delete mode 100644 clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png delete mode 100644 clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png delete mode 100644 clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-export-white.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-export-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-gear-white.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-gear-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-open-folder-white.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-open-folder-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-resize-white.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-resize-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-save-white.png delete mode 100644 clear_before_scale_v2/img/icons/settings/settings-save-white@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-circle.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-circle@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-colorpicker.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-colorpicker@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-colorswap.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-colorswap@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-dithering.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-dithering@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-eraser.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-eraser@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-lasso-select.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-lasso-select@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-lighten.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-lighten@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-move.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-move@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-paint-bucket.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-paint-bucket@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-pen.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-pen@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-rectangle-select.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-rectangle-select@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-rectangle.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-rectangle@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-shape-select.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-shape-select@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-stroke.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-stroke@2x.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-vertical-mirror-pen.png delete mode 100644 clear_before_scale_v2/img/icons/tools/tool-vertical-mirror-pen@2x.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-center.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-center@2x.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-clone.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-clone@2x.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-flip.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-flip@2x.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-rotate.png delete mode 100644 clear_before_scale_v2/img/icons/transform/tool-rotate@2x.png delete mode 100644 clear_before_scale_v2/img/icons@2x.png delete mode 100644 clear_before_scale_v2/img/unused/circle-dark.png delete mode 100644 clear_before_scale_v2/img/unused/eraser-dark.png delete mode 100644 clear_before_scale_v2/img/unused/eyedropper-dark.png delete mode 100644 clear_before_scale_v2/img/unused/gallery.png delete mode 100644 clear_before_scale_v2/img/unused/hand-dark.png delete mode 100644 clear_before_scale_v2/img/unused/lasso-dark.png delete mode 100644 clear_before_scale_v2/img/unused/magicwand-dark.png delete mode 100644 clear_before_scale_v2/img/unused/paintbucket-dark.png delete mode 100644 clear_before_scale_v2/img/unused/pen-dark.png delete mode 100644 clear_before_scale_v2/img/unused/rectangle-dark.png delete mode 100644 clear_before_scale_v2/img/unused/rectangle_selection-dark.png delete mode 100644 clear_before_scale_v2/js/lib/gif/gif.ie.worker.js delete mode 100644 clear_before_scale_v2/js/piskel-packaged-2017-05-05-12-15.js delete mode 100644 clear_before_scale_v2/js/piskel-packaged-min-2017-05-05-12-15.js delete mode 100644 clear_before_scale_v2/logo.png delete mode 100644 clear_before_scale_v2/piskelapp-partials/main-partial.html delete mode 100644 clear_before_translate/css/fonts/icomoon.eot delete mode 100644 clear_before_translate/css/fonts/icomoon.svg delete mode 100644 clear_before_translate/css/fonts/icomoon.ttf delete mode 100644 clear_before_translate/css/fonts/icomoon.woff delete mode 100644 clear_before_translate/css/fonts/piskel.eot delete mode 100644 clear_before_translate/css/fonts/piskel.svg delete mode 100644 clear_before_translate/css/fonts/piskel.ttf delete mode 100644 clear_before_translate/css/fonts/piskel.woff delete mode 100644 clear_before_translate/css/piskel-style-packaged-2017-05-05-12-17.css delete mode 100644 clear_before_translate/img/canvas-backgrounds/canvas-background-light.png delete mode 100644 clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png delete mode 100644 clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png delete mode 100644 clear_before_translate/img/canvas-backgrounds/canvas-background-medium.png delete mode 100644 clear_before_translate/img/cursors/circle.png delete mode 100644 clear_before_translate/img/cursors/color-palette.png delete mode 100644 clear_before_translate/img/cursors/dither.png delete mode 100644 clear_before_translate/img/cursors/dropper.png delete mode 100644 clear_before_translate/img/cursors/eraser.png delete mode 100644 clear_before_translate/img/cursors/hand.png delete mode 100644 clear_before_translate/img/cursors/lighten.png delete mode 100644 clear_before_translate/img/cursors/mirror-pen.png delete mode 100644 clear_before_translate/img/cursors/paint-bucket.png delete mode 100644 clear_before_translate/img/cursors/pen.png delete mode 100644 clear_before_translate/img/cursors/rectangle.png delete mode 100644 clear_before_translate/img/cursors/select.png delete mode 100644 clear_before_translate/img/cursors/stroke.png delete mode 100644 clear_before_translate/img/cursors/vertical-mirror-pen.png delete mode 100644 clear_before_translate/img/cursors/wand.png delete mode 100644 clear_before_translate/img/favicon.png delete mode 100644 clear_before_translate/img/icons.png delete mode 100644 clear_before_translate/img/icons/common/common-keyboard-gold.png delete mode 100644 clear_before_translate/img/icons/common/common-keyboard-gold@2x.png delete mode 100644 clear_before_translate/img/icons/common/common-swapcolors-arrow-grey.png delete mode 100644 clear_before_translate/img/icons/common/common-swapcolors-arrow-grey@2x.png delete mode 100644 clear_before_translate/img/icons/common/common-warning-red.png delete mode 100644 clear_before_translate/img/icons/common/common-warning-red@2x.png delete mode 100644 clear_before_translate/img/icons/frame/frame-dragndrop-white.png delete mode 100644 clear_before_translate/img/icons/frame/frame-dragndrop-white@2x.png delete mode 100644 clear_before_translate/img/icons/frame/frame-duplicate-white.png delete mode 100644 clear_before_translate/img/icons/frame/frame-duplicate-white@2x.png delete mode 100644 clear_before_translate/img/icons/frame/frame-plus-white.png delete mode 100644 clear_before_translate/img/icons/frame/frame-plus-white@2x.png delete mode 100644 clear_before_translate/img/icons/frame/frame-recyclebin-white.png delete mode 100644 clear_before_translate/img/icons/frame/frame-recyclebin-white@2x.png delete mode 100644 clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-gold.png delete mode 100644 clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png delete mode 100644 clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white.png delete mode 100644 clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png delete mode 100644 clear_before_translate/img/icons/settings/settings-export-white.png delete mode 100644 clear_before_translate/img/icons/settings/settings-export-white@2x.png delete mode 100644 clear_before_translate/img/icons/settings/settings-gear-white.png delete mode 100644 clear_before_translate/img/icons/settings/settings-gear-white@2x.png delete mode 100644 clear_before_translate/img/icons/settings/settings-open-folder-white.png delete mode 100644 clear_before_translate/img/icons/settings/settings-open-folder-white@2x.png delete mode 100644 clear_before_translate/img/icons/settings/settings-resize-white.png delete mode 100644 clear_before_translate/img/icons/settings/settings-resize-white@2x.png delete mode 100644 clear_before_translate/img/icons/settings/settings-save-white.png delete mode 100644 clear_before_translate/img/icons/settings/settings-save-white@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-circle.png delete mode 100644 clear_before_translate/img/icons/tools/tool-circle@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-colorpicker.png delete mode 100644 clear_before_translate/img/icons/tools/tool-colorpicker@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-colorswap.png delete mode 100644 clear_before_translate/img/icons/tools/tool-colorswap@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-dithering.png delete mode 100644 clear_before_translate/img/icons/tools/tool-dithering@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-eraser.png delete mode 100644 clear_before_translate/img/icons/tools/tool-eraser@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-lasso-select.png delete mode 100644 clear_before_translate/img/icons/tools/tool-lasso-select@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-lighten.png delete mode 100644 clear_before_translate/img/icons/tools/tool-lighten@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-move.png delete mode 100644 clear_before_translate/img/icons/tools/tool-move@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-paint-bucket.png delete mode 100644 clear_before_translate/img/icons/tools/tool-paint-bucket@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-pen.png delete mode 100644 clear_before_translate/img/icons/tools/tool-pen@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-rectangle-select.png delete mode 100644 clear_before_translate/img/icons/tools/tool-rectangle-select@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-rectangle.png delete mode 100644 clear_before_translate/img/icons/tools/tool-rectangle@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-shape-select.png delete mode 100644 clear_before_translate/img/icons/tools/tool-shape-select@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-stroke.png delete mode 100644 clear_before_translate/img/icons/tools/tool-stroke@2x.png delete mode 100644 clear_before_translate/img/icons/tools/tool-vertical-mirror-pen.png delete mode 100644 clear_before_translate/img/icons/tools/tool-vertical-mirror-pen@2x.png delete mode 100644 clear_before_translate/img/icons/transform/tool-center.png delete mode 100644 clear_before_translate/img/icons/transform/tool-center@2x.png delete mode 100644 clear_before_translate/img/icons/transform/tool-clone.png delete mode 100644 clear_before_translate/img/icons/transform/tool-clone@2x.png delete mode 100644 clear_before_translate/img/icons/transform/tool-flip.png delete mode 100644 clear_before_translate/img/icons/transform/tool-flip@2x.png delete mode 100644 clear_before_translate/img/icons/transform/tool-rotate.png delete mode 100644 clear_before_translate/img/icons/transform/tool-rotate@2x.png delete mode 100644 clear_before_translate/img/icons@2x.png delete mode 100644 clear_before_translate/img/unused/circle-dark.png delete mode 100644 clear_before_translate/img/unused/eraser-dark.png delete mode 100644 clear_before_translate/img/unused/eyedropper-dark.png delete mode 100644 clear_before_translate/img/unused/gallery.png delete mode 100644 clear_before_translate/img/unused/hand-dark.png delete mode 100644 clear_before_translate/img/unused/lasso-dark.png delete mode 100644 clear_before_translate/img/unused/magicwand-dark.png delete mode 100644 clear_before_translate/img/unused/paintbucket-dark.png delete mode 100644 clear_before_translate/img/unused/pen-dark.png delete mode 100644 clear_before_translate/img/unused/rectangle-dark.png delete mode 100644 clear_before_translate/img/unused/rectangle_selection-dark.png delete mode 100644 clear_before_translate/index.html delete mode 100644 clear_before_translate/js/lib/gif/gif.ie.worker.js delete mode 100644 clear_before_translate/js/piskel-packaged-2017-05-05-12-17.js delete mode 100644 clear_before_translate/js/piskel-packaged-min-2017-05-05-12-17.js delete mode 100644 clear_before_translate/logo.png delete mode 100644 clear_before_translate/piskelapp-partials/main-partial.html delete mode 100644 clear_capped/css/fonts/icomoon.eot delete mode 100644 clear_capped/css/fonts/icomoon.svg delete mode 100644 clear_capped/css/fonts/icomoon.ttf delete mode 100644 clear_capped/css/fonts/icomoon.woff delete mode 100644 clear_capped/css/fonts/piskel.eot delete mode 100644 clear_capped/css/fonts/piskel.svg delete mode 100644 clear_capped/css/fonts/piskel.ttf delete mode 100644 clear_capped/css/fonts/piskel.woff delete mode 100644 clear_capped/css/piskel-style-packaged-2017-05-05-01-56.css delete mode 100644 clear_capped/img/canvas-backgrounds/canvas-background-light.png delete mode 100644 clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png delete mode 100644 clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png delete mode 100644 clear_capped/img/canvas-backgrounds/canvas-background-medium.png delete mode 100644 clear_capped/img/cursors/circle.png delete mode 100644 clear_capped/img/cursors/color-palette.png delete mode 100644 clear_capped/img/cursors/dither.png delete mode 100644 clear_capped/img/cursors/dropper.png delete mode 100644 clear_capped/img/cursors/eraser.png delete mode 100644 clear_capped/img/cursors/hand.png delete mode 100644 clear_capped/img/cursors/lighten.png delete mode 100644 clear_capped/img/cursors/mirror-pen.png delete mode 100644 clear_capped/img/cursors/paint-bucket.png delete mode 100644 clear_capped/img/cursors/pen.png delete mode 100644 clear_capped/img/cursors/rectangle.png delete mode 100644 clear_capped/img/cursors/select.png delete mode 100644 clear_capped/img/cursors/stroke.png delete mode 100644 clear_capped/img/cursors/vertical-mirror-pen.png delete mode 100644 clear_capped/img/cursors/wand.png delete mode 100644 clear_capped/img/favicon.png delete mode 100644 clear_capped/img/icons.png delete mode 100644 clear_capped/img/icons/common/common-keyboard-gold.png delete mode 100644 clear_capped/img/icons/common/common-keyboard-gold@2x.png delete mode 100644 clear_capped/img/icons/common/common-swapcolors-arrow-grey.png delete mode 100644 clear_capped/img/icons/common/common-swapcolors-arrow-grey@2x.png delete mode 100644 clear_capped/img/icons/common/common-warning-red.png delete mode 100644 clear_capped/img/icons/common/common-warning-red@2x.png delete mode 100644 clear_capped/img/icons/frame/frame-dragndrop-white.png delete mode 100644 clear_capped/img/icons/frame/frame-dragndrop-white@2x.png delete mode 100644 clear_capped/img/icons/frame/frame-duplicate-white.png delete mode 100644 clear_capped/img/icons/frame/frame-duplicate-white@2x.png delete mode 100644 clear_capped/img/icons/frame/frame-plus-white.png delete mode 100644 clear_capped/img/icons/frame/frame-plus-white@2x.png delete mode 100644 clear_capped/img/icons/frame/frame-recyclebin-white.png delete mode 100644 clear_capped/img/icons/frame/frame-recyclebin-white@2x.png delete mode 100644 clear_capped/img/icons/minimap/minimap-popup-preview-arrow-gold.png delete mode 100644 clear_capped/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png delete mode 100644 clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white.png delete mode 100644 clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png delete mode 100644 clear_capped/img/icons/settings/settings-export-white.png delete mode 100644 clear_capped/img/icons/settings/settings-export-white@2x.png delete mode 100644 clear_capped/img/icons/settings/settings-gear-white.png delete mode 100644 clear_capped/img/icons/settings/settings-gear-white@2x.png delete mode 100644 clear_capped/img/icons/settings/settings-open-folder-white.png delete mode 100644 clear_capped/img/icons/settings/settings-open-folder-white@2x.png delete mode 100644 clear_capped/img/icons/settings/settings-resize-white.png delete mode 100644 clear_capped/img/icons/settings/settings-resize-white@2x.png delete mode 100644 clear_capped/img/icons/settings/settings-save-white.png delete mode 100644 clear_capped/img/icons/settings/settings-save-white@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-circle.png delete mode 100644 clear_capped/img/icons/tools/tool-circle@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-colorpicker.png delete mode 100644 clear_capped/img/icons/tools/tool-colorpicker@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-colorswap.png delete mode 100644 clear_capped/img/icons/tools/tool-colorswap@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-dithering.png delete mode 100644 clear_capped/img/icons/tools/tool-dithering@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-eraser.png delete mode 100644 clear_capped/img/icons/tools/tool-eraser@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-lasso-select.png delete mode 100644 clear_capped/img/icons/tools/tool-lasso-select@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-lighten.png delete mode 100644 clear_capped/img/icons/tools/tool-lighten@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-move.png delete mode 100644 clear_capped/img/icons/tools/tool-move@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-paint-bucket.png delete mode 100644 clear_capped/img/icons/tools/tool-paint-bucket@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-pen.png delete mode 100644 clear_capped/img/icons/tools/tool-pen@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-rectangle-select.png delete mode 100644 clear_capped/img/icons/tools/tool-rectangle-select@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-rectangle.png delete mode 100644 clear_capped/img/icons/tools/tool-rectangle@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-shape-select.png delete mode 100644 clear_capped/img/icons/tools/tool-shape-select@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-stroke.png delete mode 100644 clear_capped/img/icons/tools/tool-stroke@2x.png delete mode 100644 clear_capped/img/icons/tools/tool-vertical-mirror-pen.png delete mode 100644 clear_capped/img/icons/tools/tool-vertical-mirror-pen@2x.png delete mode 100644 clear_capped/img/icons/transform/tool-center.png delete mode 100644 clear_capped/img/icons/transform/tool-center@2x.png delete mode 100644 clear_capped/img/icons/transform/tool-clone.png delete mode 100644 clear_capped/img/icons/transform/tool-clone@2x.png delete mode 100644 clear_capped/img/icons/transform/tool-flip.png delete mode 100644 clear_capped/img/icons/transform/tool-flip@2x.png delete mode 100644 clear_capped/img/icons/transform/tool-rotate.png delete mode 100644 clear_capped/img/icons/transform/tool-rotate@2x.png delete mode 100644 clear_capped/img/icons@2x.png delete mode 100644 clear_capped/img/unused/circle-dark.png delete mode 100644 clear_capped/img/unused/eraser-dark.png delete mode 100644 clear_capped/img/unused/eyedropper-dark.png delete mode 100644 clear_capped/img/unused/gallery.png delete mode 100644 clear_capped/img/unused/hand-dark.png delete mode 100644 clear_capped/img/unused/lasso-dark.png delete mode 100644 clear_capped/img/unused/magicwand-dark.png delete mode 100644 clear_capped/img/unused/paintbucket-dark.png delete mode 100644 clear_capped/img/unused/pen-dark.png delete mode 100644 clear_capped/img/unused/rectangle-dark.png delete mode 100644 clear_capped/img/unused/rectangle_selection-dark.png delete mode 100644 clear_capped/index.html delete mode 100644 clear_capped/js/lib/gif/gif.ie.worker.js delete mode 100644 clear_capped/js/piskel-packaged-2017-05-05-01-56.js delete mode 100644 clear_capped/js/piskel-packaged-min-2017-05-05-01-56.js delete mode 100644 clear_capped/logo.png delete mode 100644 clear_capped/piskelapp-partials/main-partial.html delete mode 100644 clear_capped_v2/css/fonts/icomoon.eot delete mode 100644 clear_capped_v2/css/fonts/icomoon.svg delete mode 100644 clear_capped_v2/css/fonts/icomoon.ttf delete mode 100644 clear_capped_v2/css/fonts/icomoon.woff delete mode 100644 clear_capped_v2/css/fonts/piskel.eot delete mode 100644 clear_capped_v2/css/fonts/piskel.svg delete mode 100644 clear_capped_v2/css/fonts/piskel.ttf delete mode 100644 clear_capped_v2/css/fonts/piskel.woff delete mode 100644 clear_capped_v2/css/piskel-style-packaged-2017-05-05-03-16.css delete mode 100644 clear_capped_v2/img/canvas-backgrounds/canvas-background-light.png delete mode 100644 clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png delete mode 100644 clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png delete mode 100644 clear_capped_v2/img/canvas-backgrounds/canvas-background-medium.png delete mode 100644 clear_capped_v2/img/cursors/circle.png delete mode 100644 clear_capped_v2/img/cursors/color-palette.png delete mode 100644 clear_capped_v2/img/cursors/dither.png delete mode 100644 clear_capped_v2/img/cursors/dropper.png delete mode 100644 clear_capped_v2/img/cursors/eraser.png delete mode 100644 clear_capped_v2/img/cursors/hand.png delete mode 100644 clear_capped_v2/img/cursors/lighten.png delete mode 100644 clear_capped_v2/img/cursors/mirror-pen.png delete mode 100644 clear_capped_v2/img/cursors/paint-bucket.png delete mode 100644 clear_capped_v2/img/cursors/pen.png delete mode 100644 clear_capped_v2/img/cursors/rectangle.png delete mode 100644 clear_capped_v2/img/cursors/select.png delete mode 100644 clear_capped_v2/img/cursors/stroke.png delete mode 100644 clear_capped_v2/img/cursors/vertical-mirror-pen.png delete mode 100644 clear_capped_v2/img/cursors/wand.png delete mode 100644 clear_capped_v2/img/favicon.png delete mode 100644 clear_capped_v2/img/icons.png delete mode 100644 clear_capped_v2/img/icons/common/common-keyboard-gold.png delete mode 100644 clear_capped_v2/img/icons/common/common-keyboard-gold@2x.png delete mode 100644 clear_capped_v2/img/icons/common/common-swapcolors-arrow-grey.png delete mode 100644 clear_capped_v2/img/icons/common/common-swapcolors-arrow-grey@2x.png delete mode 100644 clear_capped_v2/img/icons/common/common-warning-red.png delete mode 100644 clear_capped_v2/img/icons/common/common-warning-red@2x.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-dragndrop-white.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-dragndrop-white@2x.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-duplicate-white.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-duplicate-white@2x.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-plus-white.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-plus-white@2x.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-recyclebin-white.png delete mode 100644 clear_capped_v2/img/icons/frame/frame-recyclebin-white@2x.png delete mode 100644 clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-gold.png delete mode 100644 clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png delete mode 100644 clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png delete mode 100644 clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-export-white.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-export-white@2x.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-gear-white.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-gear-white@2x.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-open-folder-white.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-open-folder-white@2x.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-resize-white.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-resize-white@2x.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-save-white.png delete mode 100644 clear_capped_v2/img/icons/settings/settings-save-white@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-circle.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-circle@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-colorpicker.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-colorpicker@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-colorswap.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-colorswap@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-dithering.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-dithering@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-eraser.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-eraser@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-lasso-select.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-lasso-select@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-lighten.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-lighten@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-move.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-move@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-paint-bucket.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-paint-bucket@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-pen.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-pen@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-rectangle-select.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-rectangle-select@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-rectangle.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-rectangle@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-shape-select.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-shape-select@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-stroke.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-stroke@2x.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-vertical-mirror-pen.png delete mode 100644 clear_capped_v2/img/icons/tools/tool-vertical-mirror-pen@2x.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-center.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-center@2x.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-clone.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-clone@2x.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-flip.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-flip@2x.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-rotate.png delete mode 100644 clear_capped_v2/img/icons/transform/tool-rotate@2x.png delete mode 100644 clear_capped_v2/img/icons@2x.png delete mode 100644 clear_capped_v2/img/unused/circle-dark.png delete mode 100644 clear_capped_v2/img/unused/eraser-dark.png delete mode 100644 clear_capped_v2/img/unused/eyedropper-dark.png delete mode 100644 clear_capped_v2/img/unused/gallery.png delete mode 100644 clear_capped_v2/img/unused/hand-dark.png delete mode 100644 clear_capped_v2/img/unused/lasso-dark.png delete mode 100644 clear_capped_v2/img/unused/magicwand-dark.png delete mode 100644 clear_capped_v2/img/unused/paintbucket-dark.png delete mode 100644 clear_capped_v2/img/unused/pen-dark.png delete mode 100644 clear_capped_v2/img/unused/rectangle-dark.png delete mode 100644 clear_capped_v2/img/unused/rectangle_selection-dark.png delete mode 100644 clear_capped_v2/index.html delete mode 100644 clear_capped_v2/js/lib/gif/gif.ie.worker.js delete mode 100644 clear_capped_v2/js/piskel-packaged-2017-05-05-03-16.js delete mode 100644 clear_capped_v2/js/piskel-packaged-min-2017-05-05-03-16.js delete mode 100644 clear_capped_v2/logo.png delete mode 100644 clear_capped_v2/piskelapp-partials/main-partial.html create mode 100644 dev/css/animations.css create mode 100644 dev/css/bootstrap/bootstrap-tooltip-custom.css create mode 100644 dev/css/bootstrap/bootstrap.css create mode 100644 dev/css/bootstrap/readme.txt create mode 100644 dev/css/color-picker-slider.css create mode 100644 dev/css/dialogs-browse-local.css create mode 100644 dev/css/dialogs-cheatsheet.css create mode 100644 dev/css/dialogs-create-palette.css create mode 100644 dev/css/dialogs-import.css create mode 100644 dev/css/dialogs-performance-info.css create mode 100644 dev/css/dialogs-unsupported-browser.css create mode 100644 dev/css/dialogs.css create mode 100644 dev/css/font-icon.css rename {clear_before_scale => dev}/css/fonts/icomoon.eot (100%) rename {clear_before_scale => dev}/css/fonts/icomoon.svg (100%) rename {clear_before_scale => dev}/css/fonts/icomoon.ttf (100%) rename {clear_before_scale => dev}/css/fonts/icomoon.woff (100%) rename {clear_before_scale => dev}/css/fonts/piskel.eot (100%) rename {clear_before_scale => dev}/css/fonts/piskel.svg (100%) rename {clear_before_scale => dev}/css/fonts/piskel.ttf (100%) rename {clear_before_scale => dev}/css/fonts/piskel.woff (100%) create mode 100644 dev/css/forms.css create mode 100644 dev/css/frames-list.css create mode 100644 dev/css/icons.css create mode 100644 dev/css/layout.css create mode 100644 dev/css/minimap.css create mode 100644 dev/css/notifications.css create mode 100644 dev/css/pensize.css create mode 100644 dev/css/reset.css create mode 100644 dev/css/settings-application.css create mode 100644 dev/css/settings-export.css create mode 100644 dev/css/settings-import.css create mode 100644 dev/css/settings-resize.css create mode 100644 dev/css/settings-save.css create mode 100644 dev/css/settings.css create mode 100644 dev/css/spectrum/spectrum-overrides.css create mode 100644 dev/css/spectrum/spectrum.css create mode 100644 dev/css/style.css create mode 100644 dev/css/toolbox-animated-preview.css create mode 100644 dev/css/toolbox-layers-list.css create mode 100644 dev/css/toolbox-palettes-list.css create mode 100644 dev/css/toolbox.css create mode 100644 dev/css/tools.css create mode 100644 dev/css/transformations.css create mode 100644 dev/css/variables.css create mode 100644 dev/css/widgets-anchor.css create mode 100644 dev/css/widgets-frame-picker.css create mode 100644 dev/css/widgets-wizard.css rename {clear_before_scale => dev}/img/canvas-backgrounds/canvas-background-light.png (100%) rename {clear_before_scale => dev}/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png (100%) rename {clear_before_scale => dev}/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png (100%) rename {clear_before_scale => dev}/img/canvas-backgrounds/canvas-background-medium.png (100%) rename {clear_before_scale => dev}/img/cursors/circle.png (100%) rename {clear_before_scale => dev}/img/cursors/color-palette.png (100%) rename {clear_before_scale => dev}/img/cursors/dither.png (100%) rename {clear_before_scale => dev}/img/cursors/dropper.png (100%) rename {clear_before_scale => dev}/img/cursors/eraser.png (100%) rename {clear_before_scale => dev}/img/cursors/hand.png (100%) rename {clear_before_scale => dev}/img/cursors/lighten.png (100%) rename {clear_before_scale => dev}/img/cursors/mirror-pen.png (100%) rename {clear_before_scale => dev}/img/cursors/paint-bucket.png (100%) rename {clear_before_scale => dev}/img/cursors/pen.png (100%) rename {clear_before_scale => dev}/img/cursors/rectangle.png (100%) rename {clear_before_scale => dev}/img/cursors/select.png (100%) rename {clear_before_scale => dev}/img/cursors/stroke.png (100%) rename {clear_before_scale => dev}/img/cursors/vertical-mirror-pen.png (100%) rename {clear_before_scale => dev}/img/cursors/wand.png (100%) rename {clear_before_scale => dev}/img/favicon.png (100%) create mode 100644 dev/img/icons.png rename {clear_before_scale => dev}/img/icons/common/common-keyboard-gold.png (100%) rename {clear_before_scale => dev}/img/icons/common/common-keyboard-gold@2x.png (100%) rename {clear_before_scale => dev}/img/icons/common/common-swapcolors-arrow-grey.png (100%) rename {clear_before_scale => dev}/img/icons/common/common-swapcolors-arrow-grey@2x.png (100%) rename {clear_before_scale => dev}/img/icons/common/common-warning-red.png (100%) rename {clear_before_scale => dev}/img/icons/common/common-warning-red@2x.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-dragndrop-white.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-dragndrop-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-duplicate-white.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-duplicate-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-plus-white.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-plus-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-recyclebin-white.png (100%) rename {clear_before_scale => dev}/img/icons/frame/frame-recyclebin-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/minimap/minimap-popup-preview-arrow-gold.png (100%) rename {clear_before_scale => dev}/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png (100%) rename {clear_before_scale => dev}/img/icons/minimap/minimap-popup-preview-arrow-white.png (100%) rename {clear_before_scale => dev}/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-export-white.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-export-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-gear-white.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-gear-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-open-folder-white.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-open-folder-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-resize-white.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-resize-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-save-white.png (100%) rename {clear_before_scale => dev}/img/icons/settings/settings-save-white@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-circle.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-circle@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-colorpicker.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-colorpicker@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-colorswap.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-colorswap@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-dithering.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-dithering@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-eraser.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-eraser@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-lasso-select.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-lasso-select@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-lighten.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-lighten@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-move.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-move@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-paint-bucket.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-paint-bucket@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-pen.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-pen@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-rectangle-select.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-rectangle-select@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-rectangle.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-rectangle@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-shape-select.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-shape-select@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-stroke.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-stroke@2x.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-vertical-mirror-pen.png (100%) rename {clear_before_scale => dev}/img/icons/tools/tool-vertical-mirror-pen@2x.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-center.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-center@2x.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-clone.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-clone@2x.png (100%) create mode 100644 dev/img/icons/transform/tool-crop.png create mode 100644 dev/img/icons/transform/tool-crop@2x.png rename {clear_before_scale => dev}/img/icons/transform/tool-flip.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-flip@2x.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-rotate.png (100%) rename {clear_before_scale => dev}/img/icons/transform/tool-rotate@2x.png (100%) create mode 100644 dev/img/icons@2x.png rename {clear_before_scale => dev}/img/unused/circle-dark.png (100%) rename {clear_before_scale => dev}/img/unused/eraser-dark.png (100%) rename {clear_before_scale => dev}/img/unused/eyedropper-dark.png (100%) rename {clear_before_scale => dev}/img/unused/gallery.png (100%) rename {clear_before_scale => dev}/img/unused/hand-dark.png (100%) rename {clear_before_scale => dev}/img/unused/lasso-dark.png (100%) rename {clear_before_scale => dev}/img/unused/magicwand-dark.png (100%) rename {clear_before_scale => dev}/img/unused/paintbucket-dark.png (100%) rename {clear_before_scale => dev}/img/unused/pen-dark.png (100%) rename {clear_before_scale => dev}/img/unused/rectangle-dark.png (100%) rename {clear_before_scale => dev}/img/unused/rectangle_selection-dark.png (100%) rename {clear_before_scale_v2 => dev}/index.html (83%) create mode 100644 dev/js/Constants.js create mode 100644 dev/js/Events.js create mode 100644 dev/js/app.js create mode 100644 dev/js/controller/CanvasBackgroundController.js create mode 100644 dev/js/controller/CursorCoordinatesController.js create mode 100644 dev/js/controller/DrawingController.js create mode 100644 dev/js/controller/FramesListController.js create mode 100644 dev/js/controller/HeaderController.js create mode 100644 dev/js/controller/LayersListController.js create mode 100644 dev/js/controller/MinimapController.js create mode 100644 dev/js/controller/NotificationController.js create mode 100644 dev/js/controller/PaletteController.js create mode 100644 dev/js/controller/PalettesListController.js create mode 100644 dev/js/controller/PenSizeController.js create mode 100644 dev/js/controller/ProgressBarController.js create mode 100644 dev/js/controller/ToolController.js create mode 100644 dev/js/controller/TransformationsController.js create mode 100644 dev/js/controller/UserWarningController.js create mode 100644 dev/js/controller/dialogs/AbstractDialogController.js create mode 100644 dev/js/controller/dialogs/BrowseLocalController.js create mode 100644 dev/js/controller/dialogs/CheatsheetController.js create mode 100644 dev/js/controller/dialogs/CreatePaletteController.js create mode 100644 dev/js/controller/dialogs/DialogsController.js create mode 100644 dev/js/controller/dialogs/PerformanceInfoController.js create mode 100644 dev/js/controller/dialogs/UnsupportedBrowserController.js create mode 100644 dev/js/controller/dialogs/importwizard/ImportWizard.js create mode 100644 dev/js/controller/dialogs/importwizard/steps/AbstractImportStep.js create mode 100644 dev/js/controller/dialogs/importwizard/steps/AdjustSize.js create mode 100644 dev/js/controller/dialogs/importwizard/steps/ImageImport.js create mode 100644 dev/js/controller/dialogs/importwizard/steps/InsertLocation.js create mode 100644 dev/js/controller/dialogs/importwizard/steps/SelectMode.js create mode 100644 dev/js/controller/drawing/DragHandler.js create mode 100644 dev/js/controller/piskel/PiskelController.js create mode 100644 dev/js/controller/piskel/PublicPiskelController.js create mode 100644 dev/js/controller/preview/PopupPreviewController.js create mode 100644 dev/js/controller/preview/PreviewController.js create mode 100644 dev/js/controller/settings/AbstractSettingController.js create mode 100644 dev/js/controller/settings/ApplicationSettingsController.js create mode 100644 dev/js/controller/settings/ImportController.js create mode 100644 dev/js/controller/settings/SaveController.js create mode 100644 dev/js/controller/settings/SettingsController.js create mode 100644 dev/js/controller/settings/exportimage/ExportController.js create mode 100644 dev/js/controller/settings/exportimage/GifExportController.js create mode 100644 dev/js/controller/settings/exportimage/MiscExportController.js create mode 100644 dev/js/controller/settings/exportimage/PngExportController.js create mode 100644 dev/js/controller/settings/exportimage/ZipExportController.js create mode 100644 dev/js/controller/settings/resize/DefaultSizeController.js create mode 100644 dev/js/controller/settings/resize/ResizeController.js create mode 100644 dev/js/devtools/DrawingTestPlayer.js create mode 100644 dev/js/devtools/DrawingTestRecorder.js create mode 100644 dev/js/devtools/DrawingTestRunner.js create mode 100644 dev/js/devtools/DrawingTestSuiteController.js create mode 100644 dev/js/devtools/DrawingTestSuiteRunner.js create mode 100644 dev/js/devtools/MouseEvent.js create mode 100644 dev/js/devtools/TestRecordController.js create mode 100644 dev/js/devtools/init.js create mode 100644 dev/js/devtools/lib/Blob.js create mode 100644 dev/js/lib/bootstrap/bootstrap.js create mode 100644 dev/js/lib/bootstrap/readme.txt rename {clear_before_scale => dev}/js/lib/gif/gif.ie.worker.js (100%) create mode 100644 dev/js/lib/gif/gif.js create mode 100644 dev/js/lib/gif/gif.worker.js create mode 100644 dev/js/lib/gif/libgif.js create mode 100644 dev/js/lib/iframeLoader-0.1.0.js create mode 100644 dev/js/lib/jquery-1.8.0.js create mode 100644 dev/js/lib/jquery-ui-1.10.3.custom.js create mode 100644 dev/js/lib/jszip/jszip.min.js create mode 100644 dev/js/lib/pubsub.js create mode 100644 dev/js/lib/q.js create mode 100644 dev/js/lib/scrollifneeded/scrollifneeded.js create mode 100644 dev/js/lib/smoothscroll/LICENSE.txt create mode 100644 dev/js/lib/smoothscroll/smoothscroll.js create mode 100644 dev/js/lib/spectrum/spectrum.js create mode 100644 dev/js/model/Frame.js create mode 100644 dev/js/model/Layer.js create mode 100644 dev/js/model/Palette.js create mode 100644 dev/js/model/Piskel.js create mode 100644 dev/js/model/frame/AsyncCachedFrameProcessor.js create mode 100644 dev/js/model/frame/CachedFrameProcessor.js create mode 100644 dev/js/model/frame/RenderedFrame.js create mode 100644 dev/js/model/piskel/Descriptor.js create mode 100644 dev/js/rendering/AbstractRenderer.js create mode 100644 dev/js/rendering/CanvasRenderer.js create mode 100644 dev/js/rendering/CompositeRenderer.js create mode 100644 dev/js/rendering/DrawingLoop.js create mode 100644 dev/js/rendering/FramesheetRenderer.js create mode 100644 dev/js/rendering/OnionSkinRenderer.js create mode 100644 dev/js/rendering/PiskelRenderer.js create mode 100644 dev/js/rendering/frame/BackgroundImageFrameRenderer.js create mode 100644 dev/js/rendering/frame/CachedFrameRenderer.js create mode 100644 dev/js/rendering/frame/FrameRenderer.js create mode 100644 dev/js/rendering/layer/LayersRenderer.js create mode 100644 dev/js/selection/BaseSelection.js create mode 100644 dev/js/selection/LassoSelection.js create mode 100644 dev/js/selection/RectangularSelection.js create mode 100644 dev/js/selection/SelectionManager.js create mode 100644 dev/js/selection/ShapeSelection.js create mode 100644 dev/js/service/BackupService.js create mode 100644 dev/js/service/BeforeUnloadService.js create mode 100644 dev/js/service/CurrentColorsService.js create mode 100644 dev/js/service/FileDropperService.js create mode 100644 dev/js/service/HistoryService.js create mode 100644 dev/js/service/ImageUploadService.js create mode 100644 dev/js/service/ImportService.js create mode 100644 dev/js/service/MouseStateService.js create mode 100644 dev/js/service/SavedStatusService.js create mode 100644 dev/js/service/SelectedColorsService.js create mode 100644 dev/js/service/color/ColorSorter.js create mode 100644 dev/js/service/keyboard/KeyUtils.js create mode 100644 dev/js/service/keyboard/KeycodeTranslator.js create mode 100644 dev/js/service/keyboard/Shortcut.js create mode 100644 dev/js/service/keyboard/ShortcutService.js create mode 100644 dev/js/service/keyboard/Shortcuts.js create mode 100644 dev/js/service/palette/CurrentColorsPalette.js create mode 100644 dev/js/service/palette/PaletteGplWriter.js create mode 100644 dev/js/service/palette/PaletteImportService.js create mode 100644 dev/js/service/palette/PaletteService.js create mode 100644 dev/js/service/palette/reader/AbstractPaletteFileReader.js create mode 100644 dev/js/service/palette/reader/PaletteGplReader.js create mode 100644 dev/js/service/palette/reader/PaletteImageReader.js create mode 100644 dev/js/service/palette/reader/PalettePalReader.js create mode 100644 dev/js/service/palette/reader/PaletteTxtReader.js create mode 100644 dev/js/service/pensize/PenSizeService.js create mode 100644 dev/js/service/performance/PerformanceReport.js create mode 100644 dev/js/service/performance/PerformanceReportService.js create mode 100644 dev/js/service/storage/DesktopStorageService.js create mode 100644 dev/js/service/storage/FileDownloadStorageService.js create mode 100644 dev/js/service/storage/GalleryStorageService.js create mode 100644 dev/js/service/storage/LocalStorageService.js create mode 100644 dev/js/service/storage/StorageService.js create mode 100644 dev/js/snippets.js create mode 100644 dev/js/tools/Tool.js create mode 100644 dev/js/tools/ToolIconBuilder.js create mode 100644 dev/js/tools/ToolsHelper.js create mode 100644 dev/js/tools/drawing/BaseTool.js create mode 100644 dev/js/tools/drawing/Circle.js create mode 100644 dev/js/tools/drawing/ColorPicker.js create mode 100644 dev/js/tools/drawing/ColorSwap.js create mode 100644 dev/js/tools/drawing/DitheringTool.js create mode 100644 dev/js/tools/drawing/Eraser.js create mode 100644 dev/js/tools/drawing/Lighten.js create mode 100644 dev/js/tools/drawing/Move.js create mode 100644 dev/js/tools/drawing/PaintBucket.js create mode 100644 dev/js/tools/drawing/Rectangle.js create mode 100644 dev/js/tools/drawing/ShapeTool.js create mode 100644 dev/js/tools/drawing/SimplePen.js create mode 100644 dev/js/tools/drawing/Stroke.js create mode 100644 dev/js/tools/drawing/VerticalMirrorPen.js create mode 100644 dev/js/tools/drawing/selection/AbstractDragSelect.js create mode 100644 dev/js/tools/drawing/selection/BaseSelect.js create mode 100644 dev/js/tools/drawing/selection/LassoSelect.js create mode 100644 dev/js/tools/drawing/selection/RectangleSelect.js create mode 100644 dev/js/tools/drawing/selection/ShapeSelect.js create mode 100644 dev/js/tools/transform/AbstractTransformTool.js create mode 100644 dev/js/tools/transform/Center.js create mode 100644 dev/js/tools/transform/Clone.js create mode 100644 dev/js/tools/transform/Crop.js create mode 100644 dev/js/tools/transform/Flip.js create mode 100644 dev/js/tools/transform/Rotate.js create mode 100644 dev/js/tools/transform/TransformUtils.js create mode 100644 dev/js/utils/Array.js create mode 100644 dev/js/utils/Base64.js create mode 100644 dev/js/utils/BlobUtils.js create mode 100644 dev/js/utils/CanvasUtils.js create mode 100644 dev/js/utils/ColorUtils.js create mode 100644 dev/js/utils/DateUtils.js create mode 100644 dev/js/utils/Dom.js create mode 100644 dev/js/utils/Environment.js create mode 100644 dev/js/utils/Event.js create mode 100644 dev/js/utils/FileUtils.js create mode 100644 dev/js/utils/FileUtilsDesktop.js create mode 100644 dev/js/utils/FrameUtils.js create mode 100644 dev/js/utils/FunctionUtils.js create mode 100644 dev/js/utils/ImageResizer.js create mode 100644 dev/js/utils/LayerUtils.js create mode 100644 dev/js/utils/Math.js create mode 100644 dev/js/utils/MergeUtils.js create mode 100644 dev/js/utils/PiskelFileUtils.js create mode 100644 dev/js/utils/PixelUtils.js create mode 100644 dev/js/utils/ResizeUtils.js create mode 100644 dev/js/utils/StringUtils.js create mode 100644 dev/js/utils/Template.js create mode 100644 dev/js/utils/TooltipFormatter.js create mode 100644 dev/js/utils/UserAgent.js create mode 100644 dev/js/utils/UserSettings.js create mode 100644 dev/js/utils/Uuid.js create mode 100644 dev/js/utils/WorkerUtils.js create mode 100644 dev/js/utils/Xhr.js create mode 100644 dev/js/utils/core.js create mode 100644 dev/js/utils/serialization/Deserializer.js create mode 100644 dev/js/utils/serialization/Serializer.js create mode 100644 dev/js/utils/serialization/arraybuffer/ArrayBufferDeserializer.js create mode 100644 dev/js/utils/serialization/arraybuffer/ArrayBufferSerializer.js create mode 100644 dev/js/utils/serialization/backward/Deserializer_v0.js create mode 100644 dev/js/utils/serialization/backward/Deserializer_v1.js create mode 100644 dev/js/widgets/AnchorWidget.js create mode 100644 dev/js/widgets/ColorsList.js create mode 100644 dev/js/widgets/FramePicker.js create mode 100644 dev/js/widgets/HslRgbColorPicker.js create mode 100644 dev/js/widgets/SizeInput.js create mode 100644 dev/js/widgets/SynchronizedInputs.js create mode 100644 dev/js/widgets/Wizard.js create mode 100644 dev/js/worker/framecolors/FrameColors.js create mode 100644 dev/js/worker/framecolors/FrameColorsWorker.js create mode 100644 dev/js/worker/hash/Hash.js create mode 100644 dev/js/worker/hash/HashWorker.js create mode 100644 dev/js/worker/imageprocessor/ImageProcessor.js create mode 100644 dev/js/worker/imageprocessor/ImageProcessorWorker.js create mode 100644 dev/piskel-script-list.js create mode 100644 dev/piskel-style-list.js delete mode 100644 fix_v1/css/fonts/icomoon.eot delete mode 100644 fix_v1/css/fonts/icomoon.svg delete mode 100644 fix_v1/css/fonts/icomoon.ttf delete mode 100644 fix_v1/css/fonts/icomoon.woff delete mode 100644 fix_v1/css/fonts/piskel.eot delete mode 100644 fix_v1/css/fonts/piskel.svg delete mode 100644 fix_v1/css/fonts/piskel.ttf delete mode 100644 fix_v1/css/fonts/piskel.woff delete mode 100644 fix_v1/css/piskel-style-packaged-2017-05-06-11-21.css delete mode 100644 fix_v1/img/canvas-backgrounds/canvas-background-light.png delete mode 100644 fix_v1/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png delete mode 100644 fix_v1/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png delete mode 100644 fix_v1/img/canvas-backgrounds/canvas-background-medium.png delete mode 100644 fix_v1/img/cursors/circle.png delete mode 100644 fix_v1/img/cursors/color-palette.png delete mode 100644 fix_v1/img/cursors/dither.png delete mode 100644 fix_v1/img/cursors/dropper.png delete mode 100644 fix_v1/img/cursors/eraser.png delete mode 100644 fix_v1/img/cursors/hand.png delete mode 100644 fix_v1/img/cursors/lighten.png delete mode 100644 fix_v1/img/cursors/mirror-pen.png delete mode 100644 fix_v1/img/cursors/paint-bucket.png delete mode 100644 fix_v1/img/cursors/pen.png delete mode 100644 fix_v1/img/cursors/rectangle.png delete mode 100644 fix_v1/img/cursors/select.png delete mode 100644 fix_v1/img/cursors/stroke.png delete mode 100644 fix_v1/img/cursors/vertical-mirror-pen.png delete mode 100644 fix_v1/img/cursors/wand.png delete mode 100644 fix_v1/img/favicon.png delete mode 100644 fix_v1/img/icons.png delete mode 100644 fix_v1/img/icons/common/common-keyboard-gold.png delete mode 100644 fix_v1/img/icons/common/common-keyboard-gold@2x.png delete mode 100644 fix_v1/img/icons/common/common-swapcolors-arrow-grey.png delete mode 100644 fix_v1/img/icons/common/common-swapcolors-arrow-grey@2x.png delete mode 100644 fix_v1/img/icons/common/common-warning-red.png delete mode 100644 fix_v1/img/icons/common/common-warning-red@2x.png delete mode 100644 fix_v1/img/icons/frame/frame-dragndrop-white.png delete mode 100644 fix_v1/img/icons/frame/frame-dragndrop-white@2x.png delete mode 100644 fix_v1/img/icons/frame/frame-duplicate-white.png delete mode 100644 fix_v1/img/icons/frame/frame-duplicate-white@2x.png delete mode 100644 fix_v1/img/icons/frame/frame-plus-white.png delete mode 100644 fix_v1/img/icons/frame/frame-plus-white@2x.png delete mode 100644 fix_v1/img/icons/frame/frame-recyclebin-white.png delete mode 100644 fix_v1/img/icons/frame/frame-recyclebin-white@2x.png delete mode 100644 fix_v1/img/icons/minimap/minimap-popup-preview-arrow-gold.png delete mode 100644 fix_v1/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png delete mode 100644 fix_v1/img/icons/minimap/minimap-popup-preview-arrow-white.png delete mode 100644 fix_v1/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png delete mode 100644 fix_v1/img/icons/settings/settings-export-white.png delete mode 100644 fix_v1/img/icons/settings/settings-export-white@2x.png delete mode 100644 fix_v1/img/icons/settings/settings-gear-white.png delete mode 100644 fix_v1/img/icons/settings/settings-gear-white@2x.png delete mode 100644 fix_v1/img/icons/settings/settings-open-folder-white.png delete mode 100644 fix_v1/img/icons/settings/settings-open-folder-white@2x.png delete mode 100644 fix_v1/img/icons/settings/settings-resize-white.png delete mode 100644 fix_v1/img/icons/settings/settings-resize-white@2x.png delete mode 100644 fix_v1/img/icons/settings/settings-save-white.png delete mode 100644 fix_v1/img/icons/settings/settings-save-white@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-circle.png delete mode 100644 fix_v1/img/icons/tools/tool-circle@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-colorpicker.png delete mode 100644 fix_v1/img/icons/tools/tool-colorpicker@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-colorswap.png delete mode 100644 fix_v1/img/icons/tools/tool-colorswap@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-dithering.png delete mode 100644 fix_v1/img/icons/tools/tool-dithering@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-eraser.png delete mode 100644 fix_v1/img/icons/tools/tool-eraser@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-lasso-select.png delete mode 100644 fix_v1/img/icons/tools/tool-lasso-select@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-lighten.png delete mode 100644 fix_v1/img/icons/tools/tool-lighten@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-move.png delete mode 100644 fix_v1/img/icons/tools/tool-move@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-paint-bucket.png delete mode 100644 fix_v1/img/icons/tools/tool-paint-bucket@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-pen.png delete mode 100644 fix_v1/img/icons/tools/tool-pen@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-rectangle-select.png delete mode 100644 fix_v1/img/icons/tools/tool-rectangle-select@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-rectangle.png delete mode 100644 fix_v1/img/icons/tools/tool-rectangle@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-shape-select.png delete mode 100644 fix_v1/img/icons/tools/tool-shape-select@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-stroke.png delete mode 100644 fix_v1/img/icons/tools/tool-stroke@2x.png delete mode 100644 fix_v1/img/icons/tools/tool-vertical-mirror-pen.png delete mode 100644 fix_v1/img/icons/tools/tool-vertical-mirror-pen@2x.png delete mode 100644 fix_v1/img/icons/transform/tool-center.png delete mode 100644 fix_v1/img/icons/transform/tool-center@2x.png delete mode 100644 fix_v1/img/icons/transform/tool-clone.png delete mode 100644 fix_v1/img/icons/transform/tool-clone@2x.png delete mode 100644 fix_v1/img/icons/transform/tool-flip.png delete mode 100644 fix_v1/img/icons/transform/tool-flip@2x.png delete mode 100644 fix_v1/img/icons/transform/tool-rotate.png delete mode 100644 fix_v1/img/icons/transform/tool-rotate@2x.png delete mode 100644 fix_v1/img/icons@2x.png delete mode 100644 fix_v1/img/unused/circle-dark.png delete mode 100644 fix_v1/img/unused/eraser-dark.png delete mode 100644 fix_v1/img/unused/eyedropper-dark.png delete mode 100644 fix_v1/img/unused/gallery.png delete mode 100644 fix_v1/img/unused/hand-dark.png delete mode 100644 fix_v1/img/unused/lasso-dark.png delete mode 100644 fix_v1/img/unused/magicwand-dark.png delete mode 100644 fix_v1/img/unused/paintbucket-dark.png delete mode 100644 fix_v1/img/unused/pen-dark.png delete mode 100644 fix_v1/img/unused/rectangle-dark.png delete mode 100644 fix_v1/img/unused/rectangle_selection-dark.png delete mode 100644 fix_v1/index.html delete mode 100644 fix_v1/js/lib/gif/gif.ie.worker.js delete mode 100644 fix_v1/js/piskel-packaged-2017-05-06-11-21.js delete mode 100644 fix_v1/js/piskel-packaged-min-2017-05-06-11-21.js delete mode 100644 fix_v1/logo.png delete mode 100644 fix_v1/piskelapp-partials/main-partial.html diff --git a/clear_before_scale/css/piskel-style-packaged-2017-05-05-12-13.css b/clear_before_scale/css/piskel-style-packaged-2017-05-05-12-13.css deleted file mode 100644 index 0f6982fe..00000000 --- a/clear_before_scale/css/piskel-style-packaged-2017-05-05-12-13.css +++ /dev/null @@ -1,3917 +0,0 @@ -html, body { - --highlight-color: gold; -} -html, body { - height : 100%; width: 100%; - margin : 0; - overflow: hidden; - cursor : default; - font-family: Arial; - font-size: 11px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -ul, li { - margin : 0; - padding : 0; - list-style-type: none; -} - -/** Firefox overrides this with -moz-use-system-font */ -button, -input, -input[type="submit"] { - font-family: Arial; -} - -/* IE11 applies a big default margin for range inputs */ -input[type="range"] { - padding: 0; -} - -/* Force apparition of scrollbars on leopard */ -::-webkit-scrollbar { - -webkit-appearance: none; - width: 6px; -} - -::-webkit-scrollbar-thumb { - border-radius: 2px; - background-color: #666; -} - -::-webkit-scrollbar-track { - background-color: rgba(50, 50, 50, 0.4); -} - -a, a:visited { - color: gold; -} -body { - background: #1D1D1D; -} - -/* Browser fixes */ -::-ms-clear { - display: none; -} - -.allow-user-select { - -webkit-touch-callout: initial; - -webkit-user-select: initial; - -khtml-user-select: initial; - -moz-user-select: initial; - -ms-user-select: initial; - user-select: initial; -} - -.no-overflow { - overflow: hidden; -} - -.highlight { - color: gold; -} - -.pull-top, -.pull-right, -.pull-bottom, -.pull-left { - position:absolute; -} - -.pull-top { - top:0; -} - -.pull-right { - right:0; -} - -.pull-bottom { - bottom:0; -} - -.pull-left { - left:0; -} - -.uppercase { - text-transform: uppercase; -} - -.checkbox-fix { - margin-left: 0; -} - -/** - * TOOLTIPS - */ -.tooltip-shortcut { - color: gold; -} - -.tooltip-container { - text-align: left; -} - -.tooltip-descriptor { - color:#999; -} - -.tooltip-descriptor:last-child { - padding-bottom: 5px; -} - -.tooltip-descriptor-button { - padding: 2px; - border: 1px Solid #999; - font-size: 0.8em; - margin-right: 5px; - width: 35px; - text-align: center; - border-radius: 3px; - display: inline-block; - line-height: 10px; -} -@keyframes fade { - 50% { opacity: 0.5; } -} - -@keyframes glow { - 0% { opacity: 0.66; } - 50% { opacity: 1; } - 100% { opacity: 0.66; } -} - -/** - * Application layout - */ - -.main-wrapper { - position: fixed; - top: 5px; - right: 0; - bottom: 5px; - left: 0; -} - -.column-wrapper { - text-align: center; - font-size: 0; - display: flex; - - position: absolute; - left: 100px; /* Reserve room for tools on the left edge of the screen. */ - top: 0; - right: 50px; /* Reserve room for actions on the right edge of the screen. */ - bottom: 0; -} - -.left-column { - vertical-align: top; - height: 100%; - margin-right: 7px; - flex-shrink: 0; -} - -.main-column { - height: 100%; - position: relative; -} - -.right-column { - box-sizing: border-box; - vertical-align: top; - height: 100%; - flex-shrink: 0; - - display: flex; - flex-direction: column; - position: relative; - - margin-left: 10px; - /* Add some padding for the absolutely positioned .cursor-coordinates */ - padding-bottom: 20px; -} - -.drawing-canvas-container { - font-size: 0; -} - -.sticky-section { - position: fixed; - top: 0; - bottom: 0; - z-index: 1000; -} - -.sticky-section .sticky-section-wrap { - display: table; - height: 100%; -} - -.sticky-section .vertical-centerer { - display: table-cell; - vertical-align: middle; -} - -.left-sticky-section.sticky-section { - left: 0; - max-width: 100px; -} - -.left-sticky-section .tool-icon { - float: left; -} - -.cursor-coordinates { - color:#888; - font-size:12px; - font-weight:bold; - font-family:monospace; -} - -/** - * Canvases layout - */ - -.canvas { - position: relative; - z-index: 1; -} - -.canvas-container { - position: relative; - display: block; -} - -.canvas-container .canvas-background { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.light-picker-background, -.light-canvas-background .canvas-background { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEXf39////8zI3BgAAAAHklEQVR4AWNghAIGCMDgjwgFCDDSw2M0PSCD0fQAACRcAgF4ciGUAAAAAElFTkSuQmCC') repeat; -} - -.medium-picker-background, -.medium-canvas-background .canvas-background { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEW6urr///82MBGFAAAAHUlEQVR4AWOAAUYoQOePEAUj3v9oYDQ9gMBoegAAJFwCAbLaTIMAAAAASUVORK5CYII=') repeat; -} - -.lowcont-medium-picker-background, -.lowcont-medium-canvas-background .canvas-background { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEXV1dXb29tFGkCIAAAAHklEQVR4AWNghAIGCMDgjwgFCDDSw2M0PSCD0fQAACRcAgF4ciGUAAAAAElFTkSuQmCC') repeat; -} - -.lowcont-dark-picker-background, -.lowcont-dark-canvas-background .canvas-background { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEVMTExVVVUnhsEkAAAAHUlEQVR4AWOAAUYoQOePEAUj3v9oYDQ9gMBoegAAJFwCAbLaTIMAAAAASUVORK5CYII=') repeat; -} - -.canvas.onion-skin-canvas { - opacity: 0.2; -} - -.canvas.canvas-overlay, -.canvas.layers-canvas, -.canvas.onion-skin-canvas { - position: absolute; - top: 0; - left: 0; -} - -.tools-wrapper, -.options-wrapper, -.palette-wrapper { - float : left; -} - -/** - * Z-indexes should match the drawing area canvas superposition order : - * - 1 : draw layers below current layer - * - 2 : draw current layer - * - 3 : draw layers above current layer - * - 4 : draw the tools overlay - */ -.canvas.layers-below-canvas {z-index: 7;} -.canvas.drawing-canvas {z-index: 8;} -.canvas.canvas-overlay {z-index: 9;} -.canvas.onion-skin-canvas {z-index: 10;} -.canvas.layers-above-canvas {z-index: 11;} -@font-face { - font-family: 'piskel'; - src:url('fonts/icomoon.eot?-3olv93'); - src:url('fonts/icomoon.eot?#iefix-3olv93') format('embedded-opentype'), - url('fonts/icomoon.woff?-3olv93') format('woff'), - url('fonts/icomoon.ttf?-3olv93') format('truetype'), - url('fonts/icomoon.svg?-3olv93#icomoon') format('svg'); - font-weight: normal; - font-style: normal; -} - -[class^="piskel-icon-"], [class*=" piskel-icon-"] { - font-family: 'piskel'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.piskel-icon-eye:before { - content: "\e602"; -} - -.piskel-icon-onion:before { - content: "\e601"; -} - -.piskel-icon-download:before { - content: "\e600"; -} - -.piskel-icon-rotateleft:before { - content: "\e603"; -} - -.piskel-icon-rotateright:before { - content: "\e604"; -} - -.piskel-icon-fliph:before { - content: "\e605"; -} - -.piskel-icon-flipv:before { - content: "\e606"; -} - -.piskel-icon-trashplain:before { - content: "\e607"; -} - -.piskel-icon-trash:before { - content: "\e608"; -} - -.piskel-icon-merge:before { - content: "\e609"; -} - -.piskel-icon-pencil:before { - content: "\e610"; -} - -.piskel-icon-close:before { - content: "\e611"; -} - -.piskel-icon-minus:before { - content: "\e60a"; -} - -.piskel-icon-plus:before { - content: "\e60b"; -} - -.piskel-icon-arrow-up-fat:before { - content: "\e60c"; -} - -.piskel-icon-arrow-down-fat:before { - content: "\e60d"; -} - -.piskel-icon-arrow-up-thin:before { - content: "\e60e"; -} - -.piskel-icon-arrow-down-thin:before { - content: "\e60f"; -} - -.row { - display: block; -} - -.textfield { - box-sizing:border-box; - - background : black; - border : 1px solid #888; - border-radius : 2px; - padding : 3px 10px; - color : white; - - height: 23px; -} - -.textfield[readonly="true"] { - background: transparent; -} - -.textfield[disabled=disabled] { - background : #3a3a3a; -} - -.textfield:focus { - border-color: gold; - outline: none; -} - -.textfield-small { - width : 50px; -} - -.button { - box-sizing: border-box; - height: 24px; - background-color: #666; - border-style: none; - border-radius: 2px; - cursor: pointer; - text-decoration: none; - - color: white; - font-weight: bold; - font-size: 1rem; - text-align: center; - - transition: background-color 0.2s linear; -} - -.button:hover { - color: gold; -} - -.button-primary { - background-color: gold; - color: black; -} - -.button-primary:hover { - background-color: white; - color: black; -} - -.button[disabled], -.button[disabled]:hover { - cursor:default; - background-color: #aaa; - color: #777; -} - -.import-size-field, -.resize-size-field, -.export-size-field { - width: 50px; - margin-right: 8px; - text-align: right; -} - -/** Righty sticky drawer expanded state. */ - -.right-sticky-section.sticky-section { - right: 0; - width: 47px; - - -webkit-transition: all 200ms ease-out; - -moz-transition: all 200ms ease-out; - -ms-transition: all 200ms ease-out; - -o-transition: all 200ms ease-out; - transition: all 200ms ease-out; -} - -.right-sticky-section.expanded { - right: 280px; -} - -.right-sticky-section .tool-icon { - float: right; - margin-right: 0; -} - -.tool-icon .label { - position: absolute; - left: 0; - bottom: 4px; - right: 0; - font-size: 11px; - text-transform: uppercase; - color: #fff; - text-align: center; -} - -.drawer-content { - overflow: hidden; - background-color: #444; - height: 550px; - max-height: 100%; - width: 280px; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - box-shadow: 0 0 5px 0 black; -} - -.right-sticky-section.expanded .tool-icon { - padding-right: 1px; -} - -.right-sticky-section .tool-icon.has-expanded-drawer { - position: relative; - background-color: #444; - margin-right: 0; - padding-right: 2px; - border-left : 3px solid gold; -} - -/************************************************************************************************/ -/* Common settings classes */ -/************************************************************************************************/ - -.settings-section { - margin: 10px 20px; - font-size: 12px; - font-weight: bold; - color: #ccc; -} - -.settings-section .button { - margin: 0; -} - -.settings-title { - margin-top: 20px; - margin-bottom: 10px; - text-transform: uppercase; - border-bottom: 1px #aaa solid; - padding-bottom: 5px; - color: gold; -} - -.settings-description { - margin : 0 0 10px 0; -} - -.settings-form-section { - margin-bottom: 10px; -} - -.settings-item { - margin : 10px 0; -} - -[name*=checkbox] { - vertical-align: middle; -} - -/*******************************/ -/* Application Setting panel */ -/*******************************/ - -.background-picker-wrapper { - display: inline-block; - width: 130px; - overflow: hidden; - vertical-align: middle; - margin-left: 5px; -} - -.background-picker { - cursor: pointer; - float: left; - height: 14px; - width: 14px; - background-color: transparent; - margin-right: 5px; - padding: 1px; - position: relative; - border: #888 2px solid; -} - -.background-picker:hover { - border-color: #eee; -} - -.background-picker.selected { - border-color: gold; -} - -.settings-opacity-input { - margin: 5px; - vertical-align: middle; -} - -.layer-opacity-input { - width: 100px; -} - -.seamless-opacity-input { - width: 75px; -} - -.settings-opacity-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.grid-width-select, -.color-format-select { - margin: 5px 5px 0 5px; -} - -.settings-section-application > .settings-title { - /* Override the default 10px margin bottom for this panel */ - margin-bottom: 15px; -} - -.settings-section-application .button-primary { - margin-top: 10px; -} - -/*******************************/ -/* Gif/Png Export Setting panel*/ -/*******************************/ -.gif-download-button, -.gif-render-button { - margin-top : 10px; - margin-right : 10px; -} - -.gif-export-preview, -.png-export-preview { - position:relative; - margin-top:10px; - max-height:32px; -} - -.gif-export-preview { - max-width:32px; -} - -.png-export-preview img { - max-height:32px; - float: left; -} - -.png-export-preview .light-picker-background { - max-width:240px; -} - -.gif-upload-status { - width: 180px; - margin-left: 5px; - margin-top: 10px; -} - -.gif-upload, -.png-export-preview { - overflow: hidden; -} - -.gif-upload-status, -.gif-export-preview { - float : left; -} - -.preview-upload-ongoing:before{ - content: "Upload ongoing ..."; - position: absolute; - display: block; - height: 100%; - width: 100%; - text-align: center; - padding-top: 45%; - box-sizing:border-box; - -moz-box-sizing:border-box; - background: rgba(0,0,0,0.5); - color: white; -} - -.export-scale { - margin-bottom: 10px; -} - -.export-scale .scale-input { - margin: 5px; - vertical-align: middle; - width: 150px; -} - -.export-scale .scale-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.export-resize { - margin: 10px 0; - overflow: hidden; -} - -.export-resize > * { - float: left; -} - -.export-resize > *:not(:last-child) { - margin-right: 10px; -} - -.export-resize > .resize-field { - width: 70px; -} - -.export-resize > .resize-label { - height: 23px; - line-height: 23px; -} - -.export-tabs { - overflow: hidden; - position: relative; -} - -.export-tabs:after { - content: ""; - display: block; - position: absolute; - bottom: 0; - width: 100%; - height: 1px; - z-index: 0; - background-color: gold; -} - -.export-tab { - float: left; - cursor: pointer; - padding: 5px; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; - /* Make sure the tab and its border are positioned above the :after element; */ - position: relative; - z-index: 1; -} - -.export-tab.selected, -.export-tab:hover { - color: gold; -} - -.export-tab.selected { - border-color: gold; - border-bottom-color: #444; - border-style: solid; - border-width: 1px; -} - -.export-panel-header { - padding: 10px 5px 0px; -} - -.export-info { - font-style: italic; - text-shadow: none; - font-weight: normal; -} - -.export-panel-section { - padding: 5px; - margin-top: 10px; - border: 1px solid #5d5d5d; - border-radius: 2px; -} - -.export-panel-row { - display: flex; - align-items: center; - overflow: hidden; -} - -.export-panel-gif .button { - margin-right: 5px; - width: 75px; - flex-shrink: 0; -} - -.export-panel-png .textfield { - width: 50px; -} - -.png-export-dimension-info, -.png-export-datauri-info { - margin-left: 5px; -} - -#png-export-columns, -#png-export-rows { - /* Override default textfield padding-right to keep the number spinners - aligned to the right. */ - padding-right: 0; -} - -/************************************************************************************************/ -/* Import panel */ -/************************************************************************************************/ - -.import-section, -.resize-section { - margin: 10px 0; -} - -.file-input-button { - margin-right: 8px; - border-radius: 2px; -} - -.import-highlight { - font-weight: bold; - color: white; -} -.resize-section-title { - vertical-align: top; - display: inline-block; - padding-top: 5px; - width: 25%; -} - -/*****************/ -/* ANCHOR WIDGET */ -/*****************/ - -.resize-origin-container { - overflow: hidden; - position: relative; - width: 70px; - margin-top: 5px; - display: inline-block; -} - -.transition .resize-origin-option, -.transition .resize-origin-option:before { - transition: background-color 0.2s, border-color 0.2s; -} - -.resize-origin-option { - float: left; - position: relative; - - box-sizing: border-box; - margin: 0 1px 1px 0; - width: 20px; - height: 20px; - - background : #888; - - font-size: 8px; - text-align: center; - cursor: pointer; -} - -.disabled .resize-origin-option { - cursor: default; - background : #555; - border-color: #555 !important; -} - -.resize-origin-option:hover { - border : 3px solid white; -} - -.resize-origin-option.selected { - border : 3px solid gold; -} - -.resize-origin-option:before { - content: ''; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin: -2px; -} - -.resize-origin-option.selected:before { - content: ''; - width: 4px; - height: 4px; - background: gold; -} - -.disabled .resize-origin-option.selected:before { - background: #555; -} - -.disabled .resize-origin-option[data-neighbor]:before { - border-color: #555 !important; -} - -.resize-origin-option[data-neighbor]:before { - width: 0; - height: 0; - border-width: 4px; - border-style: solid; - border-color: transparent; -} - -.resize-origin-option[data-neighbor="bottom"]:before { - border-top-color: gold; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="left"]:before { - border-right-color: gold; - margin-top: -4px; - margin-left: -6px; -} - -.resize-origin-option[data-neighbor="top"]:before { - border-bottom-color: gold; - margin-top: -6px; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="right"]:before { - border-left-color: gold; - margin-top: -4px; -} -.save-field { - width: 100%; -} - -.save-status { - margin-top: 10px; - margin-bottom: -10px; - vertical-align: middle; - font-weight: normal; - text-shadow: none; - font-style: italic; -} - -.save-file-name { - white-space: nowrap; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-desktop-file-name { - word-wrap: break-word; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-status-warning-icon { - float: left; - margin-top: 5px; -} - -.save-status-warning-icon { - overflow: hidden; - padding-left: 10px; -} - -.tool-icon { - position : relative; - cursor : pointer; - width: 46px; - height: 46px; - margin: 1px; - background-color: #3a3a3a; -} - -.tool-icon.selected { - cursor: default; - background-color: #444; -} - -.tool-icon.selected:before { - content:""; - position : absolute; - height : 100%; - width : 100%; - border: 3px solid gold; - box-sizing: border-box; -} - -.tool-icon:hover { - background-color: #444; -} - -/* - * Tool cursors: - */ - -.tool-paint-bucket .drawing-canvas-container:hover, -.tool-colorswap .drawing-canvas-container:hover { - cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; -} - -.tool-vertical-mirror-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; -} - -.tool-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/pen.png) 1 14, pointer; -} - -.tool-dithering .drawing-canvas-container:hover { - cursor: url(../img/cursors/dither.png) 1 14, pointer; -} - -.tool-lighten .drawing-canvas-container:hover { - cursor: url(../img/cursors/lighten.png) 1 15, pointer; -} - -.tool-eraser .drawing-canvas-container:hover { - cursor: url(../img/cursors/eraser.png) 3 14, pointer; -} - -.tool-stroke .drawing-canvas-container:hover { - cursor: url(../img/cursors/stroke.png) 1 14, pointer; -} - -.tool-rectangle .drawing-canvas-container:hover { - cursor: url(../img/cursors/rectangle.png) 5 15, pointer; -} - -.tool-circle .drawing-canvas-container:hover { - cursor: url(../img/cursors/circle.png) 5 15, pointer; -} - -.tool-move .drawing-canvas-container:hover { - cursor: url(../img/cursors/hand.png) 7 7, pointer; -} - -.tool-rectangle-select .drawing-canvas-container:hover, -.tool-lasso-select .drawing-canvas-container:hover { - cursor: crosshair; -} - -.tool-shape-select .drawing-canvas-container:hover { - cursor: url(../img/cursors/wand.png) 10 5, pointer; -} - -.tool-colorpicker .drawing-canvas-container:hover { - cursor: url(../img/cursors/dropper.png) 2 15, pointer; -} - -.swap-colors-button { - position: relative; - top: 50px; - left: 6px; - height: 18px; - width: 18px; - - opacity : 0.3; - - cursor : pointer; -} - -.swap-colors-button:hover { - opacity : 1; -} - -.tool-color-picker { - position:relative; -} - -.tool-color-picker:nth-child(1) { - z-index : 100; -} - -.tool-color-picker:nth-child(2) { - z-index : 90; - margin-top: 25px; - margin-left:-20px; -} - -.tool-color-picker input { - width: 16px; - height: 16px; - text-indent: -10000px; - border: 1px solid black; - background: white; - cursor: pointer; - position : relative; - top: 10px; - margin-left: 2px; -} - -.tool-color-picker .secondary-color-picker { - top : 18px; - margin-left: 0; -} - -.palette-wrapper { - margin-top: 10px; - margin-left: 10px; -} - -.palette-color[data-color=TRANSPARENT] { - position: relative; - top: 10px; - left: 10px; - background-color: white; - height : 16px; - width : 16px; - border: 2px solid #000; - background-size: 16px 16px; - background-position: 0 0; - background-image: -webkit-gradient( - linear, - left top, - right bottom, - color-stop(0, #fff), - color-stop(0.45, #fff), - color-stop(0.5, #ff0000), - color-stop(0.55, #fff), - color-stop(1, #fff) - ); - background-image: -moz-linear-gradient( - left top, - #fff 0%, - #fff 45%, - #f00 50%, - #fff 55%, - #fff 100% - ); -} - - -.pen-size-container { - overflow: hidden; - padding: 5px 5px; -} - -.pen-size-option { - float: left; - box-sizing: border-box; - width: 20px; - height: 20px; - margin-right: 2px; - border-style: solid; - border-width: 2px; - border-color: #444; - cursor: pointer; -} - -.pen-size-option[data-size='1'] { - padding: 5px; -} -.pen-size-option[data-size='2'] { - padding: 4px; -} -.pen-size-option[data-size='3'] { - padding: 3px; -} -.pen-size-option[data-size='4'] { - padding: 2px; -} - -.pen-size-option:before { - content: ''; - width: 100%; - height: 100%; - background-color: white; - display: block; - text-align: center; - line-height: 12px; - font-size: 90%; -} - -.pen-size-option:hover { - border-color: #888; -} - -.pen-size-option.selected:before { - background-color: gold; -} - -.pen-size-option.selected { - border-color: gold; -} - -.pen-size-option.labeled:before { - content: attr(real-pen-size); - color: black; -} - -/* -Icon classes can be used entirely standalone. They are named after their original file names. - -Example usage in HTML: - -`display: block` sprite: -
- -To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: - -// CSS -.icon { - display: inline-block; -} - -// HTML - -*/ -.icon-common-keyboard-gold { - background-image: url(../img/icons.png); - background-position: 0px -230px; - width: 36px; - height: 21px; -} -.icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons.png); - background-position: -230px -107px; - width: 18px; - height: 18px; -} -.icon-common-warning-red { - background-image: url(../img/icons.png); - background-position: -230px -86px; - width: 21px; - height: 21px; -} -.icon-frame-dragndrop-white { - background-image: url(../img/icons.png); - background-position: -230px -30px; - width: 30px; - height: 30px; -} -.icon-frame-duplicate-white { - background-image: url(../img/icons.png); - background-position: -230px 0px; - width: 30px; - height: 30px; -} -.icon-frame-plus-white { - background-image: url(../img/icons.png); - background-position: -230px -60px; - width: 26px; - height: 26px; -} -.icon-frame-recyclebin-white { - background-image: url(../img/icons.png); - background-position: -184px -184px; - width: 30px; - height: 30px; -} -.icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons.png); - background-position: -230px -143px; - width: 18px; - height: 18px; -} -.icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons.png); - background-position: -230px -125px; - width: 18px; - height: 18px; -} -.icon-settings-export-white { - background-image: url(../img/icons.png); - background-position: -138px 0px; - width: 46px; - height: 46px; -} -.icon-settings-gear-white { - background-image: url(../img/icons.png); - background-position: -138px -46px; - width: 46px; - height: 46px; -} -.icon-settings-open-folder-white { - background-image: url(../img/icons.png); - background-position: -138px -92px; - width: 46px; - height: 46px; -} -.icon-settings-resize-white { - background-image: url(../img/icons.png); - background-position: 0px -138px; - width: 46px; - height: 46px; -} -.icon-settings-save-white { - background-image: url(../img/icons.png); - background-position: -46px -138px; - width: 46px; - height: 46px; -} -.icon-tool-circle { - background-image: url(../img/icons.png); - background-position: -92px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorpicker { - background-image: url(../img/icons.png); - background-position: -138px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorswap { - background-image: url(../img/icons.png); - background-position: 0px 0px; - width: 46px; - height: 46px; -} -.icon-tool-dithering { - background-image: url(../img/icons.png); - background-position: -184px -46px; - width: 46px; - height: 46px; -} -.icon-tool-eraser { - background-image: url(../img/icons.png); - background-position: -184px -92px; - width: 46px; - height: 46px; -} -.icon-tool-lasso-select { - background-image: url(../img/icons.png); - background-position: -184px -138px; - width: 46px; - height: 46px; -} -.icon-tool-lighten { - background-image: url(../img/icons.png); - background-position: 0px -184px; - width: 46px; - height: 46px; -} -.icon-tool-move { - background-image: url(../img/icons.png); - background-position: -46px -184px; - width: 46px; - height: 46px; -} -.icon-tool-paint-bucket { - background-image: url(../img/icons.png); - background-position: -92px -184px; - width: 46px; - height: 46px; -} -.icon-tool-pen { - background-image: url(../img/icons.png); - background-position: -138px -184px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle-select { - background-image: url(../img/icons.png); - background-position: -184px 0px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle { - background-image: url(../img/icons.png); - background-position: -92px -92px; - width: 46px; - height: 46px; -} -.icon-tool-shape-select { - background-image: url(../img/icons.png); - background-position: -46px -92px; - width: 46px; - height: 46px; -} -.icon-tool-stroke { - background-image: url(../img/icons.png); - background-position: 0px -92px; - width: 46px; - height: 46px; -} -.icon-tool-vertical-mirror-pen { - background-image: url(../img/icons.png); - background-position: -92px -46px; - width: 46px; - height: 46px; -} -.icon-tool-center { - background-image: url(../img/icons.png); - background-position: -92px 0px; - width: 46px; - height: 46px; -} -.icon-tool-clone { - background-image: url(../img/icons.png); - background-position: -46px -46px; - width: 46px; - height: 46px; -} -.icon-tool-flip { - background-image: url(../img/icons.png); - background-position: 0px -46px; - width: 46px; - height: 46px; -} -.icon-tool-rotate { - background-image: url(../img/icons.png); - background-position: -46px 0px; - width: 46px; - height: 46px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - .icon-common-keyboard-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-warning-red { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-dragndrop-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-duplicate-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-plus-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-recyclebin-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-export-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-gear-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-open-folder-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-resize-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-save-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-circle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorpicker { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorswap { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-dithering { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-eraser { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lasso-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lighten { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-move { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-paint-bucket { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-shape-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-stroke { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-vertical-mirror-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-center { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-clone { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-flip { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rotate { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } -} - -.color-picker-slider * { - box-sizing: border-box; -} - -.color-picker-slider input[type="range"] { - -webkit-appearance: none; - -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - width: 100%; - border: none; - padding: 1px 2px; - border-radius: 3px; - background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); - box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; - outline: none; /* no focus outline */ -} - -/* thumb */ - -.color-picker-slider input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - cursor:pointer; - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ - background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} -.color-picker-slider input[type="range"]::-moz-range-thumb { - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -.color-picker-slider input[type="range"]::-ms-thumb { - width: 7px; - height: 18px; - border-radius: 2px; - border: 0; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -/*CROSS BROWSER RESET*/ - - -.color-picker-slider input[type="range"]::-moz-range-track { - border: inherit; - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-track { - border: inherit; - color: transparent; /* don't drawn vertical reference line */ - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-fill-lower, -.color-picker-slider input[type="range"]::-ms-fill-upper { - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-tooltip { - display: none; -} - -.color-picker-slider, -.color-picker-input { - padding: 0 10px; - height : 25px; - overflow: hidden; -} - -.color-picker-slider span{ - line-height : 25px; - width : 10px; - float:left; -} - -.color-picker-slider input[type="range"]{ - float:left; - height : 10px; - width : 100px; - margin: 7px 1px 7px 8px; -} - -.color-picker-slider input[type="text"]{ - float:left; - width : 47px; - margin-left: 5px; -} - -.color-picker-input { - margin-bottom: 10px; -} - -.color-picker-input .textfield{ - width:100%; -} - -.color-picker-slider input[type="range"][data-dimension="h"] { - background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} -#dialog-container-wrapper { - position: absolute; - z-index: 20000; - - top: 0; - right: 0; - bottom: 0; - left: 0; - - padding: 50px 150px; - overflow: hidden; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - background-color: rgba(0,0,0,0.8); - opacity: 0; - pointer-events: none; - - color: white; -} - -#dialog-container-wrapper.animated { - transition: opacity 0.2s; -} - -#dialog-container-wrapper.show { - opacity: 1; - pointer-events: auto; -} - -#dialog-container { - width: 100%; - height: 100%; - - margin-top: -1500px; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - border-radius: 3px; - border : 3px solid gold; - background: #444; - overflow: auto; -} - -.show #dialog-container { - margin-top: 0; -} - -#dialog-container.browse-local { - width: 700px; - height: 500px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -350px; -} - -.show #dialog-container.browse-local { - margin-top: -250px; -} - -.dialog-wrapper { - height: 100%; - position : relative; -} - -.dialog-content { - position: absolute; - top: 45px; - bottom: 0; - width: 100%; - box-sizing: border-box; -} - -.dialog-head { - width: 100%; - background: gold; - margin: 0; - padding: 10px; - color: black; - font-size: 1.8em; - height: 45px; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -.dialog-close { - position: absolute; - top: 0; - right: 0; - line-height: 45px; - margin-right: 10px; - font-size: 1.3em; - cursor: pointer; -} - -/************************************************************************************************/ -/* Browse local piskels panel */ -/************************************************************************************************/ - -.local-piskel-list { - width: 100%; -} - -.local-piskel-item { - height: 3em; -} - -.local-piskel-name { - width: 40%; -} - -.local-piskel-save-date { - font-weight : normal; -} - -.local-piskel-list a { - text-decoration: none; -} - -.local-piskel-list a:hover { - text-decoration: underline; -} - -.local-piskel-list-head { - font-weight: bold; - color: gold; -} - -.local-piskel-load-button, -.local-piskel-delete-button { - width : 75px; -} -.cheatsheet-link { - position: fixed; - bottom: 10px; - left: 10px; - - color : gold; - font-weight: bold; - font-size : 1.25em; - line-height: 20px; - - cursor: pointer; - - opacity: 0.5; - z-index: 11000; - transition : opacity 0.3s; -} - -.cheatsheet-link:hover { - opacity: 1; -} - -.cheatsheet-container { - box-sizing: border-box; - display: block; - - bottom: 46px; - padding: 20px 3%; - border-radius: 3px; - background-color: rgba(0,0,0,0.9); - overflow: auto; -} - -.cheatsheet-container .cheatsheet-title { - font-size:24px; - margin-top: 30px; -} - -.cheatsheet-container .cheatsheet-title:nth-of-type(1) { - margin-top: 0; -} - -.cheatsheet-section { - box-sizing: border-box; - float: left; - - vertical-align: top; - padding : 0 20px 20px 20px; - min-width: 300px; -} - -.cheatsheet-boxes { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - float: left; -} - -@media (min-width: 1300px) { - .cheatsheet-container > div { - width: 33%; - } - .cheatsheet-boxes { - flex-direction: column; - } -} - -.cheatsheet-shortcut { - overflow: hidden; - margin: 10px 0; -} - -.cheatsheet-icon.tool-icon { - float: left; - - height: 30px; - width: 30px; - margin: 0 10px 0 0; - background-size: 30px 30px; -} - -.cheatsheet-description { - color: white; - font-size : 14px; - margin-left: 10px; - line-height : 30px; -} - -.cheatsheet-key { - box-sizing: border-box; - display : inline-block; - height: 30px; - line-height: 26px; - padding: 0 10px; - - border : 2px solid white; - border-radius: 2px; - - text-align: center; - font-family: monospace; - font-weight: bold; - font-size : 18px; - color: white; -} - -.cheatsheet-shorcut-conflict .cheatsheet-key { - border-color: red; - color: red; -} - -.cheatsheet-shortcut-editable { - cursor : pointer; -} - -.cheatsheet-shortcut-editable .cheatsheet-key { - border-color: gold; - color: gold; -} - -.cheatsheet-shortcut-editing .cheatsheet-key { - animation: fade .5s infinite; -} - -.cheatsheet-shortcut-undefined .cheatsheet-key { - border-color: red; - color: red; -} - -/*Cheatsheet actions*/ - -.cheatsheet-actions { - position: absolute; - box-sizing: border-box; - - bottom : 0; - left : 0; - right : 0; - height : 46px; - - padding : 10px; - overflow: hidden; - - background-color : gold; -} - -.cheatsheet-helptext { - font-size: 14px; - height : 26px; - line-height : 26px; - color: black; -} - -.cheatsheet-helptext-tooltip { - text-align: left; -} - -.cheatsheet-helptext-tooltip-item { - line-height: 0.9em; - margin: 10px 0; -} - -.cheatsheet-button { - position: absolute; - bottom: 10px; - right: 10px; -} - - -.cheatsheet-icon-tool-circle { - background-image: url(../img/icons/tools/tool-circle.png); -} - -.cheatsheet-icon-tool-colorpicker { - background-image: url(../img/icons/tools/tool-colorpicker.png); -} - -.cheatsheet-icon-tool-colorswap { - background-image: url(../img/icons/tools/tool-colorswap.png); -} - -.cheatsheet-icon-tool-dithering { - background-image: url(../img/icons/tools/tool-dithering.png); -} - -.cheatsheet-icon-tool-eraser { - background-image: url(../img/icons/tools/tool-eraser.png); -} - -.cheatsheet-icon-tool-lasso-select { - background-image: url(../img/icons/tools/tool-lasso-select.png); -} - -.cheatsheet-icon-tool-lighten { - background-image: url(../img/icons/tools/tool-lighten.png); -} - -.cheatsheet-icon-tool-move { - background-image: url(../img/icons/tools/tool-move.png); -} - -.cheatsheet-icon-tool-paint-bucket { - background-image: url(../img/icons/tools/tool-paint-bucket.png); -} - -.cheatsheet-icon-tool-pen { - background-image: url(../img/icons/tools/tool-pen.png); -} - -.cheatsheet-icon-tool-rectangle-select { - background-image: url(../img/icons/tools/tool-rectangle-select.png); -} - -.cheatsheet-icon-tool-rectangle { - background-image: url(../img/icons/tools/tool-rectangle.png); -} - -.cheatsheet-icon-tool-shape-select { - background-image: url(../img/icons/tools/tool-shape-select.png); -} - -.cheatsheet-icon-tool-stroke { - background-image: url(../img/icons/tools/tool-stroke.png); -} - -.cheatsheet-icon-tool-vertical-mirror-pen { - background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); -} - -#dialog-container.create-palette { - width: 500px; - height: 600px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.create-palette { - margin-top: -300px; -} - -.create-palette-section { - position: absolute; - left: 10px; - top: 50px; -} - -.create-palette-import-section { - display : inline-block; -} - -.colors-container { - position: absolute; - - left: 10px; - right: 10px; - top: 85px; - - height: 460px; - - border: 1px solid black; - background: #333; -} - -.color-picker-container { - position:absolute; - left : 280px; - top:0; - bottom:0; - right:0; - background: #222; -} - -.create-palette-actions { - position: absolute; - box-sizing: border-box; - - width:100%; - height: 45px; - - left: 0; - right: 0; - bottom: 0; - - padding:10px; - text-align:right; -} - -.color-preview { - width: 170px; - height: 70px; - margin: 11px; -} - -.colors-list { - overflow: auto; - width: 280px; - box-sizing: border-box; - height: 100%; - padding-bottom: 10px; -} - -.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - position:relative; - float : left; - - width : 44px; - height : 44px; - margin : 10px 0 0 10px; - - box-sizing : border-box; - - cursor : pointer; -} - -@-moz-document url-prefix() { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - - -.create-palette-color { - border:1px solid #2c2c2c; - transition : border-color 0.2s; -} -.create-palette-color:hover { - border:1px solid gold; -} - -.colors-list-drop-proxy { - border:2px dotted #eee; -} - -.create-palette-new-color { - border:2px dotted gold; - - border-radius: 2px; - line-height: 40px; - text-align: center; - font-size: 20px; - color: gold; -} - -.create-palette-color.selected { - border:2px solid gold; -} - -.create-palette-remove-color { - position: absolute; - top: 0; - right: 0; - padding: 2px 4px 0 0; - opacity : 0.2; - - font-weight: bold; - color: rgb(255,255,255); - text-shadow : 0 0 1px rgb(0,0,0); - - transition : opacity 0.3s, color 0.1s; -} - -.light-color .create-palette-remove-color { - color: rgb(0,0,0); - text-shadow : 0 0 1px rgb(255,255,255); -} - -.selected .create-palette-remove-color { - top: -1px; - right: -1px; -} - -.create-palette-color:hover .create-palette-remove-color { - opacity: 0.6; -} - -.create-palette-color .create-palette-remove-color:hover { - opacity: 1; - color: rgb(240,80,80); - text-shadow : 0 0 1px rgb(0,0,0); -} - -/*SPECTRUM OVERRIDES*/ - -.create-palette .sp-container{ - background-color: transparent; - border: none; - box-shadow : none; - border-radius:0; - padding:5px; -} -/************************************************************************************************/ -/* Import dialog */ -/************************************************************************************************/ - -#dialog-container.import-image { - width: 550px; - height: 360px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.import-image { - margin-top: -150px; -} - -.import-subsection { - margin-left: 25px; -} - -.import-section:not(.import-subsection) > .dialog-section-title { - width: 50px; -} - -.import-section-preview-title { - position: absolute; - margin-left: 50%; - margin-top: -28px; -} - -.import-section-preview { - position: absolute; - display: inline-block; - border: 1px dashed #999; - border-radius: 3px; - margin-left: 50%; -} - -.import-section-preview img { - max-width: 220px; - max-height: 220px; - display: block; -} - -.import-section-preview.no-border { - border-color: transparent; -} - -.import-section-preview canvas { - position: absolute; - left: 0; - top: 0; -} - -.dialog-section-title { - display : inline-block; - width: 80px; -} - -.dialog-section-radio { - margin-top: 15px; - vertical-align: sub; -} - -.import-size-field:nth-of-type(2) { - margin-left: 5px; -} - -.import-image-file-name { - display: inline-block; - overflow: hidden; - - width: 200px; - vertical-align: middle; - - word-break : break-all; - white-space: nowrap; - text-overflow: ellipsis; - - font-style: italic; - font-weight: normal; - text-shadow: none; - color: gold; -} - -[name=smooth-resize-checkbox] { - margin : 0 8px; -} - -.dialog-import-body { - padding: 10px 20px; - font-size:1.3em -} - -.import-button { - font-size: 1em; - height: 28px; - padding: 0px 10px; - margin-top: 15px; -} -.performance-link { - display: none; - position: fixed; - bottom: 10px; - right: 10px; - z-index: 11000; - cursor: pointer; - opacity: 0; - transition : opacity 0.3s; -} - -.performance-link.visible { - display: block; - opacity: 0.66; - animation: glow 2s infinite; -} - -.performance-link.visible:hover { - opacity: 1; - animation: none; -} - -#dialog-container.performance-info { - width: 500px; - height: 525px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; - margin-top: -260px; - -} - -.dialog-performance-info-body { - font-size: 13px; - letter-spacing: 1px; - padding: 10px 20px; -} - -.dialog-performance-info-body ul { - border: 1px solid #666; - padding: 5px; - border-radius: 3px; -} - -.dialog-performance-info-body li { - list-style-type: initial; - margin: 0 20px; -} - -.dialog-performance-info-body sup { - color: gold; - cursor: pointer; -} - -.show #dialog-container.performance-info { - margin-top: -300px; -} - -.dialog-performance-info-body .warning-icon { - float: left; - margin-top: 10px; -} - -.dialog-performance-info-body .warning-icon-info { - overflow: hidden; - margin-left: 30px; -} - -/************************************************************************************************/ -/* Unsupported browser dialog */ -/************************************************************************************************/ - -#dialog-container.unsupported-browser { - width: 600px; - height: 260px; - top : 50%; - left : 50%; - position : absolute; - margin-top: -130px; - margin-left: -300px; -} - -.unsupported-browser .dialog-content { - font-size:1.2em; - letter-spacing: 1px; - padding:10px 20px; - overflow: auto; -} - -.unsupported-browser .supported-browser-list { - padding: 5px 20px; -} - -.unsupported-browser .supported-browser-list li { - list-style-type: square; -} - -#current-user-agent { - color: gold; -} - -.user-message { - position: absolute; - right: 0; - bottom: 0; - padding: 10px 47px; - max-width: 300px; - - border-top-left-radius: 7px; - border: #e1a325 2px solid; - border-right: 0; - border-bottom: 0; - - color: #222; - background-color: gold; - - font-weight: bold; - font-size: 13px; - - z-index: 30000; -} - -.user-message .close { - position: absolute; - top: 6px; - right: 17px; - - font-size: 18px; - font-weight: bold; - - cursor: pointer; -} - -.user-message .close:hover { - color: black; -} - -.progress-bar-container { - position: absolute; - left: 0; - bottom: 0; - padding: 10px; - width: 360px; - border-top-right-radius: 2px; - border: gold 2px solid; - border-left: 0; - border-bottom: 0; - background-color: #444; - font-size: 14px; - z-index: 30000; - color: #eee; -} - -.progress-bar-item { - float: left; - height:20px; -} - -.progress-bar-status { - line-height: 20px; - width : 40px; - overflow : hidden; - margin: 0 0 0 10px; -} - -.progress-bar { - border : 1px solid grey; - margin-top: 8px; - height : 4px; - width : 300px; - background : linear-gradient(to left, gold, gold) no-repeat -300px 0; - background-color : black; -} -.toolbox-container { - border: 2px solid #888; - font-size: medium; - color: white; - text-align: left; - border-radius: 2px; - margin-top: 5px; - overflow: hidden; -} - -.toolbox-title { - padding: 8px; - margin: 0; - font-size: 15px; - /* reset for firefox */ - height: 16px; - background: #222; -} - -.toolbox-buttons { - flex-shrink: 0; - overflow: hidden; - border-top: 1px solid #666; - border-bottom: 1px solid #222; -} - -.toolbox-buttons .button { - /* Override border propery on .button elements from form.css */ - border-style: solid; - border-color: #333; - border-width: 0 1px 0 0; - border-radius: 0; - - background-color: #3f3f3f; -} - -.toolbox-buttons .button[disabled], -.toolbox-buttons .button[disabled]:hover { - background-color: #aaa; -} - -.toolbox-buttons button:last-child { - border-right-width: 0; -} - - -/** - * Layers container - */ -.layers-list-container { - min-height: 85px; - display: flex; - flex-direction: column; -} - -/** - * Layers title and toggle preview - */ - -.layers-title { - position: relative; - flex-shrink: 0; -} - -.layers-toggle-preview { - position: absolute; - top: 0.3em; - right: 0.5em; - - color: #999; - font-size: 1.3em; - cursor: pointer; - - transition: 0.2s linear; -} - -.layers-toggle-preview:hover { - color: white; -} - -.layers-toggle-preview-enabled, -.layers-toggle-preview-enabled:hover { - color : gold; -} - -/** - * Layers buttons - */ - -.layers-button { - margin: 0; - width: 16.66667%; - float : left; -} - -/** - * Layers list - */ - -.layers-list { - font-size : 12px; - overflow: auto; -} - -.layer-item { - position: relative; - display: flex; - height:24px; - line-height: 24px; - border-top: 1px solid #444; - cursor: pointer; -} - -.layer-item .layer-name { - padding: 0 0 0 10px; - flex: 1 auto; - white-space: nowrap; -} - -.layer-item .layer-name.overflowing-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.layer-item:hover { - background : #222; -} - -.layer-item-opacity { - padding-right: 8px; -} - -.current-layer-item, -.current-layer-item:hover { - background : #333; - color: gold; -} -.palettes-list-container { - min-height: 100px; - display: flex; - flex-direction: column; -} - -.palettes-title { - flex-shrink: 0; - background-size: 22px; - background-repeat: no-repeat; - background-position: 97%; -} - -/** - * Palettes action buttons - */ - -.palettes-list-container .toolbox-buttons { - background-color: #3f3f3f; - height: 24px; - padding: 0; -} - -.palettes-list-button, -.palettes-list-select { - margin: 0; - float: left; -} - -.palettes-list-button { - width: 16.66667%; -} - -.palettes-list-select { - width: 66.66667%; - height: 100%; - padding: 0 5px 0 5px; - - color: #aaa; - font-size : 0.75em; - - text-align:left; - font-weight: normal; - - transition : background-color 0.3s, color 0.3s; - cursor:pointer; -} - -.palettes-list-select:hover, -.palettes-list-select:focus { - background-color: #484848; - color: white; -} - -.palettes-list-select:focus { - outline: none; -} - -/* - * Palette colors list - */ - -.palettes-list-colors { - height: 100%; - max-height: 160px; - overflow: auto; - padding-top: 5px; -} - -.palettes-list-color { - cursor: pointer; - float: left; - margin: 0 0 5px 5px; - width: calc((100% - 30px) / 5); - height: 32px; - position: relative; -} - -.palettes-list-color div { - height: 100%; -} - -/* - * Placeholder when no color is available in the current palette - */ - -.palettes-list-no-colors { - height: 35px; - line-height: 35px; - width: 100%; - color: gray; - font-size: 0.7em; - font-style: italic; - text-align: center -} - -/* - * Primary and secondary color markers - */ - -.palettes-list-primary-color:before, .palettes-list-secondary-color:before { - content: ""; - position: absolute; - bottom: 1px; - display: inline-block; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); - width: 14px; - height: 14px; -} - -.palettes-list-primary-color:before { - left: 1px; -} - -.palettes-list-secondary-color:before { - right: 1px; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); -} - -/* - * Color index for the 9 first colors - */ - -.palettes-list-color:nth-child(-n+10):after { - position: absolute; - top: 0; - right: 0; - - background-color: black; - color: gold; - - font-family: Tahoma; - font-size: 0.5em; - font-weight: bold; - - padding: 2px 3px 2px 3px; - border-radius: 0 0 0 2px; -} - -.palettes-list-color:nth-child(1):after { - content: "1"; -} - -.palettes-list-color:nth-child(2):after { - content: "2"; -} - -.palettes-list-color:nth-child(3):after { - content: "3"; -} - -.palettes-list-color:nth-child(4):after { - content: "4"; -} - -.palettes-list-color:nth-child(5):after { - content: "5"; -} - -.palettes-list-color:nth-child(6):after { - content: "6"; -} - -.palettes-list-color:nth-child(7):after { - content: "7"; -} - -.palettes-list-color:nth-child(8):after { - content: "8"; -} - -.palettes-list-color:nth-child(9):after { - content: "9"; -} - -/** - * Animated preview styles. - */ - -.preview-container { - flex-shrink: 0; - - border : 0 Solid black; - border-radius:5px 0 0 5px; - box-shadow : 0 0 2px rgba(0,0,0,0.2); - font-size: 0; -} - -.preview-container .canvas-container { - overflow : hidden; -} - -.preview-container canvas { - border : 0 Solid transparent; -} - -.canvas-container .animated-preview-canvas-background { - position : relative; - height: 100%; -} - -#animated-preview-container { - background: #333; - border-radius : 0 0 2px 2px; - overflow : hidden; -} - -.canvas-container-wrapper { - height :200px; - width : 200px; - overflow:hidden; -} - -.preview-container .background-image-frame-container { - height: 100%; - width: 100%; - position: relative; - background-position: center; -} - -.display-fps { - float: left; - color: #aaa; - font-size: 12px; - min-width: 55px; - vertical-align: bottom; - line-height: 26px; -} - -.range-fps { - overflow: hidden; - width: 100px; - height : 26px; - margin : 0; - box-sizing: border-box; -} - -.preview-toggle-onion-skin { - font-size: 2rem; - color: #aaa; - float: left; - line-height: 26px; - height: 100%; - padding-left: 5px; - padding-right: 5px; - border-right: 1px solid #222; - transition: 0.2s linear; - cursor:pointer; -} - -.preview-toggle-onion-skin:hover { - color : white; -} - -.preview-toggle-onion-skin-enabled, -.preview-toggle-onion-skin-enabled:hover { - color : gold; -} - -.preview-contextual-actions { - position : absolute; - z-index: 500; - right : 10px; - top : 10px; - - cursor : pointer; - - opacity: 0; - transition: 0.3s opacity, 0.3s border-color; -} - -.minimap-container:hover .preview-contextual-actions { - opacity: 1; -} - -.preview-contextual-action { - float: left; - - width : 18px; - height: 18px; - line-height: 18px; - margin: 0 5px; - - border: 2px solid white; - background-color: rgba(0, 0, 0, 0.3); - color: white; - - font-size: 10px; - font-weight: bold; - font-family: Tahoma; -} - -.preview-contextual-action-hidden { - display: none; -} - -.preview-contextual-action:hover { - color: gold; - border-color: gold; -} - -/** - * Drop-down in preview size selection - */ -.preview-drop-down { - float: left; - position: relative; - width : 22px; - min-height: 22px; - margin: 0 5px; -} - -.preview-drop-down.preview-drop-down-disabled { - opacity: 0.5; -} - -.preview-disable-overlay{ - position: absolute; - width: 100%; - height: 100%; - display: none; -} - -.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { - display: block; - z-index: 10; -} - -.preview-drop-down .preview-contextual-action { - position: relative; - margin: 0 0 -100% 0; - opacity: 0; - transition: opacity linear .2s, - margin linear .2s; - transition-delay: 0s, .2s; - z-index: 1; -} - -.preview-drop-down:hover .preview-contextual-action { - margin: 0 0 5px 0; - opacity: 1; - transition-delay: 0s, 0s; -} - -.preview-drop-down .size-button-selected { - opacity: 1; - color: gold; - border-color: gold; - z-index: 5; -} - - -.open-popup-preview-button { - border : 2px solid white; - background-color : rgba(0,0,0,0.3); -} - -.open-popup-preview-button:hover { - border-color: gold; -} - -/** - * The regular image is provided by the sprite icons.png+icons.css - */ -.icon-minimap-popup-preview-arrow-white:hover { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); - background-position: 0 0; - background-size: 18px 18px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); - -} - -.transformations-container { - flex-shrink: 0; -} - -.transformations-container .tool-icon { - float:left; -} - -/*** -Spectrum Colorpicker v1.1.2 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue -{ - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top -{ - margin-bottom: 3px; -} -.sp-color, .sp-hue -{ - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error -{ - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container -{ - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container -{ - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container -{ - border-right: solid 1px #ccc; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el -{ - position:relative; -} - -/* Initial */ -.sp-initial -{ - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -/* Buttons */ -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview -{ - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette -{ - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el -{ - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container -{ - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel -{ - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover -{ - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active -{ - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el -{ - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner -{ - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner -{ - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -/** - * Piskel specific CSS for spectrum widgets - */ - -/* Widget's main container */ -.sp-container { - border-radius: 4px; - background-color: #2B2B2B; - border: solid 4px #888; - padding: 5px 5px 0 5px; - box-shadow : 0 0 5px 0 black; -} - -.sp-container[data-y-position=bottom] { - border-top-left-radius: 0; -} - -.sp-container[data-y-position=top] { - border-bottom-left-radius: 0; -} - -/* Color square container */ -.sp-color, .sp-hue { - border : 1px solid #222; -} - -/* Remove the padding on the input container */ -.sp-replacer { - padding: 4px; - height: 100%; - border-width: 0; - box-sizing: border-box; - -moz-box-sizing:border-box; - background-color: #444; -} - -.sp-replacer:hover { - background-color: #888; -} - -/* Hide the triangle */ -.sp-dd { - display: none; -} - -/* */ -.sp-preview { - margin-right: 0; - height: 100%; - width: 39px; - border-width: 0; -} - -.sp-palette-row-selection { - max-width: 62px; -} - -.sp-palette .sp-thumb-el { - margin : 0 5px 5px 0; - width: 24px; - height: 24px; - border-color: #444; - -} - -.sp-picker-container, .sp-palette-container { - padding-top: 5px; - padding-right: 5px; - padding-left: 5px; - border-left-width: 0; - border-right-width: 0; -} - -.sp-picker-container { - padding: 5px; - padding-bottom: 300px; - margin-bottom: -295px; -} - -.sp-slider { - height: 5px; - left: -2px; - right: -2px; - border: 2px solid white; - background: rgba(255,255,255,0); - opacity: 1; - border-radius: 2px; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-dragger { - border-radius: 8px; - height: 12px; - width: 12px; - border: 2px solid white; - background: none; - box-sizing:border-box; - -moz-box-sizing:border-box; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-palette .sp-thumb-el.sp-thumb-active { - border-color: gold; - box-shadow: 0 0 0px 1px gold; -} - -.sp-input { - border: 1px solid #666; - margin: 0; - background: #111; - border-radius: 2px; - color: #D3D3D3; - font-family: monospace!important; -} - -.sp-input.sp-validation-error { - background: #330000; -} -/*! - * Bootstrap v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.tooltip { - position: absolute; - z-index: 30000; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; -} -.tooltip.right { - margin-left: 3px; -} -.tooltip.bottom { - margin-top: 3px; -} -.tooltip.left { - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} - -.tooltip { - line-height: 20px; -} - -.tooltip.in { - opacity: 0.95; - filter: alpha(opacity=95); -} - -.tooltip { - line-height: 20px; -} -.preview-list-wrapper { - position: relative; - height: 100%; - overflow: hidden; -} - -.preview-list-scroller { - overflow-y: scroll; - overflow-x: hidden; - height: 100%; -} - -.top-overflow, -.bottom-overflow { - height: 20px; - position: absolute; - left: 0; - right: 12px; - - -webkit-transition: all 500ms ease-out; - -moz-transition: all 500ms ease-out; - -ms-transition: all 500ms ease-out; - -o-transition: all 500ms ease-out; - transition: all 500ms ease-out; - - background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), - linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); - background-size: 30px 40px; - background-repeat: repeat-x; - background-position: 3px 0; - z-index: 10; -} - -.top-overflow { - top: -20px; -} - -.bottom-overflow { - bottom: -20px; - background-position: 3px -20px; -} - -.top-overflow-visible .top-overflow { - top: 0; -} - -.bottom-overflow-visible .bottom-overflow { - bottom: 0; -} - -.preview-list { - list-style-type: none; - padding-right: 9px; -} - -.add-frame-action { - margin-top: 8px; - padding: 6px 0; - overflow: hidden; - width: 96px; - - border: #888 solid 3px; - border-radius: 4px; - - color: #888; - background-color: #222; - font-size: 13px; - cursor: pointer; -} - -.add-frame-action-icon { - margin: 3px; - float: left; -} - -.add-frame-action .label { - overflow: hidden; - text-align: left; -} - -.add-frame-action:hover { - border-color: gold; -} - -.preview-tile { - position: relative; - border: #444 3px solid; - border-radius: 3px; - margin: 5px 0; - width: 96px; - height: 96px; -} - -.preview-tile:first-child { - margin-top: 0; -} - -.preview-tile:hover { - border: #999 3px solid; -} - -.tile-view { - position : relative; -} - -.preview-tile .tile-overlay { - z-index: 10; - position: absolute; - background-color: rgba(100, 100, 100, 0.6); - opacity: 0; - height: 30px; - width: 30px; - border: none; -} - -.preview-tile:hover .tile-overlay { - opacity: 1.0; -} - -.preview-tile .tile-overlay.tile-count { - display: block; - opacity: 1.0; - border-bottom-right-radius: 3px; - top: 0; - left: 0; - font-size: 14px; - line-height: 30px; - color: white; - font-weight: bold; - text-align: center; - cursor: default; -} - -.preview-tile .tile-overlay.delete-frame-action { - top: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.duplicate-frame-action { - bottom: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.dnd-action { - bottom: 0; - left: 0; - border-top-right-radius: 3px; - cursor: move; -} - -.preview-tile.selected { - border-color: gold; -} - -.preview-tile.selected:after { - content: ""; - position: absolute; - top: 38px; - right: -9px; - border: transparent 4px solid; - border-left-color: gold; - border-width: 6px 0 6px 6px; - border-style: solid; -} - - -/** - * Drag n drop styles. - */ - -.preview-tile-drop-proxy { - border: 3px dashed gold; - background-color: rgba(255, 215,0, 0.2); -} - -.minimap-crop-frame { - position: absolute; - border: 2px solid gold; - z-index: 100; - box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; -} \ No newline at end of file diff --git a/clear_before_scale/img/icons.png b/clear_before_scale/img/icons.png deleted file mode 100644 index c6e3bef2ed319ae53eee8f83d098f8a2eaf4938e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11499 zcma)ic|4Tg`!`v$8-uY6V-J&UvL^eI-I$PNCS^C%f+BtFW(=}RqAX?4$WE3qOHrbb zEX7R9N5T}Dke>1RE#Kew_x$lZ|I9tFbME_nz0Y;dx!%`(og3roY|GCh$-~0J!f$V9 z<<7#w%Fg`1&&|pF#r3USVPR23+FMz8#<8vsAMc;ON`M~j?k-eE@8`w83-(;pqH%|?xm5U#rwE^{EEsFC;i_e-|v;kWd)(SroO)2cX^{0Q}_u=J@ z1>fC@_}4wV3ke@KRdbLQLhR;tyvYxitlVl0Na%GgHD*hAExUzKQxSmOq7~*K#6Ij3 zY9TZgPv0#xG{sgu3qAp6xa@N$^INKX%%U;$y$bW=&$Ws>6I{#FQzqa+;aQV$))HmlcM8GAmo-n~K9>`tB-Jk(8R7hHlpTW`?b|wu?&S>dD zG3&_>Gm6cZjHt@%8gAG@n&|;sHvV{wjqUbX?S!-}onzrs+1$TTqMhzDFnH!PkFTb% zJuy=Wfw60~zzjY{yscK9Gsad?s8BPW+&%woQ?EjpX*24yvjxvbYSaO%Ts_=(o9MQh zeh+2hOmgb@D&Ea{-!p=BCQ#U)2z44NNglNdv(;p{+)vQXp}nhOqUF%4sheuyH-X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H z+jr>j-_eH}BG`pcK<)Q*cU)hJ+c4I7zbdaN&11J zy#J0?zD?7Je^LpU^q!3>?#n`DWX*w*gq=>uIU;ZhwN7=>jWagSBmlH8MPRz3weJ0I zm{%sYT?v3Fk-xkET`{jBcNh7mO-T+0 zt9JSiRH%h-;n(WtDi00f?S3shaI0%Ru$vXV6XV*?T0CeW%^IKsXZfYKLEftBa{gZ18SlW_I08|GmYOM UGM@l{+rV`ha>cU#C-2n%0?Ip#YybcN diff --git a/clear_before_scale/index.html b/clear_before_scale/index.html deleted file mode 100644 index ae364737..00000000 --- a/clear_before_scale/index.html +++ /dev/null @@ -1,1136 +0,0 @@ - - - - - - Piskel - - - - - -
- Loading Piskel ... -
- - -
- - - - - -
-
-
-
-
-
-
-
-
-
-
    - -
-
-
- -
-
- -
-
-
-
-
- - - - - -
- - -
-
-
-
-
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    1x
    -
    -
    Full
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -

    Layers -
    -

    -
    - - - - - - - - - - - - -
    - -
      - - -
      - -
      -

      Transform

      -
        -
        -
        -

        Palettes

        -
        - - - -
        -
        - - - - -
        - - - -
        -
        -
        - -
        -
        -
        -
        -
        - -
        -
        - -
        -
        - -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        -
        - -
        - - - - - - - - - - -
        -
        - -
        - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clear_before_scale/js/piskel-packaged-2017-05-05-12-13.js b/clear_before_scale/js/piskel-packaged-2017-05-05-12-13.js deleted file mode 100644 index 12c41b4b..00000000 --- a/clear_before_scale/js/piskel-packaged-2017-05-05-12-13.js +++ /dev/null @@ -1,31616 +0,0 @@ -/*! - * jQuery JavaScript Library v1.8.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: Thu Aug 09 2012 16:24:48 GMT-0400 (Eastern Daylight Time) - */ -(function( window, undefined ) { -var - // A central reference to the root jQuery(document) - rootjQuery, - - // The deferred used on DOM ready - readyList, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - navigator = window.navigator, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // Save a reference to some core methods - core_push = Array.prototype.push, - core_slice = Array.prototype.slice, - core_indexOf = Array.prototype.indexOf, - core_toString = Object.prototype.toString, - core_hasOwn = Object.prototype.hasOwnProperty, - core_trim = String.prototype.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, - - // Used for detecting and trimming whitespace - core_rnotwhite = /\S/, - core_rspace = /\s+/, - - // IE doesn't match non-breaking spaces with \s - rtrim = core_rnotwhite.test("\xA0") ? (/^[\s\xA0]+|[\s\xA0]+$/g) : /^\s+|\s+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
        a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
        t
        "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
        "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
        "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

        "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
        ", "
        " ], - thead: [ 1, "", "
        " ], - tr: [ 2, "", "
        " ], - td: [ 3, "", "
        " ], - col: [ 2, "", "
        " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
        ", "
        " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
        " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
        ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
        - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
        ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
        ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
        ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
        ", - "
        ", - "
        ", - "
        " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
        "; - } - } - - return [ - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - gradientFix, - "
        ", - "
        ", - "
        ", - "
        ", - "
        ", - "", - "
        ", - "
        ", - "
        ", - "", - "", - "
        ", - "
        ", - "
        " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
        " + html.join('') + "
        "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
        -
        -
        -
        -
          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          1x
          -
          -
          Full
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - -
          -
          -
          -
          -
          -

          Layers -
          -

          -
          - - - - - - - - - - - - -
          - -
            - - -
            - -
            -

            Transform

            -
              -
              -
              -

              Palettes

              -
              - - - -
              -
              - - - - -
              - - - -
              -
              -
              - -
              -
              -
              -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              -
              -
              -
              -
              -
              - - -
              -
              -
              -
              - -
              - - - - - - - - - - -
              -
              - -
              - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file diff --git a/clear_before_scale_v2/css/fonts/icomoon.eot b/clear_before_scale_v2/css/fonts/icomoon.eot deleted file mode 100644 index f5314adf7b63f3e372c57b1dc2c12280cfbba943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4416 zcmb7IU2Ggz6+UNX?%es?pIPthdi|H#tnGDNaBZ*G+Y;KY8Z|$vqeRd^6;#zGO_Nk{ zylR4!B2=v?Dnjam)z>0q@qk1nO2i8i;$ffQg-R8D=^M+B`h*}4sRRPneD}`U-d#cj zcV}nLJ@?%6ch5cd%rrxy?`Mga3>t1syR0x97l-kRHfirpow__aMwF%-bcJ?k8~+`; z1%fnviLTN$`Uc&kEqWc80(}LT*XcHB6-`Vlv_#9Ac62t7N}x||GHLn3mmgnsj{o!5 z!2A;b%`4kmt%*y&xelT!^f#_;-EQHjECP<4Yd7C`b@s3J9Qwcqo$FV(Ug019^zYD0 ziCe!8g!u=ffxe=jy}o_t?p%{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I6Gp$wbI`R_Y7OhvNQ6Ga2Q`~kGEAa4 z3GgscyapkIWWW3q~@xzY;cw5P&^m; zUO4T0DHIa66}Ms>xj2t|t$3FgTD?#Bba$#d#od(WPlu{l@&$-28|1y+-B{E7LXl{H z@c!?4pMOU$Ag-T4_1nM=nRtEvag=_lCPZIWaYG)Q*K4RwJ@kue1mkw$7|-b18vTYE z!FT}+{Io8x`5*7Sr%OBQoavz!G0;T;JeVrKHP{dpPG92<;)j9 zBVQ+7`smrl4-`Im_PvjHL`sHLoRE6gLIQ3Q8qmNDHROS#rUuniqe&b3dC)(4#=tlK z%b3C+j3shByt~cNv&J{gMf0Zlf!Q&CYd)~PZM|>(%KDq|#FV%$ekShQn-HL86!^Qy z;i@SSqb*Gz^z~ - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/clear_before_scale_v2/css/fonts/icomoon.ttf b/clear_before_scale_v2/css/fonts/icomoon.ttf deleted file mode 100644 index 5ae72b63d94aa0e3ec7d7054ec589def6ca9f394..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4252 zcmb7HO^hQ)6@IU~tE>O~)3)0l&u@D@GoGEmWM(`bCoD;!$b!$txD9=@vf%y>*# zLAhQ1>eZ|7y?Ryk>NPPD`P3nkRxf_}(RJssPm5;UE6=??mZU^lx4V!~BEML|e(vU*EZNccI0f zNBeEGU%0t@WqawJ`S;NN6WS{~+jrYE%ikx;6wr=uZSP$DYWYWhL3;x_o^9{mz5_c^ zvfozyWE#YKB+z%BUj^sP@ck*3>AOm9q%h1rURp$-gxuf9kNZFa%!q($6B+m`jRn-I zw?Gy>hPOu!`kTG)lq)cJpzq@<{K)dFb8m zLurp}$`LIztBq<@Ey{is;;6$8A?NtOM-A@ClHox8WvbhDqze34s+ac7%rDRJte3V!h^>}`g5k` zr)}F;o|74w%G$OkMZv}52^SgwX<2F|ipmnpbTEA>0%>DVVB2XY6-t?Q1n87Zmz^|= zwBzPnw;*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Q z|67KU>}>Nzj5dK6VIGYRYucKs(PPu|I5z2soUYL{(R5_ENoQx~>9G_MX_6ymXAnV; zy#D0TJC{EG=F){HpIpEG=*hAeTWAdqwid>E-3Qx^vLN}^|ZkZ95vXZnGUYVBnVm{kKrx&41Onz1lO3zhD=NCDl_4fYOMPdHIHw?Rkbzqt#@M-ZOiW%#-#!ooO}X)Yz~{tE5JH`ZURv`}N!NWM*v7KtPI#NcOv> z!l;#uGtwk`$R?X@l-i|KHj-kM$STof*S^#wDdv9htu|?{)ox`G=W%1GnYC7Xh~#

              1`bt&V6alM zoycW^dZoso7l)oj5lOOU1{zm{6x8CD<7qn#6=V4v=Zs6+RZ44LszMYwb{qy4my)9v z=Q4~FSNfjAxy30Dj20T?oD)jX17(C!CY39NQ%XW3wot%1rBaD5hL96^I;cx27Z$E< z5ZQ6!Sj;$~wobJ_G*mg54s$UbKMoG2Lr6Sk=b>N-7y}ZK-qzISju%&@|-jd6;~1yb{vDj&Pk(C zEcB%)F-0M)JjF1L5D!Vp5#+tuRiVEF?cRij3xizT`LNHa$qf$^n<*(jP_SQ_7>?s-XEkg^abp03po7Yc{# zHN7XxwzFByWTaWCG)IzbY0W2dPx%GMDfp^4lKZ9c6QiRi#!J0%8O^4yo1z0-+m?mh zp2Tc7%XM90tQzYA8Oulq_FFa9&Dq~Q@BjSm^p9@`C!c|v*9YJI^xlw}&d2UakC$I| z3w8C(eFeZ54U7HW&0z$1apptbn@NMDr(klo0&#FXYH*8gnadLak~}asD7IZl#^s%c zFScWDa?5#6N)#x>og9e4pt7`#onjS^!sr*oS*o!iXm z+-6SaHgj5_?(wc}ZnM9*`S&8I4|8p0V|`=e=7E~3znawNXx-8rO`(ETh@*g{y`?~-D diff --git a/clear_before_scale_v2/css/fonts/piskel.svg b/clear_before_scale_v2/css/fonts/piskel.svg deleted file mode 100644 index e7d9704a..00000000 --- a/clear_before_scale_v2/css/fonts/piskel.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - \ No newline at end of file diff --git a/clear_before_scale_v2/css/fonts/piskel.ttf b/clear_before_scale_v2/css/fonts/piskel.ttf deleted file mode 100644 index a6836b3585712666a034e53dd39253e7d4e39cad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2424 zcma)7&1+m$6hHUl-Fx5HeQ(~!Or|rLOp`Rxq)aktlCiXek_sizV6CL;MmtT@rnYH9 z8=*xgUAVBg@ek0A-Kn^8A>yXsQqYwPK?n#%#Epxtti*HQoph3d;+;G9eB5(>=bU%n zI~NE5_;4Q>OuzEl)QlQ_`Za34#s9_CjqcW=mG9pKAa#__UhUrALK>sIj#OQ}areqZ zTKx=V)C<18*1gPz=l=qb+qgf!jtVi!+bDm5^62`;_8s>DOriWE%JmzYt6lmr`vB!X zP>wgcceWrTAENve<>t-q#@fpRU;TukFg`iHwRw9R^Tgr4VfKMhARmE)duPcN)ST(j zCs2j=jorRMFztim6u@Ijc6RYcb`T9=_8Ax%fa2do%y2ck8E|+BsRs)8Fg!FL)7`&! zcToq(L&1~XUk~w~N3nqm0fJUhfns%t-8o)_?8p6Y9cHq-!8(k zW)_gP=!l$Y&^*(0WVl7=W*6wO94+$9TFlL&1wHcmqlfQY`sBMy7ao0j{rba4D`IT1 zJvi829NVJ{uTlBIQhE`@>RU+$ts*X_3BVi_MK!I+a|GXXQGP zb)v~Le5pxRwsG;Pwy5>$w2O>w-k55E*6s`uTj!p)bsZw6C^9>5&2gQ>NtWw0CPRcV zN*y7X&~f4=wvX7@N}T)MteT8C1VlEibub*&9Ge;p>Vt!!P|7529xh{?3g4AT8Hr~wlQ0fL*G)<# z6(!nNO!>a!1ir^b;QO2lgrxW!IUa%%I*OzWb?oY_6uBbQkyNn`cuYi;=Dy>59#=Z> z9PVNaCyXNHM%rUJ*GVPt@-$XlNi5j&j14Ycp2TADK#3Ad6vDA3#(9#3Nft$c(vcSC zMfzVQDtui`iBq8yr@2>DqypDgPB&0_9(eunK&^zdSaroM^_Lw_x&6LxY~6bT>2XGx;eh@3xjIV1qzPQ4(vxY=%)Ag z`u(53o&Ndl=;Rad%{2q?!!Pd*^=Yru0Xyf`hftJyS` z^b}0l2&nMzJQ{F|Zkx*!Wl0{G8x+SglR~nKhA(?D2xwHgLAg=FNjjIFF83;a#`^T?9DbfJLt%v;pqIHqy(`giCN2 S*QEk@xfi^s%09t=S^oiTj_VWv diff --git a/clear_before_scale_v2/css/fonts/piskel.woff b/clear_before_scale_v2/css/fonts/piskel.woff deleted file mode 100644 index 895352254dcb47cb469ef36bc5921da6f511db1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1848 zcmZ`(ZERCj7=CX*w#&o~a7Dh$fWaG!e7EMURA&WY~#}b4fWgBBi*REYZ*Vb<9 z_qq3W{a#xr)vX;vP`*qc5VIfrbH)UT(S#{R!w>iYKO}7|X1?d%E{;Ucz3+3L_v1Y0 zo;SJ2+|kz7v44LDK=pR00UT9NDE`-Yr>(64<9`CkuTX1EZv3@l-_~saigOr0N{wCr z?0T0*tpiZ9=)X^G&4Jm2y=nuE?MI)+sVzIvqwdDoVdTx!%Lp?Y`GuM(|#5A>@wJs7(Oz_d`?x$4@FI;~+4&$bF{8bp(0 z1{4Zl7>4cZ(rUEYeqdx6Yb~vlmDb8js}!%+!0LVTge=TUtH~#S&6Ng~ub{$69Yx=A zic1jW(<^{Qt-9qetz6sidPTA_85@mF#%+zpcbgkUXrc`JC1V1hglf920;;j^FM?h+ zB473_Rx7>bSZ!&pbfYw=Di3kxJLNdRQM^`;6;q^WCB+|#F&Zh~Ek?^0j`g&t9+SCN zvWaYLY2AcV%RTahJf6Gvn6TtMRXgeIB<-YqrgN6el9?HV+0L1E!q$FU{H^q%N~;gV zhJ54{XFOj}5>L>>d5B9G3A@9i5ns%AdNk+En{FKon`6Dv!_JfDey7=H?HN7p?)B?& z1HH09zT&S&uSTzoPvrB3$y@fHSVENU^X40GUp$$z#T{Xf;0p!#fDjN!B$(loLX?m4 z0wJs=qtqQ#5n>r59@0lV2}9D5HhgaSy4&xGm;^Ux4LAc1uhl&~JTzi6yG$;t-zILF zBNJo!_+)%Cllm;4PE7D;_%mafPbV#x4N1+UC1cADpB>J5b0o?7hE(>TlCuZE z;$+yIv0S!Zw9Pms#S`dAFW(jIigu41@&g6^t+d#-$oaE3e!h4ibvm93hlNmx=Xn8J z72z_0q(2&nVhahI%_uJ)R>ho3;vn=;j*uAfV!pJfbx8eraMj-$V;GCzgY;6{J(V3sZRDBl6_K*rpk$A`Hu-UQ5| zk_M5>5b<_^dPJJ7$A5D>&NX;j$?##I;el-a@A-L*0df#IGynSv8Bu^YdM-icD0t_S+9c(3lJb%=| .settings-title { - /* Override the default 10px margin bottom for this panel */ - margin-bottom: 15px; -} - -.settings-section-application .button-primary { - margin-top: 10px; -} - -/*******************************/ -/* Gif/Png Export Setting panel*/ -/*******************************/ -.gif-download-button, -.gif-render-button { - margin-top : 10px; - margin-right : 10px; -} - -.gif-export-preview, -.png-export-preview { - position:relative; - margin-top:10px; - max-height:32px; -} - -.gif-export-preview { - max-width:32px; -} - -.png-export-preview img { - max-height:32px; - float: left; -} - -.png-export-preview .light-picker-background { - max-width:240px; -} - -.gif-upload-status { - width: 180px; - margin-left: 5px; - margin-top: 10px; -} - -.gif-upload, -.png-export-preview { - overflow: hidden; -} - -.gif-upload-status, -.gif-export-preview { - float : left; -} - -.preview-upload-ongoing:before{ - content: "Upload ongoing ..."; - position: absolute; - display: block; - height: 100%; - width: 100%; - text-align: center; - padding-top: 45%; - box-sizing:border-box; - -moz-box-sizing:border-box; - background: rgba(0,0,0,0.5); - color: white; -} - -.export-scale { - margin-bottom: 10px; -} - -.export-scale .scale-input { - margin: 5px; - vertical-align: middle; - width: 150px; -} - -.export-scale .scale-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.export-resize { - margin: 10px 0; - overflow: hidden; -} - -.export-resize > * { - float: left; -} - -.export-resize > *:not(:last-child) { - margin-right: 10px; -} - -.export-resize > .resize-field { - width: 70px; -} - -.export-resize > .resize-label { - height: 23px; - line-height: 23px; -} - -.export-tabs { - overflow: hidden; - position: relative; -} - -.export-tabs:after { - content: ""; - display: block; - position: absolute; - bottom: 0; - width: 100%; - height: 1px; - z-index: 0; - background-color: gold; -} - -.export-tab { - float: left; - cursor: pointer; - padding: 5px; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; - /* Make sure the tab and its border are positioned above the :after element; */ - position: relative; - z-index: 1; -} - -.export-tab.selected, -.export-tab:hover { - color: gold; -} - -.export-tab.selected { - border-color: gold; - border-bottom-color: #444; - border-style: solid; - border-width: 1px; -} - -.export-panel-header { - padding: 10px 5px 0px; -} - -.export-info { - font-style: italic; - text-shadow: none; - font-weight: normal; -} - -.export-panel-section { - padding: 5px; - margin-top: 10px; - border: 1px solid #5d5d5d; - border-radius: 2px; -} - -.export-panel-row { - display: flex; - align-items: center; - overflow: hidden; -} - -.export-panel-gif .button { - margin-right: 5px; - width: 75px; - flex-shrink: 0; -} - -.export-panel-png .textfield { - width: 50px; -} - -.png-export-dimension-info, -.png-export-datauri-info { - margin-left: 5px; -} - -#png-export-columns, -#png-export-rows { - /* Override default textfield padding-right to keep the number spinners - aligned to the right. */ - padding-right: 0; -} - -/************************************************************************************************/ -/* Import panel */ -/************************************************************************************************/ - -.import-section, -.resize-section { - margin: 10px 0; -} - -.file-input-button { - margin-right: 8px; - border-radius: 2px; -} - -.import-highlight { - font-weight: bold; - color: white; -} -.resize-section-title { - vertical-align: top; - display: inline-block; - padding-top: 5px; - width: 25%; -} - -/*****************/ -/* ANCHOR WIDGET */ -/*****************/ - -.resize-origin-container { - overflow: hidden; - position: relative; - width: 70px; - margin-top: 5px; - display: inline-block; -} - -.transition .resize-origin-option, -.transition .resize-origin-option:before { - transition: background-color 0.2s, border-color 0.2s; -} - -.resize-origin-option { - float: left; - position: relative; - - box-sizing: border-box; - margin: 0 1px 1px 0; - width: 20px; - height: 20px; - - background : #888; - - font-size: 8px; - text-align: center; - cursor: pointer; -} - -.disabled .resize-origin-option { - cursor: default; - background : #555; - border-color: #555 !important; -} - -.resize-origin-option:hover { - border : 3px solid white; -} - -.resize-origin-option.selected { - border : 3px solid gold; -} - -.resize-origin-option:before { - content: ''; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin: -2px; -} - -.resize-origin-option.selected:before { - content: ''; - width: 4px; - height: 4px; - background: gold; -} - -.disabled .resize-origin-option.selected:before { - background: #555; -} - -.disabled .resize-origin-option[data-neighbor]:before { - border-color: #555 !important; -} - -.resize-origin-option[data-neighbor]:before { - width: 0; - height: 0; - border-width: 4px; - border-style: solid; - border-color: transparent; -} - -.resize-origin-option[data-neighbor="bottom"]:before { - border-top-color: gold; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="left"]:before { - border-right-color: gold; - margin-top: -4px; - margin-left: -6px; -} - -.resize-origin-option[data-neighbor="top"]:before { - border-bottom-color: gold; - margin-top: -6px; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="right"]:before { - border-left-color: gold; - margin-top: -4px; -} -.save-field { - width: 100%; -} - -.save-status { - margin-top: 10px; - margin-bottom: -10px; - vertical-align: middle; - font-weight: normal; - text-shadow: none; - font-style: italic; -} - -.save-file-name { - white-space: nowrap; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-desktop-file-name { - word-wrap: break-word; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-status-warning-icon { - float: left; - margin-top: 5px; -} - -.save-status-warning-icon { - overflow: hidden; - padding-left: 10px; -} - -.tool-icon { - position : relative; - cursor : pointer; - width: 46px; - height: 46px; - margin: 1px; - background-color: #3a3a3a; -} - -.tool-icon.selected { - cursor: default; - background-color: #444; -} - -.tool-icon.selected:before { - content:""; - position : absolute; - height : 100%; - width : 100%; - border: 3px solid gold; - box-sizing: border-box; -} - -.tool-icon:hover { - background-color: #444; -} - -/* - * Tool cursors: - */ - -.tool-paint-bucket .drawing-canvas-container:hover, -.tool-colorswap .drawing-canvas-container:hover { - cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; -} - -.tool-vertical-mirror-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; -} - -.tool-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/pen.png) 1 14, pointer; -} - -.tool-dithering .drawing-canvas-container:hover { - cursor: url(../img/cursors/dither.png) 1 14, pointer; -} - -.tool-lighten .drawing-canvas-container:hover { - cursor: url(../img/cursors/lighten.png) 1 15, pointer; -} - -.tool-eraser .drawing-canvas-container:hover { - cursor: url(../img/cursors/eraser.png) 3 14, pointer; -} - -.tool-stroke .drawing-canvas-container:hover { - cursor: url(../img/cursors/stroke.png) 1 14, pointer; -} - -.tool-rectangle .drawing-canvas-container:hover { - cursor: url(../img/cursors/rectangle.png) 5 15, pointer; -} - -.tool-circle .drawing-canvas-container:hover { - cursor: url(../img/cursors/circle.png) 5 15, pointer; -} - -.tool-move .drawing-canvas-container:hover { - cursor: url(../img/cursors/hand.png) 7 7, pointer; -} - -.tool-rectangle-select .drawing-canvas-container:hover, -.tool-lasso-select .drawing-canvas-container:hover { - cursor: crosshair; -} - -.tool-shape-select .drawing-canvas-container:hover { - cursor: url(../img/cursors/wand.png) 10 5, pointer; -} - -.tool-colorpicker .drawing-canvas-container:hover { - cursor: url(../img/cursors/dropper.png) 2 15, pointer; -} - -.swap-colors-button { - position: relative; - top: 50px; - left: 6px; - height: 18px; - width: 18px; - - opacity : 0.3; - - cursor : pointer; -} - -.swap-colors-button:hover { - opacity : 1; -} - -.tool-color-picker { - position:relative; -} - -.tool-color-picker:nth-child(1) { - z-index : 100; -} - -.tool-color-picker:nth-child(2) { - z-index : 90; - margin-top: 25px; - margin-left:-20px; -} - -.tool-color-picker input { - width: 16px; - height: 16px; - text-indent: -10000px; - border: 1px solid black; - background: white; - cursor: pointer; - position : relative; - top: 10px; - margin-left: 2px; -} - -.tool-color-picker .secondary-color-picker { - top : 18px; - margin-left: 0; -} - -.palette-wrapper { - margin-top: 10px; - margin-left: 10px; -} - -.palette-color[data-color=TRANSPARENT] { - position: relative; - top: 10px; - left: 10px; - background-color: white; - height : 16px; - width : 16px; - border: 2px solid #000; - background-size: 16px 16px; - background-position: 0 0; - background-image: -webkit-gradient( - linear, - left top, - right bottom, - color-stop(0, #fff), - color-stop(0.45, #fff), - color-stop(0.5, #ff0000), - color-stop(0.55, #fff), - color-stop(1, #fff) - ); - background-image: -moz-linear-gradient( - left top, - #fff 0%, - #fff 45%, - #f00 50%, - #fff 55%, - #fff 100% - ); -} - - -.pen-size-container { - overflow: hidden; - padding: 5px 5px; -} - -.pen-size-option { - float: left; - box-sizing: border-box; - width: 20px; - height: 20px; - margin-right: 2px; - border-style: solid; - border-width: 2px; - border-color: #444; - cursor: pointer; -} - -.pen-size-option[data-size='1'] { - padding: 5px; -} -.pen-size-option[data-size='2'] { - padding: 4px; -} -.pen-size-option[data-size='3'] { - padding: 3px; -} -.pen-size-option[data-size='4'] { - padding: 2px; -} - -.pen-size-option:before { - content: ''; - width: 100%; - height: 100%; - background-color: white; - display: block; - text-align: center; - line-height: 12px; - font-size: 90%; -} - -.pen-size-option:hover { - border-color: #888; -} - -.pen-size-option.selected:before { - background-color: gold; -} - -.pen-size-option.selected { - border-color: gold; -} - -.pen-size-option.labeled:before { - content: attr(real-pen-size); - color: black; -} - -/* -Icon classes can be used entirely standalone. They are named after their original file names. - -Example usage in HTML: - -`display: block` sprite: -

              - -To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: - -// CSS -.icon { - display: inline-block; -} - -// HTML - -*/ -.icon-common-keyboard-gold { - background-image: url(../img/icons.png); - background-position: 0px -230px; - width: 36px; - height: 21px; -} -.icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons.png); - background-position: -230px -107px; - width: 18px; - height: 18px; -} -.icon-common-warning-red { - background-image: url(../img/icons.png); - background-position: -230px -86px; - width: 21px; - height: 21px; -} -.icon-frame-dragndrop-white { - background-image: url(../img/icons.png); - background-position: -230px -30px; - width: 30px; - height: 30px; -} -.icon-frame-duplicate-white { - background-image: url(../img/icons.png); - background-position: -230px 0px; - width: 30px; - height: 30px; -} -.icon-frame-plus-white { - background-image: url(../img/icons.png); - background-position: -230px -60px; - width: 26px; - height: 26px; -} -.icon-frame-recyclebin-white { - background-image: url(../img/icons.png); - background-position: -184px -184px; - width: 30px; - height: 30px; -} -.icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons.png); - background-position: -230px -143px; - width: 18px; - height: 18px; -} -.icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons.png); - background-position: -230px -125px; - width: 18px; - height: 18px; -} -.icon-settings-export-white { - background-image: url(../img/icons.png); - background-position: -138px 0px; - width: 46px; - height: 46px; -} -.icon-settings-gear-white { - background-image: url(../img/icons.png); - background-position: -138px -46px; - width: 46px; - height: 46px; -} -.icon-settings-open-folder-white { - background-image: url(../img/icons.png); - background-position: -138px -92px; - width: 46px; - height: 46px; -} -.icon-settings-resize-white { - background-image: url(../img/icons.png); - background-position: 0px -138px; - width: 46px; - height: 46px; -} -.icon-settings-save-white { - background-image: url(../img/icons.png); - background-position: -46px -138px; - width: 46px; - height: 46px; -} -.icon-tool-circle { - background-image: url(../img/icons.png); - background-position: -92px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorpicker { - background-image: url(../img/icons.png); - background-position: -138px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorswap { - background-image: url(../img/icons.png); - background-position: 0px 0px; - width: 46px; - height: 46px; -} -.icon-tool-dithering { - background-image: url(../img/icons.png); - background-position: -184px -46px; - width: 46px; - height: 46px; -} -.icon-tool-eraser { - background-image: url(../img/icons.png); - background-position: -184px -92px; - width: 46px; - height: 46px; -} -.icon-tool-lasso-select { - background-image: url(../img/icons.png); - background-position: -184px -138px; - width: 46px; - height: 46px; -} -.icon-tool-lighten { - background-image: url(../img/icons.png); - background-position: 0px -184px; - width: 46px; - height: 46px; -} -.icon-tool-move { - background-image: url(../img/icons.png); - background-position: -46px -184px; - width: 46px; - height: 46px; -} -.icon-tool-paint-bucket { - background-image: url(../img/icons.png); - background-position: -92px -184px; - width: 46px; - height: 46px; -} -.icon-tool-pen { - background-image: url(../img/icons.png); - background-position: -138px -184px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle-select { - background-image: url(../img/icons.png); - background-position: -184px 0px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle { - background-image: url(../img/icons.png); - background-position: -92px -92px; - width: 46px; - height: 46px; -} -.icon-tool-shape-select { - background-image: url(../img/icons.png); - background-position: -46px -92px; - width: 46px; - height: 46px; -} -.icon-tool-stroke { - background-image: url(../img/icons.png); - background-position: 0px -92px; - width: 46px; - height: 46px; -} -.icon-tool-vertical-mirror-pen { - background-image: url(../img/icons.png); - background-position: -92px -46px; - width: 46px; - height: 46px; -} -.icon-tool-center { - background-image: url(../img/icons.png); - background-position: -92px 0px; - width: 46px; - height: 46px; -} -.icon-tool-clone { - background-image: url(../img/icons.png); - background-position: -46px -46px; - width: 46px; - height: 46px; -} -.icon-tool-flip { - background-image: url(../img/icons.png); - background-position: 0px -46px; - width: 46px; - height: 46px; -} -.icon-tool-rotate { - background-image: url(../img/icons.png); - background-position: -46px 0px; - width: 46px; - height: 46px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - .icon-common-keyboard-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-warning-red { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-dragndrop-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-duplicate-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-plus-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-recyclebin-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-export-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-gear-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-open-folder-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-resize-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-save-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-circle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorpicker { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorswap { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-dithering { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-eraser { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lasso-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lighten { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-move { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-paint-bucket { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-shape-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-stroke { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-vertical-mirror-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-center { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-clone { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-flip { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rotate { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } -} - -.color-picker-slider * { - box-sizing: border-box; -} - -.color-picker-slider input[type="range"] { - -webkit-appearance: none; - -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - width: 100%; - border: none; - padding: 1px 2px; - border-radius: 3px; - background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); - box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; - outline: none; /* no focus outline */ -} - -/* thumb */ - -.color-picker-slider input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - cursor:pointer; - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ - background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} -.color-picker-slider input[type="range"]::-moz-range-thumb { - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -.color-picker-slider input[type="range"]::-ms-thumb { - width: 7px; - height: 18px; - border-radius: 2px; - border: 0; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -/*CROSS BROWSER RESET*/ - - -.color-picker-slider input[type="range"]::-moz-range-track { - border: inherit; - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-track { - border: inherit; - color: transparent; /* don't drawn vertical reference line */ - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-fill-lower, -.color-picker-slider input[type="range"]::-ms-fill-upper { - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-tooltip { - display: none; -} - -.color-picker-slider, -.color-picker-input { - padding: 0 10px; - height : 25px; - overflow: hidden; -} - -.color-picker-slider span{ - line-height : 25px; - width : 10px; - float:left; -} - -.color-picker-slider input[type="range"]{ - float:left; - height : 10px; - width : 100px; - margin: 7px 1px 7px 8px; -} - -.color-picker-slider input[type="text"]{ - float:left; - width : 47px; - margin-left: 5px; -} - -.color-picker-input { - margin-bottom: 10px; -} - -.color-picker-input .textfield{ - width:100%; -} - -.color-picker-slider input[type="range"][data-dimension="h"] { - background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} -#dialog-container-wrapper { - position: absolute; - z-index: 20000; - - top: 0; - right: 0; - bottom: 0; - left: 0; - - padding: 50px 150px; - overflow: hidden; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - background-color: rgba(0,0,0,0.8); - opacity: 0; - pointer-events: none; - - color: white; -} - -#dialog-container-wrapper.animated { - transition: opacity 0.2s; -} - -#dialog-container-wrapper.show { - opacity: 1; - pointer-events: auto; -} - -#dialog-container { - width: 100%; - height: 100%; - - margin-top: -1500px; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - border-radius: 3px; - border : 3px solid gold; - background: #444; - overflow: auto; -} - -.show #dialog-container { - margin-top: 0; -} - -#dialog-container.browse-local { - width: 700px; - height: 500px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -350px; -} - -.show #dialog-container.browse-local { - margin-top: -250px; -} - -.dialog-wrapper { - height: 100%; - position : relative; -} - -.dialog-content { - position: absolute; - top: 45px; - bottom: 0; - width: 100%; - box-sizing: border-box; -} - -.dialog-head { - width: 100%; - background: gold; - margin: 0; - padding: 10px; - color: black; - font-size: 1.8em; - height: 45px; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -.dialog-close { - position: absolute; - top: 0; - right: 0; - line-height: 45px; - margin-right: 10px; - font-size: 1.3em; - cursor: pointer; -} - -/************************************************************************************************/ -/* Browse local piskels panel */ -/************************************************************************************************/ - -.local-piskel-list { - width: 100%; -} - -.local-piskel-item { - height: 3em; -} - -.local-piskel-name { - width: 40%; -} - -.local-piskel-save-date { - font-weight : normal; -} - -.local-piskel-list a { - text-decoration: none; -} - -.local-piskel-list a:hover { - text-decoration: underline; -} - -.local-piskel-list-head { - font-weight: bold; - color: gold; -} - -.local-piskel-load-button, -.local-piskel-delete-button { - width : 75px; -} -.cheatsheet-link { - position: fixed; - bottom: 10px; - left: 10px; - - color : gold; - font-weight: bold; - font-size : 1.25em; - line-height: 20px; - - cursor: pointer; - - opacity: 0.5; - z-index: 11000; - transition : opacity 0.3s; -} - -.cheatsheet-link:hover { - opacity: 1; -} - -.cheatsheet-container { - box-sizing: border-box; - display: block; - - bottom: 46px; - padding: 20px 3%; - border-radius: 3px; - background-color: rgba(0,0,0,0.9); - overflow: auto; -} - -.cheatsheet-container .cheatsheet-title { - font-size:24px; - margin-top: 30px; -} - -.cheatsheet-container .cheatsheet-title:nth-of-type(1) { - margin-top: 0; -} - -.cheatsheet-section { - box-sizing: border-box; - float: left; - - vertical-align: top; - padding : 0 20px 20px 20px; - min-width: 300px; -} - -.cheatsheet-boxes { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - float: left; -} - -@media (min-width: 1300px) { - .cheatsheet-container > div { - width: 33%; - } - .cheatsheet-boxes { - flex-direction: column; - } -} - -.cheatsheet-shortcut { - overflow: hidden; - margin: 10px 0; -} - -.cheatsheet-icon.tool-icon { - float: left; - - height: 30px; - width: 30px; - margin: 0 10px 0 0; - background-size: 30px 30px; -} - -.cheatsheet-description { - color: white; - font-size : 14px; - margin-left: 10px; - line-height : 30px; -} - -.cheatsheet-key { - box-sizing: border-box; - display : inline-block; - height: 30px; - line-height: 26px; - padding: 0 10px; - - border : 2px solid white; - border-radius: 2px; - - text-align: center; - font-family: monospace; - font-weight: bold; - font-size : 18px; - color: white; -} - -.cheatsheet-shorcut-conflict .cheatsheet-key { - border-color: red; - color: red; -} - -.cheatsheet-shortcut-editable { - cursor : pointer; -} - -.cheatsheet-shortcut-editable .cheatsheet-key { - border-color: gold; - color: gold; -} - -.cheatsheet-shortcut-editing .cheatsheet-key { - animation: fade .5s infinite; -} - -.cheatsheet-shortcut-undefined .cheatsheet-key { - border-color: red; - color: red; -} - -/*Cheatsheet actions*/ - -.cheatsheet-actions { - position: absolute; - box-sizing: border-box; - - bottom : 0; - left : 0; - right : 0; - height : 46px; - - padding : 10px; - overflow: hidden; - - background-color : gold; -} - -.cheatsheet-helptext { - font-size: 14px; - height : 26px; - line-height : 26px; - color: black; -} - -.cheatsheet-helptext-tooltip { - text-align: left; -} - -.cheatsheet-helptext-tooltip-item { - line-height: 0.9em; - margin: 10px 0; -} - -.cheatsheet-button { - position: absolute; - bottom: 10px; - right: 10px; -} - - -.cheatsheet-icon-tool-circle { - background-image: url(../img/icons/tools/tool-circle.png); -} - -.cheatsheet-icon-tool-colorpicker { - background-image: url(../img/icons/tools/tool-colorpicker.png); -} - -.cheatsheet-icon-tool-colorswap { - background-image: url(../img/icons/tools/tool-colorswap.png); -} - -.cheatsheet-icon-tool-dithering { - background-image: url(../img/icons/tools/tool-dithering.png); -} - -.cheatsheet-icon-tool-eraser { - background-image: url(../img/icons/tools/tool-eraser.png); -} - -.cheatsheet-icon-tool-lasso-select { - background-image: url(../img/icons/tools/tool-lasso-select.png); -} - -.cheatsheet-icon-tool-lighten { - background-image: url(../img/icons/tools/tool-lighten.png); -} - -.cheatsheet-icon-tool-move { - background-image: url(../img/icons/tools/tool-move.png); -} - -.cheatsheet-icon-tool-paint-bucket { - background-image: url(../img/icons/tools/tool-paint-bucket.png); -} - -.cheatsheet-icon-tool-pen { - background-image: url(../img/icons/tools/tool-pen.png); -} - -.cheatsheet-icon-tool-rectangle-select { - background-image: url(../img/icons/tools/tool-rectangle-select.png); -} - -.cheatsheet-icon-tool-rectangle { - background-image: url(../img/icons/tools/tool-rectangle.png); -} - -.cheatsheet-icon-tool-shape-select { - background-image: url(../img/icons/tools/tool-shape-select.png); -} - -.cheatsheet-icon-tool-stroke { - background-image: url(../img/icons/tools/tool-stroke.png); -} - -.cheatsheet-icon-tool-vertical-mirror-pen { - background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); -} - -#dialog-container.create-palette { - width: 500px; - height: 600px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.create-palette { - margin-top: -300px; -} - -.create-palette-section { - position: absolute; - left: 10px; - top: 50px; -} - -.create-palette-import-section { - display : inline-block; -} - -.colors-container { - position: absolute; - - left: 10px; - right: 10px; - top: 85px; - - height: 460px; - - border: 1px solid black; - background: #333; -} - -.color-picker-container { - position:absolute; - left : 280px; - top:0; - bottom:0; - right:0; - background: #222; -} - -.create-palette-actions { - position: absolute; - box-sizing: border-box; - - width:100%; - height: 45px; - - left: 0; - right: 0; - bottom: 0; - - padding:10px; - text-align:right; -} - -.color-preview { - width: 170px; - height: 70px; - margin: 11px; -} - -.colors-list { - overflow: auto; - width: 280px; - box-sizing: border-box; - height: 100%; - padding-bottom: 10px; -} - -.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - position:relative; - float : left; - - width : 44px; - height : 44px; - margin : 10px 0 0 10px; - - box-sizing : border-box; - - cursor : pointer; -} - -@-moz-document url-prefix() { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - - -.create-palette-color { - border:1px solid #2c2c2c; - transition : border-color 0.2s; -} -.create-palette-color:hover { - border:1px solid gold; -} - -.colors-list-drop-proxy { - border:2px dotted #eee; -} - -.create-palette-new-color { - border:2px dotted gold; - - border-radius: 2px; - line-height: 40px; - text-align: center; - font-size: 20px; - color: gold; -} - -.create-palette-color.selected { - border:2px solid gold; -} - -.create-palette-remove-color { - position: absolute; - top: 0; - right: 0; - padding: 2px 4px 0 0; - opacity : 0.2; - - font-weight: bold; - color: rgb(255,255,255); - text-shadow : 0 0 1px rgb(0,0,0); - - transition : opacity 0.3s, color 0.1s; -} - -.light-color .create-palette-remove-color { - color: rgb(0,0,0); - text-shadow : 0 0 1px rgb(255,255,255); -} - -.selected .create-palette-remove-color { - top: -1px; - right: -1px; -} - -.create-palette-color:hover .create-palette-remove-color { - opacity: 0.6; -} - -.create-palette-color .create-palette-remove-color:hover { - opacity: 1; - color: rgb(240,80,80); - text-shadow : 0 0 1px rgb(0,0,0); -} - -/*SPECTRUM OVERRIDES*/ - -.create-palette .sp-container{ - background-color: transparent; - border: none; - box-shadow : none; - border-radius:0; - padding:5px; -} -/************************************************************************************************/ -/* Import dialog */ -/************************************************************************************************/ - -#dialog-container.import-image { - width: 550px; - height: 360px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.import-image { - margin-top: -150px; -} - -.import-subsection { - margin-left: 25px; -} - -.import-section:not(.import-subsection) > .dialog-section-title { - width: 50px; -} - -.import-section-preview-title { - position: absolute; - margin-left: 50%; - margin-top: -28px; -} - -.import-section-preview { - position: absolute; - display: inline-block; - border: 1px dashed #999; - border-radius: 3px; - margin-left: 50%; -} - -.import-section-preview img { - max-width: 220px; - max-height: 220px; - display: block; -} - -.import-section-preview.no-border { - border-color: transparent; -} - -.import-section-preview canvas { - position: absolute; - left: 0; - top: 0; -} - -.dialog-section-title { - display : inline-block; - width: 80px; -} - -.dialog-section-radio { - margin-top: 15px; - vertical-align: sub; -} - -.import-size-field:nth-of-type(2) { - margin-left: 5px; -} - -.import-image-file-name { - display: inline-block; - overflow: hidden; - - width: 200px; - vertical-align: middle; - - word-break : break-all; - white-space: nowrap; - text-overflow: ellipsis; - - font-style: italic; - font-weight: normal; - text-shadow: none; - color: gold; -} - -[name=smooth-resize-checkbox] { - margin : 0 8px; -} - -.dialog-import-body { - padding: 10px 20px; - font-size:1.3em -} - -.import-button { - font-size: 1em; - height: 28px; - padding: 0px 10px; - margin-top: 15px; -} -.performance-link { - display: none; - position: fixed; - bottom: 10px; - right: 10px; - z-index: 11000; - cursor: pointer; - opacity: 0; - transition : opacity 0.3s; -} - -.performance-link.visible { - display: block; - opacity: 0.66; - animation: glow 2s infinite; -} - -.performance-link.visible:hover { - opacity: 1; - animation: none; -} - -#dialog-container.performance-info { - width: 500px; - height: 525px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; - margin-top: -260px; - -} - -.dialog-performance-info-body { - font-size: 13px; - letter-spacing: 1px; - padding: 10px 20px; -} - -.dialog-performance-info-body ul { - border: 1px solid #666; - padding: 5px; - border-radius: 3px; -} - -.dialog-performance-info-body li { - list-style-type: initial; - margin: 0 20px; -} - -.dialog-performance-info-body sup { - color: gold; - cursor: pointer; -} - -.show #dialog-container.performance-info { - margin-top: -300px; -} - -.dialog-performance-info-body .warning-icon { - float: left; - margin-top: 10px; -} - -.dialog-performance-info-body .warning-icon-info { - overflow: hidden; - margin-left: 30px; -} - -/************************************************************************************************/ -/* Unsupported browser dialog */ -/************************************************************************************************/ - -#dialog-container.unsupported-browser { - width: 600px; - height: 260px; - top : 50%; - left : 50%; - position : absolute; - margin-top: -130px; - margin-left: -300px; -} - -.unsupported-browser .dialog-content { - font-size:1.2em; - letter-spacing: 1px; - padding:10px 20px; - overflow: auto; -} - -.unsupported-browser .supported-browser-list { - padding: 5px 20px; -} - -.unsupported-browser .supported-browser-list li { - list-style-type: square; -} - -#current-user-agent { - color: gold; -} - -.user-message { - position: absolute; - right: 0; - bottom: 0; - padding: 10px 47px; - max-width: 300px; - - border-top-left-radius: 7px; - border: #e1a325 2px solid; - border-right: 0; - border-bottom: 0; - - color: #222; - background-color: gold; - - font-weight: bold; - font-size: 13px; - - z-index: 30000; -} - -.user-message .close { - position: absolute; - top: 6px; - right: 17px; - - font-size: 18px; - font-weight: bold; - - cursor: pointer; -} - -.user-message .close:hover { - color: black; -} - -.progress-bar-container { - position: absolute; - left: 0; - bottom: 0; - padding: 10px; - width: 360px; - border-top-right-radius: 2px; - border: gold 2px solid; - border-left: 0; - border-bottom: 0; - background-color: #444; - font-size: 14px; - z-index: 30000; - color: #eee; -} - -.progress-bar-item { - float: left; - height:20px; -} - -.progress-bar-status { - line-height: 20px; - width : 40px; - overflow : hidden; - margin: 0 0 0 10px; -} - -.progress-bar { - border : 1px solid grey; - margin-top: 8px; - height : 4px; - width : 300px; - background : linear-gradient(to left, gold, gold) no-repeat -300px 0; - background-color : black; -} -.toolbox-container { - border: 2px solid #888; - font-size: medium; - color: white; - text-align: left; - border-radius: 2px; - margin-top: 5px; - overflow: hidden; -} - -.toolbox-title { - padding: 8px; - margin: 0; - font-size: 15px; - /* reset for firefox */ - height: 16px; - background: #222; -} - -.toolbox-buttons { - flex-shrink: 0; - overflow: hidden; - border-top: 1px solid #666; - border-bottom: 1px solid #222; -} - -.toolbox-buttons .button { - /* Override border propery on .button elements from form.css */ - border-style: solid; - border-color: #333; - border-width: 0 1px 0 0; - border-radius: 0; - - background-color: #3f3f3f; -} - -.toolbox-buttons .button[disabled], -.toolbox-buttons .button[disabled]:hover { - background-color: #aaa; -} - -.toolbox-buttons button:last-child { - border-right-width: 0; -} - - -/** - * Layers container - */ -.layers-list-container { - min-height: 85px; - display: flex; - flex-direction: column; -} - -/** - * Layers title and toggle preview - */ - -.layers-title { - position: relative; - flex-shrink: 0; -} - -.layers-toggle-preview { - position: absolute; - top: 0.3em; - right: 0.5em; - - color: #999; - font-size: 1.3em; - cursor: pointer; - - transition: 0.2s linear; -} - -.layers-toggle-preview:hover { - color: white; -} - -.layers-toggle-preview-enabled, -.layers-toggle-preview-enabled:hover { - color : gold; -} - -/** - * Layers buttons - */ - -.layers-button { - margin: 0; - width: 16.66667%; - float : left; -} - -/** - * Layers list - */ - -.layers-list { - font-size : 12px; - overflow: auto; -} - -.layer-item { - position: relative; - display: flex; - height:24px; - line-height: 24px; - border-top: 1px solid #444; - cursor: pointer; -} - -.layer-item .layer-name { - padding: 0 0 0 10px; - flex: 1 auto; - white-space: nowrap; -} - -.layer-item .layer-name.overflowing-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.layer-item:hover { - background : #222; -} - -.layer-item-opacity { - padding-right: 8px; -} - -.current-layer-item, -.current-layer-item:hover { - background : #333; - color: gold; -} -.palettes-list-container { - min-height: 100px; - display: flex; - flex-direction: column; -} - -.palettes-title { - flex-shrink: 0; - background-size: 22px; - background-repeat: no-repeat; - background-position: 97%; -} - -/** - * Palettes action buttons - */ - -.palettes-list-container .toolbox-buttons { - background-color: #3f3f3f; - height: 24px; - padding: 0; -} - -.palettes-list-button, -.palettes-list-select { - margin: 0; - float: left; -} - -.palettes-list-button { - width: 16.66667%; -} - -.palettes-list-select { - width: 66.66667%; - height: 100%; - padding: 0 5px 0 5px; - - color: #aaa; - font-size : 0.75em; - - text-align:left; - font-weight: normal; - - transition : background-color 0.3s, color 0.3s; - cursor:pointer; -} - -.palettes-list-select:hover, -.palettes-list-select:focus { - background-color: #484848; - color: white; -} - -.palettes-list-select:focus { - outline: none; -} - -/* - * Palette colors list - */ - -.palettes-list-colors { - height: 100%; - max-height: 160px; - overflow: auto; - padding-top: 5px; -} - -.palettes-list-color { - cursor: pointer; - float: left; - margin: 0 0 5px 5px; - width: calc((100% - 30px) / 5); - height: 32px; - position: relative; -} - -.palettes-list-color div { - height: 100%; -} - -/* - * Placeholder when no color is available in the current palette - */ - -.palettes-list-no-colors { - height: 35px; - line-height: 35px; - width: 100%; - color: gray; - font-size: 0.7em; - font-style: italic; - text-align: center -} - -/* - * Primary and secondary color markers - */ - -.palettes-list-primary-color:before, .palettes-list-secondary-color:before { - content: ""; - position: absolute; - bottom: 1px; - display: inline-block; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); - width: 14px; - height: 14px; -} - -.palettes-list-primary-color:before { - left: 1px; -} - -.palettes-list-secondary-color:before { - right: 1px; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); -} - -/* - * Color index for the 9 first colors - */ - -.palettes-list-color:nth-child(-n+10):after { - position: absolute; - top: 0; - right: 0; - - background-color: black; - color: gold; - - font-family: Tahoma; - font-size: 0.5em; - font-weight: bold; - - padding: 2px 3px 2px 3px; - border-radius: 0 0 0 2px; -} - -.palettes-list-color:nth-child(1):after { - content: "1"; -} - -.palettes-list-color:nth-child(2):after { - content: "2"; -} - -.palettes-list-color:nth-child(3):after { - content: "3"; -} - -.palettes-list-color:nth-child(4):after { - content: "4"; -} - -.palettes-list-color:nth-child(5):after { - content: "5"; -} - -.palettes-list-color:nth-child(6):after { - content: "6"; -} - -.palettes-list-color:nth-child(7):after { - content: "7"; -} - -.palettes-list-color:nth-child(8):after { - content: "8"; -} - -.palettes-list-color:nth-child(9):after { - content: "9"; -} - -/** - * Animated preview styles. - */ - -.preview-container { - flex-shrink: 0; - - border : 0 Solid black; - border-radius:5px 0 0 5px; - box-shadow : 0 0 2px rgba(0,0,0,0.2); - font-size: 0; -} - -.preview-container .canvas-container { - overflow : hidden; -} - -.preview-container canvas { - border : 0 Solid transparent; -} - -.canvas-container .animated-preview-canvas-background { - position : relative; - height: 100%; -} - -#animated-preview-container { - background: #333; - border-radius : 0 0 2px 2px; - overflow : hidden; -} - -.canvas-container-wrapper { - height :200px; - width : 200px; - overflow:hidden; -} - -.preview-container .background-image-frame-container { - height: 100%; - width: 100%; - position: relative; - background-position: center; -} - -.display-fps { - float: left; - color: #aaa; - font-size: 12px; - min-width: 55px; - vertical-align: bottom; - line-height: 26px; -} - -.range-fps { - overflow: hidden; - width: 100px; - height : 26px; - margin : 0; - box-sizing: border-box; -} - -.preview-toggle-onion-skin { - font-size: 2rem; - color: #aaa; - float: left; - line-height: 26px; - height: 100%; - padding-left: 5px; - padding-right: 5px; - border-right: 1px solid #222; - transition: 0.2s linear; - cursor:pointer; -} - -.preview-toggle-onion-skin:hover { - color : white; -} - -.preview-toggle-onion-skin-enabled, -.preview-toggle-onion-skin-enabled:hover { - color : gold; -} - -.preview-contextual-actions { - position : absolute; - z-index: 500; - right : 10px; - top : 10px; - - cursor : pointer; - - opacity: 0; - transition: 0.3s opacity, 0.3s border-color; -} - -.minimap-container:hover .preview-contextual-actions { - opacity: 1; -} - -.preview-contextual-action { - float: left; - - width : 18px; - height: 18px; - line-height: 18px; - margin: 0 5px; - - border: 2px solid white; - background-color: rgba(0, 0, 0, 0.3); - color: white; - - font-size: 10px; - font-weight: bold; - font-family: Tahoma; -} - -.preview-contextual-action-hidden { - display: none; -} - -.preview-contextual-action:hover { - color: gold; - border-color: gold; -} - -/** - * Drop-down in preview size selection - */ -.preview-drop-down { - float: left; - position: relative; - width : 22px; - min-height: 22px; - margin: 0 5px; -} - -.preview-drop-down.preview-drop-down-disabled { - opacity: 0.5; -} - -.preview-disable-overlay{ - position: absolute; - width: 100%; - height: 100%; - display: none; -} - -.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { - display: block; - z-index: 10; -} - -.preview-drop-down .preview-contextual-action { - position: relative; - margin: 0 0 -100% 0; - opacity: 0; - transition: opacity linear .2s, - margin linear .2s; - transition-delay: 0s, .2s; - z-index: 1; -} - -.preview-drop-down:hover .preview-contextual-action { - margin: 0 0 5px 0; - opacity: 1; - transition-delay: 0s, 0s; -} - -.preview-drop-down .size-button-selected { - opacity: 1; - color: gold; - border-color: gold; - z-index: 5; -} - - -.open-popup-preview-button { - border : 2px solid white; - background-color : rgba(0,0,0,0.3); -} - -.open-popup-preview-button:hover { - border-color: gold; -} - -/** - * The regular image is provided by the sprite icons.png+icons.css - */ -.icon-minimap-popup-preview-arrow-white:hover { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); - background-position: 0 0; - background-size: 18px 18px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); - -} - -.transformations-container { - flex-shrink: 0; -} - -.transformations-container .tool-icon { - float:left; -} - -/*** -Spectrum Colorpicker v1.1.2 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue -{ - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top -{ - margin-bottom: 3px; -} -.sp-color, .sp-hue -{ - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error -{ - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container -{ - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container -{ - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container -{ - border-right: solid 1px #ccc; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el -{ - position:relative; -} - -/* Initial */ -.sp-initial -{ - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -/* Buttons */ -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview -{ - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette -{ - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el -{ - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container -{ - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel -{ - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover -{ - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active -{ - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el -{ - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner -{ - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner -{ - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -/** - * Piskel specific CSS for spectrum widgets - */ - -/* Widget's main container */ -.sp-container { - border-radius: 4px; - background-color: #2B2B2B; - border: solid 4px #888; - padding: 5px 5px 0 5px; - box-shadow : 0 0 5px 0 black; -} - -.sp-container[data-y-position=bottom] { - border-top-left-radius: 0; -} - -.sp-container[data-y-position=top] { - border-bottom-left-radius: 0; -} - -/* Color square container */ -.sp-color, .sp-hue { - border : 1px solid #222; -} - -/* Remove the padding on the input container */ -.sp-replacer { - padding: 4px; - height: 100%; - border-width: 0; - box-sizing: border-box; - -moz-box-sizing:border-box; - background-color: #444; -} - -.sp-replacer:hover { - background-color: #888; -} - -/* Hide the triangle */ -.sp-dd { - display: none; -} - -/* */ -.sp-preview { - margin-right: 0; - height: 100%; - width: 39px; - border-width: 0; -} - -.sp-palette-row-selection { - max-width: 62px; -} - -.sp-palette .sp-thumb-el { - margin : 0 5px 5px 0; - width: 24px; - height: 24px; - border-color: #444; - -} - -.sp-picker-container, .sp-palette-container { - padding-top: 5px; - padding-right: 5px; - padding-left: 5px; - border-left-width: 0; - border-right-width: 0; -} - -.sp-picker-container { - padding: 5px; - padding-bottom: 300px; - margin-bottom: -295px; -} - -.sp-slider { - height: 5px; - left: -2px; - right: -2px; - border: 2px solid white; - background: rgba(255,255,255,0); - opacity: 1; - border-radius: 2px; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-dragger { - border-radius: 8px; - height: 12px; - width: 12px; - border: 2px solid white; - background: none; - box-sizing:border-box; - -moz-box-sizing:border-box; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-palette .sp-thumb-el.sp-thumb-active { - border-color: gold; - box-shadow: 0 0 0px 1px gold; -} - -.sp-input { - border: 1px solid #666; - margin: 0; - background: #111; - border-radius: 2px; - color: #D3D3D3; - font-family: monospace!important; -} - -.sp-input.sp-validation-error { - background: #330000; -} -/*! - * Bootstrap v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.tooltip { - position: absolute; - z-index: 30000; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; -} -.tooltip.right { - margin-left: 3px; -} -.tooltip.bottom { - margin-top: 3px; -} -.tooltip.left { - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} - -.tooltip { - line-height: 20px; -} - -.tooltip.in { - opacity: 0.95; - filter: alpha(opacity=95); -} - -.tooltip { - line-height: 20px; -} -.preview-list-wrapper { - position: relative; - height: 100%; - overflow: hidden; -} - -.preview-list-scroller { - overflow-y: scroll; - overflow-x: hidden; - height: 100%; -} - -.top-overflow, -.bottom-overflow { - height: 20px; - position: absolute; - left: 0; - right: 12px; - - -webkit-transition: all 500ms ease-out; - -moz-transition: all 500ms ease-out; - -ms-transition: all 500ms ease-out; - -o-transition: all 500ms ease-out; - transition: all 500ms ease-out; - - background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), - linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); - background-size: 30px 40px; - background-repeat: repeat-x; - background-position: 3px 0; - z-index: 10; -} - -.top-overflow { - top: -20px; -} - -.bottom-overflow { - bottom: -20px; - background-position: 3px -20px; -} - -.top-overflow-visible .top-overflow { - top: 0; -} - -.bottom-overflow-visible .bottom-overflow { - bottom: 0; -} - -.preview-list { - list-style-type: none; - padding-right: 9px; -} - -.add-frame-action { - margin-top: 8px; - padding: 6px 0; - overflow: hidden; - width: 96px; - - border: #888 solid 3px; - border-radius: 4px; - - color: #888; - background-color: #222; - font-size: 13px; - cursor: pointer; -} - -.add-frame-action-icon { - margin: 3px; - float: left; -} - -.add-frame-action .label { - overflow: hidden; - text-align: left; -} - -.add-frame-action:hover { - border-color: gold; -} - -.preview-tile { - position: relative; - border: #444 3px solid; - border-radius: 3px; - margin: 5px 0; - width: 96px; - height: 96px; -} - -.preview-tile:first-child { - margin-top: 0; -} - -.preview-tile:hover { - border: #999 3px solid; -} - -.tile-view { - position : relative; -} - -.preview-tile .tile-overlay { - z-index: 10; - position: absolute; - background-color: rgba(100, 100, 100, 0.6); - opacity: 0; - height: 30px; - width: 30px; - border: none; -} - -.preview-tile:hover .tile-overlay { - opacity: 1.0; -} - -.preview-tile .tile-overlay.tile-count { - display: block; - opacity: 1.0; - border-bottom-right-radius: 3px; - top: 0; - left: 0; - font-size: 14px; - line-height: 30px; - color: white; - font-weight: bold; - text-align: center; - cursor: default; -} - -.preview-tile .tile-overlay.delete-frame-action { - top: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.duplicate-frame-action { - bottom: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.dnd-action { - bottom: 0; - left: 0; - border-top-right-radius: 3px; - cursor: move; -} - -.preview-tile.selected { - border-color: gold; -} - -.preview-tile.selected:after { - content: ""; - position: absolute; - top: 38px; - right: -9px; - border: transparent 4px solid; - border-left-color: gold; - border-width: 6px 0 6px 6px; - border-style: solid; -} - - -/** - * Drag n drop styles. - */ - -.preview-tile-drop-proxy { - border: 3px dashed gold; - background-color: rgba(255, 215,0, 0.2); -} - -.minimap-crop-frame { - position: absolute; - border: 2px solid gold; - z-index: 100; - box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; -} \ No newline at end of file diff --git a/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-light.png b/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-light.png deleted file mode 100644 index d11f6acd9d9f3a9d245446e703d27d6063a2cbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^xl_H+M9WCij$3p^r= z85p<)K$vl@^4?OQpj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9ish**M!Iz?iKvhwm zE{-7{-fzz?3$6Wp)I~Ph(G$b5}H3_P)u~3up_2r>mdK II;Vst0P*=nD*ylh diff --git a/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png b/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png deleted file mode 100644 index 9f8f188e275a3b66aeb10d56b1c42e333c060334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?4#uWfniGRt5@5mAFQf1m~xf zlqVLYG6W=M=9TFAxrQi|8S9zq85$UTDOw0r747Nb7~FVdQ&MBb@0CHMUUH||9 diff --git a/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png b/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png deleted file mode 100644 index acd57cdee51965cb440415dbf46b08f446772866..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d+4#6QOkP~xHV-HyRpJ^^5}cn_ zQl40p$`Fv4nOCCc=Nh6=W~^tbXJ}yXrD!2gRkWvzV~B_M+p`OK84P%s55C(UA2?03 za^@bc!!;@oM1P(+{#SuJ(n=uZrNe~O`UdSkoRKFkH7a3LyE@pAMX1UdpX7UE=rtdq8U#JYD@<);T3K0RT{TQ#Swr diff --git a/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-medium.png b/clear_before_scale_v2/img/canvas-backgrounds/canvas-background-medium.png deleted file mode 100644 index a90cd46c1ed87d8dea055869cd26a9decc69287b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?2{Hm<{;9GXjOAN?apKg7ec# z$`gxH83GbB^GfvmTtgJfjP*?Q3=Isv6fFd*it==E4Ds-Odv+l&g8>io!FTpS)3Q&V zeiAD2Oqp^0iFCVn?2#ufH7aJqUu{{!Y-t86P95j5@FXp3`C`iyo^k94_~8&v(DeJs19Scz#c` zbi^xxCRMh%M(T`F#NdcXrx9&Cvu{c4pMaK*cq0%A*dB^(3(Er{N;aoVq+G@(T#RV= z+=1%$KL9Nq@kXyjq^#JB?XeKmd>HbxDCvx0U^GKEr{UIcP5U&Upxs|y;>BxOh$y0< zk}u2$s48x1oY-)RkoMGXueki)R}g3l*cQG*u_~w$L@BKExw7nQ)?_b1MJ<`+n^(i1 z%~2nK2-}Km52mnLgnSg#MU{D`i%mfXf7KpJD_1a;aB#XWU+@7KkvhxcMHR&4PZRy2 z4Q1vvTdEyOX0Ipq;t>JcB2XN}UtDe%06#Q!T3a-K=OP(m>w+7URvjWYaGg0Jo8Bk4 z!6?bG!9^B;78bBn5fp@0Vn`y8=r7Vr3F#NH};Z^ zl^+P!HIN;=3X&k3Ttwp0b8h<2^L}bE#%S9#;OzcT%oPa_e#?*>ddVttjdX4<}t;jhJi{f&D! wmuu~UAnWQX@RxYsP7aJT>~4J*|JQf^4$M)BwJZJuO#lD@07*qoM6N<$g4Fa{y#N3J diff --git a/clear_before_scale_v2/img/cursors/color-palette.png b/clear_before_scale_v2/img/cursors/color-palette.png deleted file mode 100644 index 6e6e85212b85b7ba0918570c2ebede3047596237..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5iLZjC;k_h{kHThqfC`(hFmxSO zSd?`bB$R({-*5T0gITA{|Fu6pn0eqpx>}JTL$UWimE@yNe}L98c)I$ztaD0e0sx43 BPNV<; diff --git a/clear_before_scale_v2/img/cursors/dither.png b/clear_before_scale_v2/img/cursors/dither.png deleted file mode 100644 index bbbe6e9d472136d68a86c783ad494315ceaf60c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmV;v0zv(WP)tN#a-ClgdGb6so4$%A$aJJ1f4o}=-@Hvs&wcm zdFvMR2fAn=>@J}h%s7h~>?A0JVah_L?Bbh2e;rmgwW3?!%j5GNAAaBW9vsAR96OiG zNiLTY+qT8FZ83AEm`6BgHqIT#u@Aj4!2JBYoyla(NF)LXnM@WmL67Jlkj-Wg(TJSV zLDNX5)8>cb3)Q(c)}sNWQYnc>qm)WTM8LB0Xqr$c7STk*%3np$C>4qbf|buxuhn>Z zr}cFhAP55dz-L$a0QkOYtjY%jb+E6LLNxG|A_xK^vE;A@Fg-mb*^7PTEeiw+r2-m_ zCIH1k5dbT10Yb4*V)5f59m|uu;l{)OUn!J2I+-S`!$!W3h@gCh@B3W3|FRW;L?U4u zh9O?X6VLO+FbpvaLp-k{UZwJjE1q~>gA<8_-TZ}Wwb~zx$8ERlngI2B9TCBG%K+4B zbe@K#D^p}mh4^de-8ZSux$G>j zkbE%vo7`*=ME6$*MxJq6Z)NF?!@|}cMtYE)xfyoXHyL{MyXXXa`=Pt9kwSj1R|CF0=Fk*Fx-qOOAWINqw kBIup*SJy{pZ}C6!6a7#o3cllY1poj507*qoM6N<$f?LBr$p8QV diff --git a/clear_before_scale_v2/img/cursors/dropper.png b/clear_before_scale_v2/img/cursors/dropper.png deleted file mode 100644 index 2a161faeb79a247dbd80ad204e01108ea328ecc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmV+)0^t3LP)A3!~jw>Ki$8d;SW1I!v_WiHn30@PX?`T+jM%F?tO8AtA>5R;@Y>jE&9zku-w<6S~u(nw@fs zs|pPj1T0Q2xwQWHnl)!b!@^8~HV6HOc#q*fvJ0?j-gEiY9U&gJm)kp|U%wC#nDBko zssf;r8mtKk1pfT_qx|X9C&z-aTDaz-Xy=navHgGl{=EaVaS6_pc=_^W26lFK+m61e zMKH}-!PZBBm179+>8M4}$~m-n}~nwD~SkdEwTrTh^;K zY|r-d^PP72?C}r4us90LANO%-;sZuE2eJV`+ullx^7R0j2S83nP7laH7$~j)q}hS^ hBUFr$((DWnU;xEL=rr*FUHkw5002ovPDHLkV1mZ;^XLEo diff --git a/clear_before_scale_v2/img/cursors/eraser.png b/clear_before_scale_v2/img/cursors/eraser.png deleted file mode 100644 index e0d4b0201b9fc3f6f6da0c9b888822eafaac8414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)1RCwB?lh2D1VHn4scXm_|RPb*o z2t2F@!9+q64R!|)wREXlm!UK;JjfC*NEabIL{LnZWuc;5?7HNoAE&4}dY4uA7Bo7F zznz)4=Y4a;*7ejgygcu`?|k0x_kG@X2q6UQh{xlQN~OTzaKP2V8xU}e%?d!m6d(ye z3FglRz)uq>7}!JxMj{c2#bV%cx!{txZUIg1etP?iiB)&*+w1;dlVT>5*#z>nEr66% zJt}oI4Xp@}uDvUL+_|^KjRAZYU~@3|*6#6Pse>@3Xx_4*)9JwN+WP|&K*DcskZd-~ z9XOrNWfnzo+p?_ilWP%0?{>K|vriUTKR*Y*-w(Bi`_I=LpwjkqIt}M?ImJkYfTAi> zW)4_iYc~J(DKFxda1owNCgFTOugqpMFijKOcazISelK93&j%-u_Fv%Wsjv!<$K!CJ zP*BhThwbLNa}$1@o#7f5hpUgDzQkiZK_B0QRpnx_s9^pFX03_J)?R|cr@4bySiob% zzVc(VmCNO_G8&E6j-uUeV+{rHdcCms;kEpL&?ceei#;zg?JO>firZMi qS0)6!_zO_`=C*PVMkCl5`N9Qfv&d*`0-eD}<~0i_h~T|9uK{Sh1iG{f~V95!&s7MKs|n60}C zkzn&HrC{iR*Lc_X(N1o~Q9{P^)rrCDkFPQFm~b3@LTf9wAr;d5u1t=3K0-=LFt^4d zwDcAs-6P=mfUo{R4@Tk%wS15xkMH2}yZ%^*p!kkKv?qH_1hLBwjSXDRw(e3yW`y{hXv0)gfQS~Uxm{K`_{tBKt0531)Juuzx~o6D;hygrL@*680jFiiV;OfsoG@FMMQ8>mkf^5Q99;jl@vr! zoZJ<35QJc%Ewt*Ep;Qcl)_|2(#DrGO_q{alIwVB;M=c26=??dtd+xah{;||<2R}YP z=GLn5a%ENZ1dYIobe2Cvo$!dgTY~Rj5B-qF07oxoP?p8Q(}{R>xpKFyAdyITK@eoO z0w*W)NK2>!1YvM*lmWNK!m~Sp4KOq`?74177J=!R8B*yqN(50bI(iy~0@VZ~3WZQ! ze2EpZeH*|Soz*%_vo{#6TMj9VF*~00W_g`Uv}7}M$@HI_naO*)+h z*=)Jzc>ve|zV9=VOd<+qr)No}Q_zy@`#yz20cjB^5d_8j{M;{sjmAb!8LHQ7J}%r^{A1ih0A10LHyo+Zd*nR9fm3|0t|F@OS8&^dD`Pzp swk*yZ?xMfbA>12#a_;7f%lwb}34-#&=1IIcK>z>%07*qoM6N<$f^?<_O#lD@ diff --git a/clear_before_scale_v2/img/cursors/mirror-pen.png b/clear_before_scale_v2/img/cursors/mirror-pen.png deleted file mode 100644 index f51489460073ccd61817ab46e6f96fd5b22cfebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmV+|0@D47P)Llf6q@Q5c7xb91>@gRz2|N(4=YMnrVF2udl^ z4x%6q4(cZO2S__eCuh+iD2m-WI7o*I0ZSF6Lm{byS3wCVe#4Dg8=BDIXUsir!C>~kdT`hLf`_q+&ay zVmkmR4)rdtK?c?n+(y4)U+El}7r4qj#7_5V9SMq@23hd=S7dr0y}lmzOO<kqx>Y`N5G#KZuk(+dT&<1^7t!h^v@Ly0|+T4pN73& zpIu^ywlOnjQ8G=` z6$k%*1~6*N*xiU={`!K`?WSiklDB0lKsa*A+vO>IMiTpUo3WxhWm0sk9Q!R`<)*Es7cZe`iGfa00000NkvXXu0mjfwg>H5 diff --git a/clear_before_scale_v2/img/cursors/paint-bucket.png b/clear_before_scale_v2/img/cursors/paint-bucket.png deleted file mode 100644 index f82a8865a7bc0326fd56f27a869326be4a7d688b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 707 zcmV;!0zCbRP)d6{}iR@dma4U zGwNI63={10?wsg6GrMIz9=9gZKjA|+f3>GAK+D|GJH82pDTdw`PIL|}-E9ldO1tCE zh!Y}h7`H{Mc=~qbQ(FLcAgsD6T*IKskM2jy_-qNlZnsM>1c*c;%G7om9HAYZ4@|gr ze-YdHGL{@3SlraFMS}W1yBeCDwgj)70ffV0WjdWkyAqr__<>5Lf>Nmjzuyn#`-SF| zCD@#CrZM!vJ3OHFTxO9ZIYyfsjRp#Z0 zMwk*D4u?7#jpFF&2#1GEG`Byu|C}hU^-i!wvCE+^rj9RT$?eTa}EEYkR zMK{!HwbGGEfk1HjC$2x=82slTsZ=WU`uaN4eVfe&i9|y3`F!?;Cy|z1E>{~228hLC plE>q<_Zv^tYSsXk%l)sJ)*onV;!t9*YM1~3002ovPDHLkV1n&hO1S_4 diff --git a/clear_before_scale_v2/img/cursors/pen.png b/clear_before_scale_v2/img/cursors/pen.png deleted file mode 100644 index 0bfecd50ee9f5bc5828f0c0745aa3e0effcbe250..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 450 zcmV;z0X_bSP)Rq1}l<=psl5*5Xz9i;M}s*NP=ugs7Q#8Z;Dyx|}!`#}xw_C3!B-yaPC&0j)XcpuX@rNfq|q}N(wJOjA& z>u+z?dfJEuLePrqzy!)73pvLjxk4d6XNZt?hm_iYES{i}J5y3l?}PPNYDBR7oPc~6 zL^d)Bi4Q2L3pnp!nFxN9c2E+=@XAl&+;2m6a~kZj1r3Mz3C=hmUG<{+vWR@t4q?fJ zhFc(ozZD#Mx`^Q~g1v=K6!QnfuqyD4>U4EjF0eamL}Jx| z%&`kR-H+3GBYr*Qx}frLU4`%n9(`uSomzw)t%%NagXkA*R5Mbv9VLDp1wMo$cOMa~ s3Wm%r7^bwK$2$}-<~D8p`#1iScU4^XCLAA~0ssI207*qoM6N<$g3sK(Qvd(} diff --git a/clear_before_scale_v2/img/cursors/rectangle.png b/clear_before_scale_v2/img/cursors/rectangle.png deleted file mode 100644 index d28dc6b1a4420e67d2ad201e77fa6ffdff47b0f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 660 zcmV;F0&D$=P)-HHgciWXH=58>$m+)aUP_=fNurq~c9Jfr+{g4OA6VysNJCVr!>1 zyO(ukr-@eVVQOd_eeEr`d;&*7#Zd36d)>ub=%lXvJGs$=On&Pn97vP9zKEPnrBRKfD#EKdHd|_ZeufOm#a)m@NAF&m3;5bVE$Q(zLZS1JKPk-x02D-XgTe_RX z#5m7GmzbE!!E}bj^$Yyl#_Q*HW-gz-5F#kVUOZxW=<7_hAg}KDjh>#B%CwB&uQ)_iwz;@6pmo1X^%*Tz443SFZSDVxCn00004Tx04R}-Ro!pfR1`mnZ(O7nKcKOW4i$^9Ra0BJ8yc;~21%2p=|UR0&DbiW z$#rfTQ`a`O(`{9s_5yDV_yd5l2Of}kLK+Oj_Ok5(v`JGz71bo9J#^YYXp{DWs&KBa zQ@dTpxRI}aIp=pi@6k0t$5)!;m`NF6-tt{FpOKHBn3g+MAqmexC-gw4rh87hTrL7G z#)U`L!(So6-Zux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VR diff --git a/clear_before_scale_v2/img/cursors/vertical-mirror-pen.png b/clear_before_scale_v2/img/cursors/vertical-mirror-pen.png deleted file mode 100644 index cf2157d808d6e2257a792a2dd3ad1e9ddefb5c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)jk3mRNaU93L|Nr(jY_l2UJ2)^m2h&zGb`XMg zDG%YGIu%`lP6k02aaJTkr<6_=i5PSVBzH!ryt+X@B3p!g#Ey)Ei#$Rp3GGR`)+Vx0=LtWG3FRvd~t;w1x~2bX{xDD zIyb1s54n$O0|^-U1#m;@CB_&k^FMyd_vlEt9k%rb9^W!}U2_VC)MM}EvLW53y5VQh(i7O!z~?9K{_&3T z`VQID09AU7GE8h5L9D!+N6XDAR^&(F{`e}3!=iw#}5u#Tg^3nctWfs1Hmk-X; z@nk1*BVEXSn1Q$P6pH#9I{Ky=04#pn0Out=QOHWa{k|wd@iVZLapdxv4FI{kwqq&d z2*s1|`=Tghr43%vpBBDiZb{#{d~3)%`l!=Pghh8- pYX~H4&6M=-*DnmnOBDeTVHZOpxosdUl1cyo002ovPDHLkV1ipX1AhPj diff --git a/clear_before_scale_v2/img/cursors/wand.png b/clear_before_scale_v2/img/cursors/wand.png deleted file mode 100644 index 44ccbf812879c42cb1f9587d865bcfc337ce6361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)hUn2-Navsqo?5A8 zh}}V^=%7@_%C;=H{tGpIj5CMu*>5J=i;m^t2QTySd)}9aAppozC}++wDz`eOViU-dbRRoz=JsVlZk>N%^azhi%=xTCt9`LQjtqNFW~e|R=r9= z`@I3J^#z@aD5yBuq2DLQO#|4uFW6R5kzPZ+h&6Af&5}POarL&lA~3t5R1i7uh*ffDw@qEs=HBW ze?CI~MkvG6H-MF7r{Yv4kw_q&PNP^XqFgTHXlH@RpLO}3aV{T{Ez=8lo;PHV$Ads1 zfOtF(s5%5V>3qE|&{lueV1Y1j%GF zXt&#NI-LlGLPN>_18TJzN~Mxf*f6pY5Dteo^|P&3>(H{!KTr&_wGRQWb^rhX07*qo IM6N<$g7V1&P5=M^ diff --git a/clear_before_scale_v2/img/favicon.png b/clear_before_scale_v2/img/favicon.png deleted file mode 100644 index f85de46de273c6d0058ee69464c5bad1641e8ae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr}70DGLM)n!cRA^7ns# z&bi5IZf+M_oHdfxi{CK(w7YC!N9~>1V-_(y3shtdCLZ|Iz^YpCPvcKwO5E8VrElh6 z^p%5!g}ZL--&H@sL57VjK&B(!R5F06{kIkK<2u$5!{h8cJ+_ZlB&q64Dl}T~0F4n~ YJSEp6=*p+T3v>g6r>mdKI;Vst0Kqpr-~a#s diff --git a/clear_before_scale_v2/img/icons.png b/clear_before_scale_v2/img/icons.png deleted file mode 100644 index c6e3bef2ed319ae53eee8f83d098f8a2eaf4938e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11499 zcma)ic|4Tg`!`v$8-uY6V-J&UvL^eI-I$PNCS^C%f+BtFW(=}RqAX?4$WE3qOHrbb zEX7R9N5T}Dke>1RE#Kew_x$lZ|I9tFbME_nz0Y;dx!%`(og3roY|GCh$-~0J!f$V9 z<<7#w%Fg`1&&|pF#r3USVPR23+FMz8#<8vsAMc;ON`M~j?k-eE@8`w83-(;pqH%|?xm5U#rwE^{EEsFC;i_e-|v;kWd)(SroO)2cX^{0Q}_u=J@ z1>fC@_}4wV3ke@KRdbLQLhR;tyvYxitlVl0Na%GgHD*hAExUzKQxSmOq7~*K#6Ij3 zY9TZgPv0#xG{sgu3qAp6xa@N$^INKX%%U;$y$bW=&$Ws>6I{#FQzqa+;aQV$))HmlcM8GAmo-n~K9>`tB-Jk(8R7hHlpTW`?b|wu?&S>dD zG3&_>Gm6cZjHt@%8gAG@n&|;sHvV{wjqUbX?S!-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H-;jx5`>iK6uAz$fQ5L?~ZC6;hK|o?_a@i?1MkgGSnE} ze%0}>m!jO%5|d#EQWZ8r{Bh?^#ar36mo3V_5!cDh@Wy@tgg^z6zckr_6tgV1Ra56# zDaLPfUM1>e#qc?Js<6WkG1(!@5Cc>bIm{EmW0oGEm=Qp$Q`Ewp@xB;&j{o;{@9bv1F69a?=Y5wsHe@jAd4-hLs3gyG>~+Vyo&d z*Z{5F`f#e)su&43p!K)5@Ba46ykb>iqI=#NGme^u26{^N3fQXepw3TawFMma=n%fQ zf6{}bKffQ`wsn;I-m8ioRnUNE2Ek9zVvq#c-+xbEEHu~+$_YHdH0miPF*Q2Yy;$06 zds|B6=kx9h4KSc}aDjDNKO`u(-w$xDP5|@&abe!*40`vbW_8^7u6ch4m(yEr+qAXP8FD1G)j8!4coi=Hly zAs(G?uWj@_93asC@xJ9rk%hWwfg!` zs};xWruAjr@qB$^t+|fKI=1OQwZ1m#6=@&zWxL^87bmkY?9c1e^n@a(<;v3CEBkWl zf+V%C*iL?Z;Yo|$!hfCn+kb73ajI2Q`+i$I<3M1p{OO4)ul`-}$xGIma+6Ec%#CNo4FVJ%gp00i_>zopr0JZOiV*mgE diff --git a/clear_before_scale_v2/img/icons/common/common-keyboard-gold@2x.png b/clear_before_scale_v2/img/icons/common/common-keyboard-gold@2x.png deleted file mode 100644 index c647658deb76b7f78bc445357551116b89a9df80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmeAS@N?(olHy`uVBq!ia0vp^9zd+c!3HD+F3O4lDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?+dW+z zLoyoQ&a%y73KVGAUujr-;8>K4S;BKhouH*31fr^#6fGOnJtX-j9B(Is9FAb?i=Z zd|!0FEq%cx|0%7Beha)~-9IR2Xg_D&amsSXq77;nmaS91$eH?p_r7K3Gl#`3mz;%) zu4yo@lMH$+{7rvlu}h0&XjqBBuQz^ytV_d{E+oY_8a)V;FYYi=4_Wz<(Z)znKKYN2)pKO_6 zd9t(6kxlQ!0anQ!3e7#~cBQ}LrB+@)S3aSU+o-^iO>$;Qms9$_{|0)k?-iKEQyw(& z#DJte_*nI(U)p~dtnL5#CI6+)FX?UtYXKYf<9cz^;q}iy#MW&~cKf=-P_*;Qt=3eA zW1YuD=L)xl=))2kKNyLZ&rX?|zHLDmp!vprRu_X?jmC=0x7auAPrE*sbwA^bw< zWzz36*GpX%oV|8ysqz1n1+9OrGCw$d>T&v{FBZ2mjcta7J20LZJYD@<);T3K0RRMR B=Dq*` diff --git a/clear_before_scale_v2/img/icons/common/common-swapcolors-arrow-grey.png b/clear_before_scale_v2/img/icons/common/common-swapcolors-arrow-grey.png deleted file mode 100644 index e80406a694e03977741bc1ef8a1dca64f4d4a550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)Oj6hRcne=~D)>d|gq(~u3R8a6NgahGr9(N#qvCKXT_l`}t$Zr1dVBY`D z{CIC*232JiX_{_`$a2}M8b(zC5Rp|?-2uMD7+1U9?hk6n0!*jVldAe0I0l?`&ONCE znS-({8vv(E{>?N^*Xw}Hcs#yijCs7E_AAfx3!P5qT@_FR*tXVQj4@sZE&*6;pBZDe zVvOIbcGU3RzXcGH^Qw9qKvmmGlI&K6KygQfUYFL(bs+mdlgVTc$cl7jG#VX05~$bf z{QN(&_QTpVZyV`2C zK2!o7fSys+kHFIyuUH#=s47K@(dj5)DksH!!_+>;HeY5>0N^j23_ZLL-d!vvD-*5SRsRYZQy$u3!I z=ZCp?p8oS4YPZ{e<^@H>mJI_rKr=Hl0a(lWs=75mfQrcZ9Di2`VRkEkNYnIep0BF+ zmWxvWWQ_SD&li#V%Eiff%iz*B(rUFDKqXW9J5AF))6>(9vVd~$(D?Xx44lp>U1^Lt zSr$wo5P*ohTu?gZz28?7PccvwMV|rR=ajAh78{MmRsAlKB*|QoBv)?=2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o$h^b<}1kq(ck$QWzMkdb_O7cc?bFAG*8M`O`?p_Z_@K)(?~(Vi zU+W)mHdxfSW}mj=I5204dHMNMu_64ytHdW|tL+V2t1{oxZF_pnuCV37t4w724jejV zBF+5dO2WZ=X)of==uIt{%5?otXZizj%F1+q%ckcUQzopr06C?B6951J diff --git a/clear_before_scale_v2/img/icons/frame/frame-dragndrop-white@2x.png b/clear_before_scale_v2/img/icons/frame/frame-dragndrop-white@2x.png deleted file mode 100644 index c1011816c69f85ba04f296cb9828b6944a0c3d38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4JCOfpuKeW$?tgAG z9(F3ud#tFm=2?pLaVd7~_T_u-a@`kPQj^wF;j$RWA20NAUIQXN=MC-^ z#{Rh{|ID(lGU(ZKMLBn>>D4bEPaHHzt8giBU*EFi&vLFcGIb0)_U))+eeK=Qbky1J zvvxQ8c^T&0QF@=d5A5%;M}N;tzn%|_ OMg~t;KbLh*2~7aSjymg=bFoy|KI!2Hmu;V(1+(!OYZFX zX`uZp=jgZDkN;V)F27tXlD6Z#eZu|Qv){kixAo<6p5_vnT}+l6nU)D3dEe(8te_rt zprmR3o(E=yFF8+iiW=0;`MTCTLdn5zO~Xs3S&5wtAhp~XZK_O9j&RM;TOc`&V}h`D z!mfri3`G?=9OsrT&(VIcQPE=dyiIExj<-E{^Wf#qKkfRD!`p9vV(^p-OUQh9auU$@ N44$rjF6*2UngE!ZpI-m~ diff --git a/clear_before_scale_v2/img/icons/frame/frame-duplicate-white@2x.png b/clear_before_scale_v2/img/icons/frame/frame-duplicate-white@2x.png deleted file mode 100644 index d6c28c6e9ef509c8646c292ebece155690fc0baf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85pG3fiPoFZ1E4Epj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9i zsh**M!Iz?i3=B-{o-U3d8P0F71^Ve2^0)+wot3(IZO^J_St%yAg~!+HE}5Vl*;Eqh z^Y2H6ja+?}AAk6~r*GNU=h;`3{yw<+Hhb5ss-eK{%$v-%z`}68A z?0X(uerf*rbLzSyn!%MoEkC{-`S_tuX}X2na-XM}A^m#xa((>|UV!YHdFt{CyWM}P z9%Q^_mv(3G(_1*H$OJ69uf)=>V2aW_D0g1j&yoij9T}%CTBK_EFaEXd^mAtSd_iwZ zDX^J$|NgS8bUiY2`~Nu-8>cKTJQXs}?WqnXH-~Xzi-zopr0AI5yQvd(} diff --git a/clear_before_scale_v2/img/icons/frame/frame-plus-white.png b/clear_before_scale_v2/img/icons/frame/frame-plus-white.png deleted file mode 100644 index 5227e9cfd8fd7274377d3a8a7642f9d89290ce82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$AY=VKT^vI^ zI+OqW|8LK1%OD(^Be}Ih=z!CrsxMOxd#pM3P`qTZ*hJofrB+F&RbyTm1U>%1y^FD5 xImWVXONzwSjv|MwT9*gZZ&m>{5qh~44$rjF6*2UngAI|Lq`Ar diff --git a/clear_before_scale_v2/img/icons/frame/frame-plus-white@2x.png b/clear_before_scale_v2/img/icons/frame/frame-plus-white@2x.png deleted file mode 100644 index 090f9a6a1023d7a032b15ffe2ddcdff0064fca55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkg1|*MGNWTVBEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4mdKI;Vst09iF%L;wH) diff --git a/clear_before_scale_v2/img/icons/frame/frame-recyclebin-white.png b/clear_before_scale_v2/img/icons/frame/frame-recyclebin-white.png deleted file mode 100644 index 98a6e4ea60d7f9089be1617d33c3585cdce60d93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0v}JY5_^ zJUZV_HRL;Fz~dS(AT&22v9-~;fZ6Zn;stRH&ISi=t&2UIq|ei-92MlE6S?t`yuE7R z90jE*8$t!MSpTzD%w1^9DE`%W!}XtXI~c>i?p{5sV@Zv&(%K(uubN)mC08(=(e!mt z>ETP#CpbDTAJ;s%H~9IrXHC)y88Y`CrSW}O@Yrn8#ybKRQ<`(dySAP=`rl79=HPzjI>yQM3?Xv0$7TWj!QkoY K=d#Wzp$Pz|*?E@$ diff --git a/clear_before_scale_v2/img/icons/frame/frame-recyclebin-white@2x.png b/clear_before_scale_v2/img/icons/frame/frame-recyclebin-white@2x.png deleted file mode 100644 index 1ed1955f5d2c83deee2916b2f92a78456ce32d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4ZMV|lm0nGxYoNZ?+81)*tA9$`@XQ;@s zcB7z^1Y2!e>Nc;rQL=Vy=Nd(OH*nT4r5~7T;^F*5UZVDlX1H#BNM) zJ99#|K!MZaXQ=Jp9T-vME zZM585Q+SVmzgFy;Q7?CF?uAzyUdi2UZ9U>2tebeXe^QLK%=(9GtYyTPZ~b^8>c;XC zZ>!4>-?VP^=YRZ2Y-SCU#as6uTV6+&TO6%ldv47`9ph^CH|gG>VA`>vH0FktUXCm{ b^q#XfdTJ&pAE`PAj7SDgS3j3^P6!lvI6;>1s;*b3=C|qL736UaGn=XP^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs% zRL{`B;7id$psG2ZE{-7<{%a>jbF~`qxNP=}-@TK&$Ud^i$!ANF)bfsxbut;tCNnQp zQL1NblT4TaBi<=q_MfP>F}`7;-j>uA>kkyPXYTWi>z<*Ox|U_VtIy&lRkt_duNpD~ z79Dx^dgi|OJKDCTXnjA|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0TsRRba4!c zXnlKaFYh4(0f&drIXWkqZemnbO%`0{)H8weghW7)tZU1mc#HTq7J7fOynjB4d1E1{ zxO~-8#`&TX!Wc85#5J$ji#ypYeCnKZ&uxmizc5PbfyKn+bML3By8JvJpfn|Sh46x9 zHL2+(8sEY&ddL6N6qE~1BvtcMu5|S4Vm@3S6;ACsI zp2UlGD`}n|cT-OqENGsT^uS)jlI@sdcLIYP-@iEC1rvfmLCWCi>gTe~DWM4f1lEL? diff --git a/clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png b/clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png deleted file mode 100644 index 4afa0e5d8bbf29d3b1c28e3fce647ffec67ef402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|mSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsNk`>*-%l@ftLXG(>jm*H7rISl6^=FnarMNs(JjGwzwx}b((zc;Y z&^qgQ6Uz-Z2gVb7C#+Xkuee-c=Zv2mksc5JHE3;->d@!f$foNMB#=H;XN9!o!t6_i kn>jTXmYm6PW4OuqJ7D%@AG>8wfz~s4y85}Sb4q9e0Q~<@p#T5? diff --git a/clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png b/clear_before_scale_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png deleted file mode 100644 index 6ffe2bf1127f2d2fa76e4934bb2c8cbf451c1c9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0Tn&+ba4!c zXnlLlR;bB9pzWc!w0FOA=F6=gLi*f4m_#D;_DUDF(rCAF?#4a#sZ1^-OC9?TXzlefb1 zo$*xeSB=&MIth%Q9OBQcoWQ!Fc~!yzwpDG7CK~LUPr1c2Jx!Q*KypW$tMTUr(@mtF zpZT$~F3+!(J(=Y*zbMn%#+i%mEHE|PuOYsI<=ED;)`>3anP)6+i9ZmuyTx5PNoW7e wP=kcuB_W3$q(VfQPcL{SF@rs~iLrutW5<(_td|RPfxcz%boFyt=akR{0HvLVy8r+H diff --git a/clear_before_scale_v2/img/icons/settings/settings-export-white.png b/clear_before_scale_v2/img/icons/settings/settings-export-white.png deleted file mode 100644 index 45d76e67541af98c32b39533dd8b50fd76297978..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcmV-T0 z1)1Ot#)FWI2N(hr0Re(g+{6x|EiB`6hFz?QVO%oSxIaHAI9evb1OcTWayL zsm05t7B8F1iZ5%-S=1e>k@w@j&Ui|020Ws5hAW%#THJsT7y?nU46TkLB1I!bXKv95 zMNMcLuc7fgo=zxg&Ni?H+~mv|0y~QBcfhVmJfGqNU=P>=-ZJJyz^Y>VClHv#^Ht*; zKo@8MS2^?U4Yz0Gsm3p6YPL7;8uuX{h{(r`$g7C7a^#015+%z}%;I?yKUF7D1{%k< zzKXdvXA^iJu5lFye><9*}WoL#b|A#T*x)cSrh+;Kd0w;5%kDw#k;o|6%{mWqpb zTSGdfCnEi+_5LEo2L|HrA~Km;pNL4uMclSI*MUdk=Cox5Yy)GBc)zf1&J*0E0XBhi z+nsGP9sp1LJX^RhCeHdOC!P|Uj344h8ej#u#^SZmRJ;isn+7SM100#|WLhdc;>TCt zM8q}!!kkLw%tA_s0Jt>S!RL#FFSO#Bd{_BX|G8B5^Mp>u%PJ8gDx2|IyliUmvZ=+( brn2H+%ZY1lxC17*00000NkvXXu0mjfQ4{=F diff --git a/clear_before_scale_v2/img/icons/settings/settings-export-white@2x.png b/clear_before_scale_v2/img/icons/settings/settings-export-white@2x.png deleted file mode 100644 index 5c9f5d941a2967dc3068a88df3e3a131c3f07fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfdb&7< zRLprh$1q#OQKD_W#754T^yJ5h;w&3ETUr{zuCbkq@=z2C@L2v|VK3vsW4Hb=Su4&E z$vmRg8>75rBli-|iJND{TIg-xzInIt`*V5w*!yDg($n9|+3lNKoFOT2kvmvxSmi`>#pxq6N1tX|w#qg(Zd z>wkXdubA^Ut5O-}q@E9N?4I@c`?5o)oBH%!8#Cl9CfI&smQm-(4g0~F z_gA*bIcDkeoJUPQ|KikktiN4%ZN_f#*B`VTk5AvT^$v60!&@gz(hmebSoLVn-VDuD z!+m^}**_2X-b`6v+f#7IYfIom=Q}4iy}EU~{r!RBn5pL-mXTAOW;!m!6cbS_E z`Wn-Gx4q@oy%)J)-3K*Cb(Q?a^YfCeV;}l9`FVU&T`aToLu!n*XCvc>mA%Z`t?gV^ z3o}%|X;)XASRmY0d@8wKz50jM%ad(lN&CGjdVpf)JG>c%M08U<_5eAq8}}FMs-|7w zJgW6>l0!*Scm>em?Tc>QU&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y-*tz~{!_jX!>=g`iv^p*-+qCRpU&FNi@p=DaKg2os<^9CBd}OkafBbr(>B0Mj zXS+@uKhk=4#F?G_0B=4V_|IIe|mlt;Kp}`070<(p0st*M( z;GbIj!=+cw&ca;Dd0pwH;}^28O!w`n)ZO?-MDcmz_oC?q>s_zBc*yT*ZEn;h_n|aX ziMK>^_Ht*7oRBRmLvJ0{57d)(dVg`5n>2Sz^*!UIhq7}o-Cr$od{J+=>QwL6^P<<} z7wn$1?)I^n&y;otYwcO_F?Ua%-lqIp5~~Z;CkH(|zbZwr?C+M9SKTh!PUotRil}#Z zb*bKdi(%Nq)2(0GV^)BSTJ&>r@K2X{!vu?7Qw9~q*O$XED=55~pSG)B4lIcljLbBc+;-{?cn|6BT-*$Df9ZCTC7=%OlT@|osUvdna?49rrg9L0gvbk_8*f!S#A)u zJ+#xw^yRGNA3O!~zny5C@VeINomR%z56LY@+rAaWcIzbyhW%w(8^%9>`QA;6PwdtU zMtJ|=T)Jc0iaX8wLrmvf+Z*z=Z%^=gfw;GqmCV0!dA+}%{q4Z~hVahRc!6nG!&h3X zM)w*%Pm^0-q?`6?&`N-mkviQqw^|P4&B=7gL%asV?6G6@U cxQYb+dofE|EEZ>30?Rc9Pgg&ebxsLQ0P>`18UO$Q diff --git a/clear_before_scale_v2/img/icons/settings/settings-open-folder-white.png b/clear_before_scale_v2/img/icons/settings/settings-open-folder-white.png deleted file mode 100644 index fd68fbf4aeacc965d7e60a846237e96eeaf85e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)< zXqv`aWZl0OsHGS0nqItXdhxF5#k-~#@0y7C4KyR#0?tg#ZW#uFL)I*IEi*oc-FP=9 zrx4@VDqC=V4D+OjtoS@OPU!j#uHs}i7!iMiZ52`(w&QIk5ZNl_>+6}FT# zY{&*$KH@OmSLRnt?ag`7P{$x)(cJ?o0;F|&CB1mp^x|F9i+4>g-Zg7h Z{1;aL1`c3Bh9v+1002ovPDHLkV1j5l0?+^e diff --git a/clear_before_scale_v2/img/icons/settings/settings-open-folder-white@2x.png b/clear_before_scale_v2/img/icons/settings/settings-open-folder-white@2x.png deleted file mode 100644 index 0a1fb21d2b647eb8b36fd53e4ca9f36b4ad0f33b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1008 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Radb&7< zRLprhdv~@-ph)}v-momi8!9V)upeTMLGaDmKf)p*U-$z=j=0w(D20j5 zx)E_iyzPgAtJJ|C4hNMC*-Rq4ZyqQzZoO&y+}!%+=YtyxrrAFK^!BcCar(QkRadnd z`}!8KU&w1IFjS23;Sd)-bd+RfPwNNY1KJC29WZ2_V=tG9|##C4SL$kw#?(xd#R|(vUm}8>e z7|NEc*<^n}_W_T=I*km)KkOThCFr;sal8o>*_5FRl!)ob^Id7?MAyzCkyw@bU7ti zXRKb-3b%ZLp=QGSx+bEYXw>UQ2=N9J=?)S{kCPm!zn?H}gzzMcjSuXlu!XKi(~y{=xFo^iPx6x3FjGB2{}0~>^UkSnQ+{@~ey=~XL2TZ+o~Z}w z9!uSuq4zXcr{({ey?u=9Cx5?Hr#U}K@lW8}Qcazw_aE%hK9dxGDm8)o=CN;8yBhAY z{hYc3=(>#pcFzAw%Ot0N+P=5D;-2oEhcj+B|F+P18f??LzvN7=uc*aZjVGFalp>=m z-$fj5dVj#vWp|bCzYtNKrm$c0)1n2)NVxFy{+~feaqHZ$E4BK-+{xhS>gTe~DWM4f Dtwy;* diff --git a/clear_before_scale_v2/img/icons/settings/settings-resize-white.png b/clear_before_scale_v2/img/icons/settings/settings-resize-white.png deleted file mode 100644 index f85cae210bed031acf4d27d3c58de6fe1c6bd5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsz5uAFIl=c zM=_{N|E1Uc2Hg*wbMHKzEnKqc^i){J@Wj( z+SMh{OHn(9VSP+cE90Myk8i@9$px~$o|6$Z`W66E_5at guLDbK>75midTQ~u;rn8FV5l*8y85}Sb4q9e0C)$SkN^Mx diff --git a/clear_before_scale_v2/img/icons/settings/settings-resize-white@2x.png b/clear_before_scale_v2/img/icons/settings/settings-resize-white@2x.png deleted file mode 100644 index 2db490a83afeae7ae146523de79d4930daf46dea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Rkdb&7< zRLpsM=b)c(pp4tc;G~XEetA9-lCctH8rC;HtJpLYY73bQ$RFJCHP>W9z-cC_lPb%^ zXIhrOd-_{7Ho)ui^Cx9$bK@e`glQkz99rG5T~+`Vl7Osy z=J>|xTiI_eX@BtgMt(Mb(4wyoe2=zmYo2~=-c_@{Fd!Yr)PCkg%B`di?MLph+cBV*;%{0-fYKz^ABu0 zE~xKXzWsss1LhA;@#49WMX? diff --git a/clear_before_scale_v2/img/icons/settings/settings-save-white.png b/clear_before_scale_v2/img/icons/settings/settings-save-white.png deleted file mode 100644 index bf131536531bda7c7f0470e4c065893ed22ce2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs`KDmFpr(Y2NxriyuI)sA>po(X$&%O_*PeQk~wwDW95NAzaPkJ1go_tx*8 zR>)Q$E-4WBHlir;&iCw?&0AN$n>=q0JHvUWHEmB1mau%#IC6@cyyNVS=t94hGx86Z-bu4LvX-+j+v$$f_DA|n XUyr@l_YPPH3lpinR(g8$%zH2dih1^v)|cBF)%Q3db&7< zRLpsMd$;f51PQl?<`1oySfdRXr8h9?9NX4gG(pmt5ktYj-vOVXm_4 zV7<27-3O<;+{}Mu9bF_{vsdY&I_tW5cfT^W+wlGGUUz%@Bw@bQ4}CVTj#KY{)B<+Y znzq^>EB>84!Pzb;lU6X}U?LlgVLIo>ANR>mY)?<$toqq}yV!J{n*PP=e@st?PMW-i zZ_{g|vo#rflVsE^y^8MWxxYQnckBMm?CF`+_b;nl_q^9-_n7qyyMVZ-+^@KY_OWU^ z?-o?Aujftqa9rhi?fNzBlU4jZ&zar1CtWnXh<{zSxbGzEtkfsn&rVOf?Y%#HM`qA` z?)AU9Eg#-);^*Y{dv`edKabGOJpY;mko&?eulzf~T~k6G$Z82UY+P#j5FE6tGv(g} zcKr%R5mf&EaPcm_8d-IO|H2+=q>7~X#6qfiW694Azf1(BHwI5vKbLh*2~7aI C$`oY) diff --git a/clear_before_scale_v2/img/icons/tools/tool-circle.png b/clear_before_scale_v2/img/icons/tools/tool-circle.png deleted file mode 100644 index 52a148117d2e6d3539e188964f673be54c2cad73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs_t0F1Mkez$nzE1{%lA4nP7(L z40a6qccCU1m{i+{4ik<~p z2lGyy7}@FXDVDV-<72n(lt7Km;U76qZk4ioX%|wnh)3(P_UY|6r%Fv#xh!@mZ^@}e zo20M*%5%8BYaPRsga0}9PdT+J&0Hzu&&|zw;(FR$@+SKpWyfyjla0An^?Z$ekKZ3Q zhgXr&?yJ^hl^Gw~#MsDu_tRa8CyJ+g=TzHV>-*%o$cpXztFZQyr;Fqtsr5WtQ)GY? e5@!>R)-$a8khok-LqZrBISihzelF{r5}E*ATFI~g diff --git a/clear_before_scale_v2/img/icons/tools/tool-circle@2x.png b/clear_before_scale_v2/img/icons/tools/tool-circle@2x.png deleted file mode 100644 index 524de8b17324dd51c8778868d8a68051f73656c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1079 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q1@pN$v zshIP2_E~SyM3MISTkfd5J+)wynClW2*Y1uDVv@Q|8d@G%l5LLJ;cKI=S~V?L8l-o~ z{y^B)4za)s;*JYyIU=nc7YF%wm$&RZ-u-fK@wq#B&l?|piYu+#U%A8h`or4v-VT8u z7lXK^Wi90Yq1tSG?(+?xt4--rya(McV?0xoPApFgSb^=+yjLTmfK5H?B_G> zd$uk8fbxUM)t5y#En^Ii`^xmZA^E^LsqY^fRsJP@yJcX~^+D``jsb^^M#cT}jk8sL za*K4>gFw`q!I4RZnejvZ&-|6!ZQlzhPYf%FI4YStSp zIcMU&GaPSpKCmnGn$2A`;;fZ|j+I5Y99wGjS;Gjr=-maE< z9LfGYS>O3vrr^xgN)M-Z+!3A_%bND~)VH6jz3#ZJ4z&DKULyBp!#5+d!tP4 z0fDLIH!nMg8)VA9E6uK-?RArZ`NwIs(=q|?a}`Rr9DitHrR**F#j17sO}5ovtUj-g z54y(u-gEjC*Le)?I?mw-lNYF)&toZLHV$jNHhs$FkW=%LU%re{V_xFdougQ4b~x&X zs_8!NJ%;CEc=J8xetL1PHL23`rNZ1rYj=MC#;m`VDLX~}gOd3?_1a6zbq?v+KYYG& z%HLVXCiAYm{QAz0saNi@ct5PZx}&F_F}&;DvfbisOFz8Ly5n&@uNTUb&H8iHV0B!{ zcG)n;X@{(@{@9!tw)aKeuIj`iYxWvXJM{I;PqV{osxIC=llE7))qlmuFfdPTO_NS* zeaPcHFt6nMp$#Jcyn280Y<}fhe)%r9a^Bn7FRs;fZP}xEKK1aPsEc!t8BF5+_Fs%| z?TRDYyS+trV=NzWG6>kzBh+TMgVWIA6sb!yb)Ti7%lghmDitnt7mA4;> zbz6Gh_;>s1sf`NvXI4BpGSf|f?_)sd$|K3mszUt7*uDyG{zg`!N6jKXng1@mHTjQT Snl&(!GkCiCxvX58kTe=sUpejzX#xYECKJ-=K>fqspA^GLi6mI z)Uv(CXC*Bw-jbY?RE%BOVs~eNuRu2oF}gk$x4upIVhFVxf&Tz{I{_|WEri@_aQ?zy0R5c+52BxF-2S!$_yzy_M(?nVegH~95x5WGw*q+M;R0QoE7O=w zAeT106}lHV@aNt__;Q-?xab!jTH9?l((HH?`Y?bV56qR4qW=RPg|0L~w>@m3`)s1y zfk&aMHqq_C_gkQkY@?IH2Z2xEoBFNH89FI^-p8GW(8sROknA8a?clHu^<~L3{T^l(tzSw`1G!poHC-0QLF6ri<`WYG1>xsOisyyti zyd~ib8%&apcSO4OCM$!xP6l_K4DLD^+;zGZ{sYvY(VX#aLHYmy002ovPDHLkV1nQz B_+$V8 diff --git a/clear_before_scale_v2/img/icons/tools/tool-colorpicker@2x.png b/clear_before_scale_v2/img/icons/tools/tool-colorpicker@2x.png deleted file mode 100644 index bebff88b40f870c967a8334b60dddcc1d484f070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Ry_jGX# zshIQj_T6sYLWu((-@m&Rs&mop)ak05F#_V%&r?8V`>50_?aY?B#AU%)!j|)y=LYK?k0J$Ei$nYj*Ex={%`o0|_n8X&3Xz-!%>xr>9RIX@Pjmla+1|qK6I*gV@$3_-V76iU)lhc+_wNR0!T;YZ z66&5zWStWJLGFQ8{lx2x%tyNSSv;z1d@8s{bjO+h|IPK)Z5}IhEr>j&H)wEkz>8N!7F0mNC8%$Zs)+dhV$~G$0{b_M4=5B!l;69pZ~rB8$N#!X`plP|_g?nM zziB3`Wc0*%?UYZm<3grw5qx|^PgmIWNpjf5%WXZ40=6{t3?DikxU3<>R z!2P&ky0X$-rB7=P)up>E@zt7N{Ze>h*xC2f&DOD%oqk~k^!%zfd+P)xSO1m0%+|+T zJ&pg{O`|uTmb$xK>;5!xuIY!W4fER$_|xB7|JA?y2 z+q~9ixZN<{u+Lvt_e1KA*PToEJwEql@28t~9M#qzl%IWExwN#ZZ13~0tXv(uRS%?X z*7yI+dEQ<-k?jE6T+LLych61)=@(q?{NB8~AUtaq(6~p>-rPxUJ}0>E(C1zA>o9@n5ppFah4}n zuRXt|p3#rFI>RByqt0ulSLqwYJHZ*X2TC7gA4>Mxy5yj?>{8_ews-g!GTzy2vUAts zE%PSL3%b>)>mdDscSnEqx}fiI6L_X>zdf}$KJ5LTtQ(}{B_y?V%sb+L^YBNU3j>xH N44$rjF6*2UngC*-9Krwq diff --git a/clear_before_scale_v2/img/icons/tools/tool-colorswap.png b/clear_before_scale_v2/img/icons/tools/tool-colorswap.png deleted file mode 100644 index 778a53d32d1e5959ad47f769c1cd9aa5bc0c31b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 zcmV-11Ou7$aV8j1ez4#)y|2r;LKl ziIOgqbg`r=NxhQxN$QmJcc}&`74cgn-6SJhr_3|iC+QKVy^i4kVb*^*wA zG}rG3CGC>*gUrhlBqb%)d*6V=l2%A+lQdM+$UrgeEZ`Mj5JMlZ2B^*P%sD_a@G&WD z2WA(;p%~KBfZu)KUSJh)c7Zmo2Yz)M{{Xj*Ht|Wo*FNCxA_zy@6rjy*9S5!%E#e7a zy$`exsL9Z02Cxix9$OOM0q+1yfeBgcu5z14fril_9tP+F&X4IP1Fb+m*>M_<*;!Eu-5w?0~W{hvw#6?)@GD~_)IM99VLAlCj&d2$a?o$KK54l%nSgF zV!E(o-YNz0W;eDrCJ$@=Glp-x3M@Wn+Q0%@{Mm1@O&{ddz#%LzjF@er_w)kr#5(%q6;Bps48HPW|T(h*6Q%W9dzkjLBgxo4s^ zMU%^(i^wXl^nCdcH#bPwT zHqx`|RNxCN<8A>S2d>3x`Kawc{vhxya2rNRlaRDpcXg9-4TVZSY8Q=oob?mT_%wcbQ?0yO9XfGAG|f>dP~FvRc!%YUtqFImSVEs?Za(&@5qB=a-$tCW}(~m~vAp~cw%Zni{ENZO8>XLvSY~!s4ZU=rj z0r_mCgKj^tq141ftHKV+dr3z>cGk>BJ{RfGJ|Vq`D=G14s{`%;?!pceOR-~LARp?H zX-*2@ksS8gu!J<~#Iv3r&62cL(hEuzU`3%^ n#7mBo_8*Bc;^oE|@p9u|oq8rcI!Uu!00000NkvXXu0mjfnPX^{ diff --git a/clear_before_scale_v2/img/icons/tools/tool-colorswap@2x.png b/clear_before_scale_v2/img/icons/tools/tool-colorswap@2x.png deleted file mode 100644 index 91a9586018d4fe879de54bc2aa89641ca3a60aa1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2844 zcmaKuc{me}AIB%x<_zDQiD4v*qWI=W=GxIlQm$yqlyk8)$I8`0xi?XW)M})RC0{ok zaz-|VgehUjk$Yl4zu)uw^Y{Ed&-4DgpU?4p{`@?zJI)wKX$e&c001D3fZMt3`h|ZB zD7Kq_EU?{oO@shLxB_?M2GB2gw+3Bp42cJ~)_>C_2tm@kG(2=(q^2ziNyM#N%m#Fhji4){QdEFh+cJsuG!8UH4v z+SjGfP<)FGoy&3&eWfvD;!9bu71= zb8DKAk+Ikq7{f`i ztV}H;sJ_?i$TmO^p0H)xkJf&s>LQ~X?(kWC&o2H3%q~?02lT1W2-hP)RA;lrH` z(KMHGeCEo1x}%l{gaDGFR+Z5~)V18IDCDM@j=COiZNEh#yzU&k?IA&M?-+(1bOM(G zo?s@0ba-1LcfLd^VR4-!n?_uV7Lw?~r_z>(`qx7MhKHPc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%D*XITw2D6LZznm|n$fA$% z{qLe-j=mX98LRHyVS8UQ??A!UF(>xqf9e&9iGSLB-Qj0_yn^Mn7JUmBoqbJ6PgnWG zE9{UASF&YnsOE01Rvjtf?3iSK`n$AFIJ>AJ%+Fdq=&I#-^GiwuKvqXNFSmE9>-->6 zF9yGC!zkCBp!9~vUU+2_-`l+O6V$iIg zJVSTW79?)^^}Gs2GJk@~{#+OTpAWqm(_)LMHN+w{hkv)H;|^AnNnx&d$c4eR$N;OU zxR5DktM2Dx5iNFsW{zOE5t0ODMAa3ARDCoCWh_u<<$)1>w{cZI2~o0bm&*!29${oN zhoQVQ>fzw!pXE)Mz^V}zDC6f zx>1`?oTt+EP1Tg&Qh}K(zJvA4yEjZR1?$H-&4s#V6rHRXiPyt|j==%wB_eJ6yIanU zqtAbQTQ?X-&~MqVDY;lX64_rFIS!YG{L!0)XufS0IINT|Ng(EQj6NnmYpoXR4DVL^ z@XW5p?_&J@m;C-8SNxdF?sFvb>%*0$a)u8SW=yEn$?0yLE~C-*j%N06$;bH;W9-Ud*o1!ph5399 diff --git a/clear_before_scale_v2/img/icons/tools/tool-dithering.png b/clear_before_scale_v2/img/icons/tools/tool-dithering.png deleted file mode 100644 index 00180e693e4c9362df6826b1449a2cd341b77434..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs@(YFp9fMD-I|7=qQ0*>Q?k81TD1?Px9u{|^1c6l WbEhxvJaQLkJAlpinR(g8$%zH2dih1^v)|cBF)%Q)dAc}; zRLpsM>mui210IKi%ToSNy(=o!5y!Jr`oN6#eJy=kueG21{*r%B?*qew$xX*u`Z?u< zZPY4!KFq)=Ft<5B-j?0Mth&C16T5P=o!&Qd%{Lu=ceDk&iN(`}j2~jR@XpdZ-~Yw? uV0XdBld-2lFPAI73%cil$AxHqsA~-1K5X9fb_p=p7(8A5T-G@yGywp!hnklF diff --git a/clear_before_scale_v2/img/icons/tools/tool-eraser.png b/clear_before_scale_v2/img/icons/tools/tool-eraser.png deleted file mode 100644 index 263a9c0435d1f8000dc4bfbde45615b7dda3ead0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs*TI%VyeH8!ywdpnl4Zr_mbn3ZGox}>M972#p zETW=u+`=(RDaP$S0?(QoCmjCcU)Ls}#`s0v_>##1GeJ2k1hP|Ex#Y<6meRw)p0=Lf zC#_RiTQys9MfQ>dg7ud_8rElQF|Ubz@mOe!cujCd`kwqRos73Q@0;9`de3~f$R+w= z?E?SJhxFw>WGg;sei5C(cB81}K7;4n4`Kz=L|-#+X1=~n_CfxEir5cEC3a;x58Fd! z&0c(7b3)c2yeR*?KrQ2z*A4w*7e0&5ySbJ*m&^V{mklE~+xfRY-DV#+{^ReR+*x9p z2cs7@p8Egz{iJ!DA8$K)|MRXTe-G{S_UxV{r~Aw}N^9;K@A(J1T&FMl5t-&U*DO}+ z=Zmyf`-W8KFI)Au@b2k|&tl@$U|jw88Bo=;w3S3+2x( zds{ItGxWA*#e^@ff>ua`S0r~@M=lh8h(MotZ{9Tajmc0<2gV$Or>mdKI;Vst01V69 A5dZ)H diff --git a/clear_before_scale_v2/img/icons/tools/tool-eraser@2x.png b/clear_before_scale_v2/img/icons/tools/tool-eraser@2x.png deleted file mode 100644 index 1fc023341ed3cc554ecaa7a417b5bc381bd12325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%PYc)B=- zRLpsMdvBIVphWw}^x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3|-RwNml z?{BS8w}*C((e0>HJ*uva8QZL$P`lNOMwg3Tb)PyuDMK;#<_h)AAg^_sI}eZ5J4Uyp z)1iOQAlp~L3AJgzngCHYys92WrhHAh{ESD^@h3wXb<&W;5#GaB*SSmbCqgf z0Z;?<5iO{{Sd;&=N!DMh5_r}sfoH7}c-AU`XRR>{{uBS~ZsF`-m@WVS002ovPDHLk FV1i-nWd#5L diff --git a/clear_before_scale_v2/img/icons/tools/tool-lasso-select@2x.png b/clear_before_scale_v2/img/icons/tools/tool-lasso-select@2x.png deleted file mode 100644 index 17e7162fa6fe4ad97d1b255a1c25a6b40cdb848d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmb7FX;>177Def~<-VnoWeS1gmbql9S>^_!W@2fj;UE|;;RJ<-1-Xzo&r}3OP2QAP z-=yJ^Td76Pq)p<6QkqMernzFNxZBYG`7!T)-?`^I_ugOk$2pAC{@!XTMk)XRKn?EW zaYn`$e?Un=*2g8H5E<vzgXMQ%sOP{vppy+z$?;vg z#<KJ zvI2Yu^xeA(B{%4X|EEcPhzpbKcF}G>60u|6cIL%P-H`dp0ApJwLJh;bSQ;GNbpXB_ zB7WE>F~b+|CPTJy@LXf*@8P0s*0&Vqd58o2Mu5oRPFx<6FF(vO-Bg5MoBBHJ1*dw* z?RZhuc8w#HGu%!6GC0DI49fC2(=ZHZ7%iZp(qW4`F`E1Ro9kG<0w}H&sZ5 zsAY%?Sf(!Fnmlr0}kxzO#jm~H5AsNMtx$@LTpImUU z)qy}J|E`#N2)pTh?4@fhLIgbg$LL%+wJ45e0nW_pvr6gAWFKAbbtqnp6B5xOHbybJnWQ42vk9w#^(mhxa9@OWx_L;F2Saf%Sm9M?-90&Y>EPPVc1w9l%cy4sTb_r#* z=zy!Jc%^z28)1jnrv(ZKq~!QqW`)lXH6I!J$k9-Ki`{ccAf*I`e+FM44v37e4AQbsdq~cC$bc&s4A!r z?&>fM=J;+uhEes2J?Hf6Fl%z7WgbnTdA3V*T2NJzgZ{`xWZ|s#I^;xgN<-p(x|A69 zS{hGts4*U&q3NlAnoLvppmIgNuw8A^eN7IX_#oCA=RU83L{7Y{QJ$P}Nzz-ySbjIH zd>=T6u!H7&#Onyzi@k!9o+&+ny!S6lf=IL$?w1+-Xj~DRZ!-_=-gz*39_>`wfjy=7 z8(>H&38Mp^l|43MN6yTa^4D8S5E1EG*>$bETvFOZe^%13mY_~_dY8B5bvz`aAmyQR z*1fS@$=B${n)`184!3ty$2Jb3AWt9E`#j|tS`WV2P(-pr-{-U*g9C{s&p3474g1pn zQ4urKkBiIiu&e|f9MBrP6@6t_aACM0h;!T@8S6|>EWh3o8pD-x&%?{a*PBP18OJgY z&kAp@{GLF{%nsepov1`q^jlf1ACCor=d)`Zu!H93n=LN3zz`cS-jC9=h(f2wRzNV<4;^W zh;vR+VzT`KO)>ol7z#5TIo+vDc!eBUh0N55q<&v&rv}bheEX)keoDx_ZoH^Ed3R`_ zUpmj&*!~V38TGgow7d#i)Q@*NlrF7s!uf|w7ft;*_4#`+T#)0>{$gg?RcDJNjBX4R zmsMeqX!wV7J51Pf2w-5qHqI#Bo*+#Rr~R~*46(tid7k?J4E7%^d0k^4k?1lIb~#Iy OF#x!yzX#tPo%}b3cQ?TR diff --git a/clear_before_scale_v2/img/icons/tools/tool-lighten.png b/clear_before_scale_v2/img/icons/tools/tool-lighten.png deleted file mode 100644 index 74a2ef427ed521a84a52f2645d927d245c6a7c54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{siP)5i}z$^mT*Ua@83_Jr0V9^4))WY@3`UcN{qXvje;2rP^cnVB`+rUHMTi_2I z#lpve7Y)Y8z*a*|4x9$SalLy1KcKoiE`Vo&y4MD1TyOK5w?a>-zK9pV-9X(-BXp@5 z#;=VP{IJF(^rY_rzaznMUY&sFRKL^5hPpQi&^WKW3-CR!@g>bKVi~)M(53c5T$Wj7 z-^)Krng?p0r0wI4o)uZZcf9=6%W<)+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a9;9{5LneD>~g;{bRs!gX%Ez*;MirtuWoWScxR<|7>?uvGA zfwgL(ahLEL5MkWbqWbiR#OLNNaTQ`S#-I-MrqvQS3DGPXpiRjQr$*u{PP zhIrX(h1W)!lqgOyDi>G8QfW`;PIOZC6UB{JUSJGvjc_WqNyG8Pz5p-O3hYb#!j4_p zk@T5mU*Kp-qgqjcHEMWB!~J`kGqZ`T%!^b<08v2)Q+8SY;Bgj1&7jBam^K6KR2!t@ z89t!=xU&AYEUh{J?17BMJY&Y}9#+vJs_m-dT6RtTqW%jC$z|+ztFGh!km%ot`UyQB X6>&bg(P_P$x*#X2E9JJW-Pge*YBig>tI?d%a|5u&ry9RH(febncd9{G$Hoy5LFY6XQ4_B`{?ks%N`Lg+=r&c&qdO`WmWn8*8V-Kr`3 zJ*0f={s%pO^JELlvBO_F>zDN%Z@l~D$KeN3uiGq(4Mp!Sj;#}nV4P)_;IZ){-;R4h_VcC zOmF`oecK`Yqj|#2Z~tz!MBhGQS2fi;;kME`&N&h3U$?xLn{vfKuZ!la_FMzPCKYKS`|S$;Yjc=aM;Qur6z;exNsV?-x_oE^)8>ZyKuF eG~{MMQ2ykF`%H`%Y6Jo!l)=;0&t;ucLK6V$U*J{% diff --git a/clear_before_scale_v2/img/icons/tools/tool-move@2x.png b/clear_before_scale_v2/img/icons/tools/tool-move@2x.png deleted file mode 100644 index 78fcc514a784ab07e6fc1522c39063c83b9beb18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1015 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfc)B=- zRLprh%Q_>(QKW6Zugio8R&H18tsYAg6vdkQoh~}DDr@W$5Ru*}$P*ED<3{Gnri8_U z@~s++S~cvr<2y9Enp%HwboqN+**b$aC(L~E*>``w-`V@TdBWYDvn?n08*hGo?oQCo zm}3_&PW;Ny)y6IU_|VZE1%`StJwz}kt3Q-=kpHmj(`EO4$M_vI-P31fH~yQoE$%@H zTe75i<*5m|6Su{jX|PHCp}%1BvbW|23qM(j8y^T_J7TmYtSmP=hi%4zptj>iTkbh{ zPrbiUGJ(lk@?K8cv9tzGozw~)=VVE_-FZNuUVfd?Pb!p`M`0PT63Ri@w3_+Geh6A3m=;`WyAY656wSLPpZrdmb|Lo@jc{t>*=;JdG}1+` z;)y=Ol6)ToZm9QFa&FAoFd673hjmQdtQ$`quz9dg;Tp%96bly4=nFQ(+_jm V9miVMSq99c44$rjF6*2UngHyjyLSKp diff --git a/clear_before_scale_v2/img/icons/tools/tool-paint-bucket.png b/clear_before_scale_v2/img/icons/tools/tool-paint-bucket.png deleted file mode 100644 index c3dbd17a85eeda98d139e7e2e75eadf6f0298c94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 741 zcmV+~t7pMW9mEbwx+!Ty(osq4l4_Ec zC4H9kQc|@;zSaVKYy?;#U0c9;&;0*1-@qpZ_YfEY_5p{1F&@EiDLz;4?V zunnvNi+RHP1RXG-uPM-{fikd=7rakU1gry_Kz|G9x^HgqzJbpT<`Xaq30t4exc=k2S5r=B8RKY=Q6 z7r0;}Ki}lD1zZRE+U?&LdK6eAuIZD&5#SPV8+Z-W5+39@P)dM@cv+3|2HydEvkot( z_ze)({4{XU8PyUnmjHhwZ}3U$=$S`s-F5>%n!wk9!K^uaHd$xvc+YE6Nfk+Rk_Hm) zPiIZy10LCN%p>|@_0yq>Bybgbd_yeP^ z8gR8s`TsKC-C-*YOFAZLRnjX-8{JIqs@vef)U*Fp3h>Y>z(cD553K?`vRIqV XFPhTFkFG;n00000NkvXXu0mjfazj4v diff --git a/clear_before_scale_v2/img/icons/tools/tool-paint-bucket@2x.png b/clear_before_scale_v2/img/icons/tools/tool-paint-bucket@2x.png deleted file mode 100644 index aafd114ab3fe4cb3250af545ac3d9f2826bc622f..0000000000000000000000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~LG ztjZ^rW$*sg<2nkP)1{+dTLz2LSDTU26ua@B=!m>%H91N6syf;usq++56VskEYwso` z_+*iGV-KtG=yTs-G4B=d<1Y1Xxf;S?f(QdlgH`C{@$D>nm8`vjyr&W5gYIaw?$?|s zPt4yL-4{^YA<6czx>;?6X1_CA!JC%w|3MF$7-LDjKo{A~oTZNzXB)@z(q8a0% ze{<|sb;i`%Q7-=n D%c#WT diff --git a/clear_before_scale_v2/img/icons/tools/tool-pen.png b/clear_before_scale_v2/img/icons/tools/tool-pen.png deleted file mode 100644 index 68e3b7e7d2153530ad2750137f1eb9ccc9be8e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 670 zcmV;P0%84$P)$d$JuZRgU-3M#{b3m)(odv!DFMy^-DwR{f8n6HycD!@ISKu|U&o_2V=%c`A zU0Zzi60BP1Ndm+&N$vM@Dq3i90+|ztV}Oh=<|*@idk7+5>Os7!8?H^ zOkMXn-c5|20?kFARVMTaOieEXrycLEg}#sH>Jc0KB=7}Tv{|q9ZdvH@5|dO4csH;L zRDmOoH)f$H%7iWhya!XyRp5~0jR4!gJ)qJ^;Jv^)=8Vzdcvms2$HN%VMZo(pTlE^y z<#?AcC&0&)^dgoC{seRW=yS%eTj*!No>@~07*qoM6N<$ Eg8nNh@&Et; diff --git a/clear_before_scale_v2/img/icons/tools/tool-pen@2x.png b/clear_before_scale_v2/img/icons/tools/tool-pen@2x.png deleted file mode 100644 index 5a8c1569f06a935e560213ed7d57011fedb34a3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1488 zcmbtU`#aMM82|3LZJ5haE*WwQ6^&D_QKIcj*2r~IvP~AdSeV3dNvMc6cZ<@F;t`JP zbiyi<%H@$u9HXT~W~n&D!I^*IocH;B-p})Xp3n2V&-4E9UdLh4aCt3x007`1#>Gpb zXSNBImGtSagZ>hczT^ygLnRdtC1yxw7#$OENs=GkCdApKBvxW-M!EV&ou-9GG0!td z0F%iyCsV^O5zf;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NaLnQ!d_3p9Ft;>lW01b7A1ROXa#eO=N8N~I^IDV?kkqo1bNSHypZk zf{_EV93}C((I-2`)h^xM3z4;!iF|O=Zei~mE7vuz;fHsjQ{OawVudgMGyah?=D#gW TIjyBB`Mv+OuJ5!! diff --git a/clear_before_scale_v2/img/icons/tools/tool-rectangle-select.png b/clear_before_scale_v2/img/icons/tools/tool-rectangle-select.png deleted file mode 100644 index a613bd9bc720b3e27d148c8304e99e68242bb045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNso-U3d z8I5nRALMFK5OE3Y{r7)*ytcWkiAT)r8Jl^;4=>?=8+uhHcQx}FuY#zi%R+OeJ=nss z{OzM%pIetX-_O5kcJJuzhY??HupHf1SlS=#d%FJGwnEd2t*=kUp8|_K+5F}AG2_sC zlU6#N4q2GG>Vi>d#^&JEo6*G^a${-usZbNYG1&1Tl*mWc}r@~Z_pj=|H_&t;uc GLK6U5^lHig diff --git a/clear_before_scale_v2/img/icons/tools/tool-rectangle-select@2x.png b/clear_before_scale_v2/img/icons/tools/tool-rectangle-select@2x.png deleted file mode 100644 index cc2e56502fb578776a10e0d4ef09cc1478d7afd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%QydAc}; zRLpsM`yf|SfPllro`3(R=jwY1o{#oKMZ z9!zdJ&eG2*CyZA>j(h#rSFF=>Z@jlpIt12{%Y9$hCNAUTO!Hn&u=Z`AENgDftUYOa zvIT75?xN{NZ++qqL3q)XZT`h4ZBIaWo4qa5ryDhbY%kL^6b4& zXS4TA2axl2PniKRKI~mk-COI^Pj;VChN#bZT0U#fL5O+y9gpn2jp`ShB#*tk&Y}bi ORt8U3KbLh*2~7aeSEu^` diff --git a/clear_before_scale_v2/img/icons/tools/tool-rectangle.png b/clear_before_scale_v2/img/icons/tools/tool-rectangle.png deleted file mode 100644 index a2d43856afc6ab716ae5be254920620bc8f6ed80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsmdKI;Vst0CFf-6951J diff --git a/clear_before_scale_v2/img/icons/tools/tool-rectangle@2x.png b/clear_before_scale_v2/img/icons/tools/tool-rectangle@2x.png deleted file mode 100644 index b1897a133ad96ed421918d0f9318283767062b8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q4c)B=- zRLpsM+mNr>K!D+(z{mgkv+Y!^*c{8`5*A*4neirf?bpuFdw(8a?*Y!C())5vS;_F-t)Kb=gzy- q0(P43yAR9vpH`Vg&~<3$S~JwLv+cDLT4WClI0jEwKbLh*2~7aEM3)u- diff --git a/clear_before_scale_v2/img/icons/tools/tool-shape-select.png b/clear_before_scale_v2/img/icons/tools/tool-shape-select.png deleted file mode 100644 index 55d6400f94999c5a2d4ed8ca48bf3d990af38736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsZF#?Utatoy@AtjxccSN*+lwt^?7lxdJ^k>*Z6SKfwWZu5s-4Hx z5UBj1P{H~&8^V@sKV|X3a?O1P?gO6sjT^P<)X%JMY(F6Pf!BiVS{F-L^~KDlm9c50q-7G zy9rxQ@+UAzFtar-yz^2ttj6Q-%Dh#JU#%0L8SwmYm34mI)JH4yuik(4(EieVr`ubu z&fQ>sdrBB%1p7W_W!dWLl^S2v8>swFBx7J>%{kr#;%ifDq z!d_0#Z3(t)k?m(UI(l??U&Oy^K4OJylODZg+{`$BAkl;)3yp)i1AVt-W;a=dIW5ZH@g0 z^b`1gOfp_9@~JDo?Waft>%M8LFWYXc^Pl4PYqIEU6*&ajzi=t%+Zj(EfRY7+r>mdK II;Vst00wgYcmMzZ diff --git a/clear_before_scale_v2/img/icons/tools/tool-shape-select@2x.png b/clear_before_scale_v2/img/icons/tools/tool-shape-select@2x.png deleted file mode 100644 index fed2da90297664784cdc45401ac097e352cc16f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1288 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0S#*Pba4!+ znDcgaWQUBa#PNFRa^*Bb&g>5?fntk1LR<`mT!jT#MNL?0Pj&krv{kmNc;b3c-1S36 zfQySj%_p}b!n`ZEwNgYquQ-H=6iXLWuV1~JxxPO3 za`4??Qw7fBeXOqP7ffPy80y`T5YOx3Hb2%X{rFIC;lpD)3X%y6FY7zh-njL^N>}wu zy;fZHk`;_U*mg{wB>ULm?6IYD7;EkZZkLSUugRb5WA0V@t@yzwz0%c<{*AA5f?xXG zZCT&(==|azEDuB<@IHurV4NWSLHc1zOxo0hyLy`M8L~J1aCyM>z%${a;J4X~dcHHR z@4w>tL+gRolm>{XO`Jru}~2^o;_YWVr2T3TTQEHeD`uiwS8Cp3B~pMRxJ9kd4_(q z{6m#90#VbeH++@zge^F2Rfy9G09Xrca@!T|Rl~e#zya=W$2H_&(TtNEOp(e0Snerqk(nNBiEC+85Za zl{;nhKr*QQwfBXn{%v<8ww|+Bxm(>bP1ke3chr@ScG6bcZcZ_JziL}S!}ErlI&mC1 zuaf8AZe+gr$>@Q_gY_%k<=tBUerHhXL!~c%zxIai6RnVtU|6Sg=gS+FFEMS4-m*1% zfAZcu7wGupX~HZ{6#`pjE%u)-ljhvSxQ;FE^~ZVnO!-fzCa8ys*|~Z@(pk9syY2_h zx0jM{GF*52DD%PUgW|)o`nD_Pj;cRCTF){P{d*#JqRFJI^YvajYTJkd$TiwjwC9IR&7MIG4POQK9>0kEDH^JZL&pMyy8NK+adY46;*4H4l zM)yq>(>_#uRZn24klvvXZO*$!*`}@6vh$n!j@y$`Z*>c8xn&dmEo94iCePQZwO5yJ z^}ck}RmS_GQt-*X(*bJ#nlo;nox~RVoWkZ#HqQU;D<0OMd<4H=8)$hktY7ELywggWCzc?hnUK=rw1`tS*1y@fsP&5Dj?-o$`xf%wWS^}R9dyak zuK7TJ%fV^Zjh{J~pFjSu!0N-$zsze<&XPaEm7 z*PE`-=G=Um?_{0M!{^h5Rxiv;zbtk4R>aK-W%Hf|9g5ihc=4{kEsBTxm;bu3X>wK4 zo1jB~Bsq-v(+uVu2yuI5BD_;5By&ZyZUK=Q7$dvSsAtHmR}^`ozi0ul)MD^-^>bP0 Hl+XkK9)wk< diff --git a/clear_before_scale_v2/img/icons/tools/tool-stroke.png b/clear_before_scale_v2/img/icons/tools/tool-stroke.png deleted file mode 100644 index 5ae9bf3c8e4d915ad0578e1fb472fe69a3401675..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks?IP)noV=By2_^eFYF`c`dCc`a(EdL~cqMnX5M7u1jH;*>WjfWX=-ChIqLjDX(9J>xpwxzte>KpZ(1wM#HfiE>^dn&#}eP?K&p^b!AbM1h}#qnh#wjMYS z+yK@B-8u4RQl8h^_Bieaz5o+|{lHaVHSj4%&QZWjU{<_l1M~a(Le?G7Jm6+8@oT_J z;KM)UXo+A+$f-ar`dz?%U_oC=vQ~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!A)X3rm=g-l4C zk-vV1qNb9Z)wIYx*TqWRnWK;C{olc=j^bHQE?au2)KPa({X_sL-(a75Z(Qb|5_l)E diff --git a/clear_before_scale_v2/img/icons/tools/tool-vertical-mirror-pen.png b/clear_before_scale_v2/img/icons/tools/tool-vertical-mirror-pen.png deleted file mode 100644 index 618bd5a6f7b55f1962a5437aa8100f9344e93fe4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmVP)l4#WAWIz%T1OBBBQcK@czA42T z@p^u$tG;=>S~>zW9aWlYfUFAOz7@cID}eh}0Qao`?pw70_j36O8TYLKUZ5H!byVwA zZ{R(WMkEbO>X+0~u_sV;BjbC$z&LOWIB&)|QmKEvfcFBwfE|{19~jL8-c@7pZs0qx z#q!#Lx4^zU;Gb#;zR5s$TV69T3|s?d+8S5laa)ovUA24yDi4kxb zctc#PF5q1Tdb{N<0iFY=m{>=Jf+sb1&+;PR4DkY6T?Kq2@D12zc`d|S-q|eBuHZ?# zX=1YCOTanc1F)t7_-5b-u-o$H0}p@;q%4oD;Eg5@naLCQi^PXilDPyt0)7IAtub1O zkMhe*a=5s(G`GVqCN@YKl+-F|T+(q#O^UChwiZj8ZTd=5yQCp=``aq%Pl~z!SB8JP z0JsZ026}*pCd+%uGJeQBj{*CMcaJNi*z$@h6}vS7*MV0|=vf)~n0fvU+$P>eXB7br zD1zJ{R6e_w4V90~$~ zv;hnXui{hRpb1g+*NY;Oinb*C00d1{rD;axspf4I%*kZc{?l(z^RcN&Rf#54G>ICN z5JOFgNQwrfq@*BXFT^EBMo^*=2}x%v-g&}7psm#a>PJFq<=YB!qv45Nxfz4x*o#iB zm=V+%hS}(C@Tkhz4{6C&tl)V0F7b z=A7kJuh}Mz)Fxdx|Ea3?Q{pUgPVqHcrgZx-88?zff9nz#Be|d^e>PU9Fg-j@kqvZF zB2RTWAzm26E?m=c9boQ!EhtF*k8*>Dru9jGt?ullap=FE_c#pzv{U#dUg#}+AkKAl zD=Jol3~i*dc}!Le`s+Gcbc5xkJeG;*IW%tJz@-Lr;xXL;qDLb}Zv;&Ta3X!6w{%&X z1;N5iq6@Kb$JpcpTj}Nu=T2Nm!|rt$FmCBbP=v-{-C6QAO!-slyf-lnOA@>6JX|I2 zH06tQHY24*VVCC+pn9C`C+qO`1?!-uTIacjs224vm?R{N;p_sd;?~$dS|IOPpJywnufkdDX2z_E z_wqd(R}nTn$ks#q7F>LYBnJagf}YaQ7fc%g0?1~p=+wL0yald_dPHl6vq znjQbvMF{e3jaK&kP9{_dG{9l#X#2*JIKV4UzgidWKYM|1BbPy#4q%!w)O<@CtoMP0 zu>zjHmei!VnQo@-)MhtwaQ#@6hC#D_T=Zg*@RV<%^^hl%2wm$`{Ut2oOT=ypn!tDbz0txd zTY0)a-{O9L^Bb0WlN-$1Rm1!7sxI@K3Nlnn&p4cN4R&iS7++kO3@|af=bVWO;$bT zGh-N!{ciOexBG8e+`mycS22DxwZ8R6&ef80lXShc_xi8ly3_E@38p1rvC7IMYV zcIWv9U{~2ef@qKhAxfuJ0rQad!-{VU@##=ImKJ~y1MXW+)hwa<0_}4GxKxaYGEwH$ zHk=MO>t)mkSAqdM%jKYAPavWhcyFA}d9DfjUiS(meyqcUeapO2vM#4O4L3Ab86IHO^T%rhTa0{nun{>(Jk zM$B3!!Fz9^VmIp`(+@ZldI#kX4o+{J)57`45{O@>L)-9nZhPl_0F8;nP~m52&<#51dW*%v^H(FWi!yPUH=M|nBYPhR`5CVao0V m*>pu=9b2Jk$7)XPeazubDqe5a+0O;Kn8DN4&t;ucLK6V3*lrI1 diff --git a/clear_before_scale_v2/img/icons/transform/tool-center@2x.png b/clear_before_scale_v2/img/icons/transform/tool-center@2x.png deleted file mode 100644 index 64ff4e92c54e43837e2c881f2d791fbdf629bbd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q?dAc}; zRLpsM=XTa12N8$B;9vju&)K(KWuw6NGcTh0;|y~64Be0B-v7=%cl|~751B0eoN~f8 zY85^oW;`%FnA~(6tH5u$S_bvH`kT9C@6?z4zWBM#=pk5fnq7PR%vX2*=m^6N**LZN zegFRGr(eSO_Njmj%$a2fk$ofj{KL(4z3;8&Mc*^_smOWyz|42u-bXTazkXGGc|9L! zmBo&j+@SeY+~4K@ho6Np71Z$6tI4s{Cw?=r4=taxA(m;NMRurqkN`njxg HN@xNA$;ZK$ diff --git a/clear_before_scale_v2/img/icons/transform/tool-clone.png b/clear_before_scale_v2/img/icons/transform/tool-clone.png deleted file mode 100644 index 0323455896c90e9fb849ba6d71550296436f6278..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs9e$o zIAs~O-nhZxXcOG&rmK=+C}w<7>CW3TaWbOcT9ebKzn@(xnU=TjWvjrSexJX&joV5d zZGCwp`*P>?Wy0%y)#GOS?O|n}b3EJT5UWpmdb@zy&#z7#&0>|+P8`<{hvl^kEGzo; zLUhX3+BpZ<-aTM1duTDOfWg0z>$JqO8FqfjqSb{aM|&PAt}{D1r9=NwOx_0;oyR`G z7y5eomKFNSX5Q$RJ9aMP+_OC`Ki?XhdSakw&ib^Ye*T@MGrD~lEwleD-LWw1Q{bHw z$|oZqZ@&Hb(uvwLork!64_X@6aht1smpaYM4c( zHV3*+2*wL#ciJBm*IjZ_f789~FKwDDH=fW^3;)A-Z;NCC&+3XxW;>UJ%@j@FH~-%C z4SN5SZ4RIP@>Za1S-yMFAFgv_b z8lv|PXn(wraX7C=R9`|kaFgYK&0W!TxmF)lpinR(g8$%zH2dih1^v)|cB0Sz+tba4!+ znDchFZ%1gV#PRyYX)8|}tVmV6$u8BRYZSZ0(_>PUhprHd^W7EQ8(P^q165``bSg~L zjqzwwlvwJPpx~i6)hYLg*X9*RS3H)e)tDuJ;`O7w&gp&MFP)k5{O|nY=XUlMcdGe| z|DE4!|7_oL+wZl0(HxBK$0uyM@38vep`$wr4E17qxWyln%Y0b+K&C*VLaB7)HnH5& z*-U$w&aloq_2xhO4Q3lo9p<`CdUsYGvS*L`F@L`$hfRL$j+}?(Op6<}x9X}2H57r3IH|lj;cQ;ON5O1tK(8zYP zobhs2WIS_v1Lpx-2lfq&6;c_}2Y$a(;j>-NR`4cwiBO&S2crV}LYX-%Ic)D%#BZ{&d_kDojii4%fZcLj+94d}I4 zV`5#;@H$9*-5<@3#;fESZ#>$@Y2ozeLvdr}5wq^aM^^8TZ!|sd^UlZL9kEO| z{Z?dey}n*>`k!^e*A+hJEOxoc&>|3&>wV~LNvpuK@5ak*TRymPB$jg|W~Tk0AaLlA zz#(JBmX9<49?tF$F5Y_I^GD?GJxlYR*_^KD7P-%CeDQ4Mae?{?uM!nE`tA$~y3aT< zcG4@CiblpibF2R@-%#cp#C`so#5~^^?eo4>=ch$E{Wv`HdAiW`Q^sBQjORJ(*T{T) z*Cu!6(C6^I^_{P;t1kUe)4#3C<0RL9mpNI}{JPry$ep|RTmANA&g`qo+Ixf!b55xb v4n6(Q{8(4v!=#uU65@KtTD!?)?qucmIe+e5rtvFa8N=Y|>gTe~DWM4fvsD)G diff --git a/clear_before_scale_v2/img/icons/transform/tool-flip.png b/clear_before_scale_v2/img/icons/transform/tool-flip.png deleted file mode 100644 index 8369b2b45723265eae138a282ac24baf2cb565ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 708 zcmV;#0z3VQP)*9Jn>8PBcGcy4vZbE`9+Td9pN*PiRga(zBnsf`~-&WlwfysIn$eW0+! zDBvaVCAL{g;!>JPsHY;n0Gy&}yND}b5jcx!n2PuT&4!z(6ed1ODTvPj=RmKlS(#G} z&j3T<1#lVKGzIZ}9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B&5$`obPphjv#ppdG^`pxupCU`nphQ zDgCx`MwoF)4WfXm!qE`^k^j83Xd29Dca#BlPuE{XAGT%$_AT4Snm!wi>(0*NxUE#R z7||`ww0##gA=kUs85+9^&m7n_D47>8?y(GJQVa1C=}l#P^NgRLuDY7#;+T$gtf5#H zMKOw80nN8l5XX#xt1D+fCf>Bmi%B5&+LZw8**kdy(7lq#G?73~XdD70lEDNFe)MaF))EfNbXvy&;GoP4pdd?xr+6oTS#HgDxadDYU(CP?H=V-kdxMeBv%8{F z@1F`UP>ea<_FL^+tFIWS27pg37^DZ7LtXDAJO131-KMcQs;;pK({uTCfOATuPzu1W z7QEBF;%Z+0SO6*3s9I`zbFuOWpn(b0$NAQI^Lio=tCm0BJrsBWv{$I9rMs&-jfA*_ zW3uY?hE<>%#1_Y2gZQSFv{dK)Qn46~_X8w|rDbICi{4=9N2vSKhqp&etSWu0GQ(5& zY#%1}Hw!cnzJKGe^-^ega3nUX-eLXHH|E!xT4(&@EvwOsqFv4_XMkqqE?oV^kursK zgn0Qo+r+y$V;2T%Z7w5lHj=j=JF72-I%CRpnl)6r>NK3c+=Nv=Z*{KB?tX`TxLahC zejm{8iVHvhB=6r*tXWNY>-EC>S6*SE6x+pXst1Bp{ZA|}Bmh>Zv3(Zj_}l+on3D&H z+jr>j-_eH}BG`pcK<)Q*cU)hJ+c4I7zbdaN&11J zy#J0?zD?7Je^LpU^q!3>?#n`DWX*w*gq=>uIU;ZhwN7=>jWagSBmlH8MPRz3weJ0I zm{%sYT?v3Fk-xkET`{jBcNh7mO-T+0 zt9JSiRH%h-;n(WtDi00f?S3shaI0%Ru$vXV6XV*?T0CeW%^IKsXZfYKLEftBa{gZ18SlW_I08|GmYOM UGM@l{+rV`ha>cU#C-2n%0?Ip#YybcN diff --git a/clear_before_scale_v2/img/unused/circle-dark.png b/clear_before_scale_v2/img/unused/circle-dark.png deleted file mode 100644 index dec10e5ece9cfa9e5280fab2ce1dbf69906df266..0000000000000000000000000000000000000000 GIT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u0IK8*_p!VqLAwza2&q?&EY9M zR1tDRHl%dk>QLS_EVc2N4q7JVW#Hd#-?4uxgoY-_Y$Tsn79;j6v|5Lr3CT+c*nTcA zHEA{j4`sq&eX zk`)NNcM|XBa)!xAsSkZ()JpJ3#D^lV#$dzgSJAwM0M%y6bc}0-H{Sb|p$GuH)Uj&Z ziZ=B97g!ItDp~TuBrIQwVIu@Nd)D?Q1{tO<2zV}|+n*Fv*E&a%5DWlFF40E#bpn~p zk1k*3&HQdi6N17^p4fVUx`vLSOaB+n<{sy+5E5m?k?YcVMGiWPCLVC-7_e=1g(QCF z&7)sp$fo!rRRHmblEv%tf>6E`v^2824l7xQHt{&;R|Sj-U&Hpw*NUWVEi2<`n*a)o{67mahw@OGcR#AmIwvG5J5d zn78UP*d-Gz1ClE65&wu@Zt2LCyaA76Q)pmV{!1zIA8j1T++e<_eGY;1UjRAGljXpj<~1H<7I0&rpvO3C3x zKE|IZ1iGUL>15D5$XPsr2crC(JtD*VoDO?(&F*RI)$`fBQhH$(hwKEP_+l?oEjHjN z2=dZT;b7-f%Xv+{yum6M9EnQ$*!_I!2<~rGo5N@JdzZ5Nq!01Ij$2u_N~B3m&G)kq oJYO2Wv&02^zW;8F{|~D-vlDyl&QMmar0=1|9Byq~1M`UgA5BtP)Bpeg diff --git a/clear_before_scale_v2/img/unused/eraser-dark.png b/clear_before_scale_v2/img/unused/eraser-dark.png deleted file mode 100644 index 05b49d61a6d49d97f00e8b3ac4e0560c2dd5ffc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmV;819JR{P)wTu@VpI24MnfgOO75 z>-cQnIksd~LM1pKaTMSAh|lM96qf`c*t0&Eg(u5V78N{QQ}>kd_cZF&79CnMFj= z-a)20vK0#(xmq#NQ?0QF#DATUhD3s>g&7cmFkK_22oWb?x7GgmhaS+pJ&;lr`jjjDk%*sm8!c)XZ2AG>s_As3%_oANW zHGwE%iKXX=4NMb=Rm%q+J;qEyA$t(TxAx-sm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!a0`kRR!OAv~NcF zBrE*32B6{Z9r6x>R7>d2j3h-I=SPi9s_?M z1iFcT{m54<_+5cN?!Rz&wO>6VLNy~aJ80=jITrXtitl<^4;U->ZeU3c#xyP`Q0dWq z82*P!siug0t%BdxmY;_{WgZmSrz^Ln9|dgH@ICx|{3I2<8#spik7b#MAKpFGGRX54 zGG4aOcOX^Hhfq9aaNHWItd7$(D^@!e8R8;P;TePGQ{(NS-sWsz=;@ z1wVxWBz6D8+5oCPzsK}>ZIm8O{NY7mc^p_@!S6kN?L0u5x&Lhy{NB_TX#j(Rg9^Af zVL9F<-JypS{1WMlJ0s{6{Cnz>$c;*=t19@tsV}YzNVD#LuO_&8%)Q_aD)2yVDoV11*)5h43!aFr#e#NmTDTh6kWc0&hB4;XSIu8sg(Ml1FTsQ@V8pRPj#1W7vOuiJ1s1A z`Rb(G@tagO;IHl99lrmjjhmhsf*-X*DUI8ouECGHPq&2d$DQ_3borEsEY$Ps!!4n2 z#^0=Yms0A5l(52E(goOQ0e_ldOryuJmJq&YyzfXi$``}|vKqk-{M|rz0FS42)iGPr z<8~+|)z{D1@hPotwX6;UKF|0>!YJCA>O%JlNj}EmC^Kqch(~r^yVWZEL)0p cSBCQaA1Q@JkH9H^xc~qF07*qoM6N<$g2!{3W&i*H diff --git a/clear_before_scale_v2/img/unused/gallery.png b/clear_before_scale_v2/img/unused/gallery.png deleted file mode 100644 index 23db3a94b3d666c3081543da07b8fe186c204b4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^CO~Y=!3HF6)M^IFdgVmyM5$#nALzx)xAKEi)vd#5q4VH#M&W$Yo$~E=o-- zNlj5G&n(GMaQE~LP{_|yNL27mOrH8AJ{qW?$J50zB;(%O>xNv14Fp&Yl+Jrr^LXBJ z_Z^=5mX*9@67yi3z4O~P$ukeHUaLO;YUQdw*>XE?GBARH@0{EXzxGUeV_)`O<^1NG ztA3?LXD{EpdH)5w4b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;>hSLE~8ayMWI)Y?hc9 z1a0jBB%Mc?$Z4efUjZj1qRWAEXdGF)82F;?>6Hl9<+OzXNIHn{ZJ!sla~~nqS=z-U5-sfl zB#n}E9q=HHmH!rSAz}4wQhr2Q<^d!f3fxG3Sod5)hOxARc@wDI14tSz=?36_@|8c8 zkX0-xze!Z;0VEv(+(6ihwh@bfvuvkOt|n872avRxq$$93@|AxJuxC0WlF50X&yk*7)iGhCTa4Ne-khvDZhG};sGS>2mF%!y=xW%XV`wA z8FD1@iS7X;oeRvOvGPqwAT=Q=zqLg30Fp)%T=@w(Rp$ez+kQCKwG%@piU*LiH}F>) zE8oD62*H|3`E5dJ4%2e^^O%AW~L zOv>*JhGGDB5_bBi#}$P2crh}7CMsY^3q!J8JX2T~w`bt1wu@|Ao@gUVtqhWM4q;oe huh^a%O{zp?{14RO0u$RNi-iCH002ovPDHLkV1i)k1+V}B diff --git a/clear_before_scale_v2/img/unused/magicwand-dark.png b/clear_before_scale_v2/img/unused/magicwand-dark.png deleted file mode 100644 index 433aef2a67149cc53cd03731656db6ccb6e29861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7703 zcmZX3XH-*LwDk$0mk_#A3=oPmsiL7vN2E!Y9+09S9U(vxkP?bWQNTt35rHcTh$u=E zL%E1jq@#eLBPF0hgh1ZmzVF93#`~2svgTfUuDRFRd!4g0Y^}|>*oD~v0N}DPH@*x2 z5bzNKurh-`?h#e~03bGFVSK?Mc534>ca`&KVb2~iFfc53=t)_bN+z?kD(3XXvZ&Sk zSd08K7Wq<{MaFXcCU$p8r?ZVMGRw{LrQ-6WOw`nN7B1#V>3Zr||EG>n+phkaH6)>V}#ASLR={|_5UURB>}wX^0}d~206+ZXPX zqdr@LiZ8o1Jq3EI7UiJ}qc$Q^DQ1zbIfoJJd;wwg*W9L=K@%s>QEdcfKtPx7M?2l) ziSpz%qxg+^UylyHJLHTF_Ak255pHD$wbL#$_vFOx7AMw z2J@SRJzYBpQi}peqTv8_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XkP}R_e&f!&Q(iZGPjqT2W(}2KFM#tY1Vgmn1?!e^~D4}%-nY#-!M-n8i&#E z_SF#<9#cnpoMw#V5d0D$71_{^Dct>mErf9tJ-@Sx!0$=e6zOkWCFC~Qc0u5i}?HmOqq$kjv|KUBB$qp&1e(J z+?op}GZ3dGX(_R*=b)*IOiOt6!xX>L=TMi$%n>)ounqy&c+^)Lb9A2;u-*S;`e5i({|>T%a${@>DW(6Q zQ`~K#QK4SUTsp1w;AIx&rNf~u>ni)y6#n$b)VtsIj6D&S82Ax(=_itODmvO*JZDZ0 z6%w|%$3FM!C`CVqurlCy2;Ow6*}+QF&oiX_{_=}ObI-dRUVlV=WCnr#-YlNb{$!J2 qxMsx5V!#?C^M7tc|Ifwg5uzJ6QE8L>)EK<*1uRUgjb9jgC;t!7s(ru! diff --git a/clear_before_scale_v2/img/unused/paintbucket-dark.png b/clear_before_scale_v2/img/unused/paintbucket-dark.png deleted file mode 100644 index b6bd648bcc9985b0c1996c04d403a075aa8f5c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4104 zcmZ8kc{mhY)Soe98QI40+KnuOtYZr?S;iJ4iIR0hDzaqHHg*$}B}ru|Q5Z|}rm-_4 z2EByHC=61T$d)W2^G)CL{q^1FId^~Vx%WBe_dDm_b+EVM{L%8bd;?uY>^rX!*YaG`Zg6#F`Wfw{Qu+80;4w%Gl|ajPr? zLanEjMoY<(B5Zt!5&4l^JBB?x6_FM$ZYE&@+oSYWHc=E$jEAGYKA<+tF|)T^ag-A+Eqr(0CUe4YwPH!XHWVdW+J+U4X zBTl~%tp(fH=>epqq*&=^hjrkOF3sOlwDMyUEaen{B75Udg#&>Bx3_@yz=T_b?}57} zPi(G2vC+}{%b_iCCqmq1d0$#tStX-oO;AsnUqf5k3wB{}LnFbSY{2ih<1pD!53{e2 zZN;L+KdH-3IY+eNZ)p?`w1u`z?-2b3f7HmynW}=mZU1gSe}iwm^vs`Am@{?mfPd0A zFlh0aY7D$M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H_S2KL5j$)mEmXob`Xk?TdRuO3r!N`C0ql HFIx96u@K5o diff --git a/clear_before_scale_v2/img/unused/rectangle-dark.png b/clear_before_scale_v2/img/unused/rectangle-dark.png deleted file mode 100644 index 37487c8e62b4daefb1b41441b5c54f780af75665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-;BmO< za%XjEQR$`|tSoy)YvsKZkGogpxVgxu^V?=dOYGs6Fh~gAdhg8nRj=yXPM%4QIonn_ z=|BS`vswazWb*;Bp(M`?5F1KL7=YMdGUwO3f8N{9=-8M6`3d)52_-P7wzB^;P4WH< PbQOcAtDnm{r-UW|K}=45 diff --git a/clear_before_scale_v2/img/unused/rectangle_selection-dark.png b/clear_before_scale_v2/img/unused/rectangle_selection-dark.png deleted file mode 100644 index 3b5b827d6c4f6d5b0a8b4bcc60e25d202de38dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-_|>L79WRYi3(CNx#tOTO|F0t?vQbSJqVtYcm$ae~qcQpf;i3S>t5$vME8bS4G0^ zn)v<-QI2`P^PP%kV1sB{*Mn@mz}w$`&N-MDxV$Vu(lq(Yr0AOOef`r{{pC2-&&b9j zVUTbxF(@?D&TEa;;n$fyI*$@B&)jkBoOQzM`-ze{*Co%hM<%?RbfAHenau}CJkzt> z_r&hs9^-G=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1< to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
               
              a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
              t
              "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
              "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
              "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

              "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
              ", "
              " ], - thead: [ 1, "", "
              " ], - tr: [ 2, "", "
              " ], - td: [ 3, "", "
              " ], - col: [ 2, "", "
              " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
              ", "
              " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
              " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
              ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
              - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
              ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
              ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
              ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
              ", - "
              ", - "
              ", - "
              " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
              "; - } - } - - return [ - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - gradientFix, - "
              ", - "
              ", - "
              ", - "
              ", - "
              ", - "", - "
              ", - "
              ", - "
              ", - "", - "", - "
              ", - "
              ", - "
              " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
              " + html.join('') + "
              "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
              -
              -
              -
              -
                -
                -
                -
                -
                -
                - -
                -
                -
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                1x
                -
                -
                Full
                -
                -
                -
                - -
                -
                -
                -
                -
                -
                - - -
                -
                -
                -
                -
                -

                Layers -
                -

                -
                - - - - - - - - - - - - -
                - -
                  - - -
                  - -
                  -

                  Transform

                  -
                    -
                    -
                    -

                    Palettes

                    -
                    - - - -
                    -
                    - - - - -
                    - - - -
                    -
                    -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    -
                    -
                    -
                    -
                    -
                    - - -
                    -
                    -
                    -
                    - -
                    - - - - - - - - - - -
                    -
                    - -
                    - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file diff --git a/clear_before_translate/css/fonts/icomoon.eot b/clear_before_translate/css/fonts/icomoon.eot deleted file mode 100644 index f5314adf7b63f3e372c57b1dc2c12280cfbba943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4416 zcmb7IU2Ggz6+UNX?%es?pIPthdi|H#tnGDNaBZ*G+Y;KY8Z|$vqeRd^6;#zGO_Nk{ zylR4!B2=v?Dnjam)z>0q@qk1nO2i8i;$ffQg-R8D=^M+B`h*}4sRRPneD}`U-d#cj zcV}nLJ@?%6ch5cd%rrxy?`Mga3>t1syR0x97l-kRHfirpow__aMwF%-bcJ?k8~+`; z1%fnviLTN$`Uc&kEqWc80(}LT*XcHB6-`Vlv_#9Ac62t7N}x||GHLn3mmgnsj{o!5 z!2A;b%`4kmt%*y&xelT!^f#_;-EQHjECP<4Yd7C`b@s3J9Qwcqo$FV(Ug019^zYD0 ziCe!8g!u=ffxe=jy}o_t?p%{UkN!L8zj$-!%GScWv+tw-C-j%Lx9+xRhQCLY$)g|N z+SjVX@uh2jhk zT?JdFdGM-4tLu%YdGM;PEOB+@T2n+TRk=J5rqKw~nIVn|_lNKWhx*$5DCZ0p@=@L% z(KR|$w0NN0=tQu>RV_A(k*q3XM@@qwBV23I@lpAWl>`2VE=ZJIX&hs4)m|KQ*dfbf zeBh(H_Rit_2D)qObv|3-3{P5?tpeg)oHSd474q52fu}La@PX7;J{6EHn7ILZoCSZJ8#p7-GXRObI!*Oxbo|%M92! zZdN*hux!(?Kx0}qusP56ZQ)q9WHZHVf}Oz@Lm)UAreTA*E!@28f;(74gj84)1Ok2L zwUUwMNtgh-lr6JPHfIUYLV)4eG8gz$=~T%%Fv$-FO*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SSqb*Gz^z~ - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/clear_before_translate/css/fonts/icomoon.ttf b/clear_before_translate/css/fonts/icomoon.ttf deleted file mode 100644 index 5ae72b63d94aa0e3ec7d7054ec589def6ca9f394..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4252 zcmb7HO^hQ)6@IU~tE>O~)3)0l&u@D@GoGEmWM(`bCoD;!$b!$txD9=@vf%y>*# zLAhQ1>eZ|7y?Ryk>NPPD`P3nkRxf_}(RJssPm5;UE6=??mZU^lx4V!~BEML|e(vU*EZNccI0f zNBeEGU%0t@WqawJ`S;NN6WS{~+jrYE%ikx;6wr=uZSP$DYWYWhL3;x_o^9{mz5_c^ zvfozyWE#YKB+z%BUj^sP@ck*3>AOm9q%h1rURp$-gxuf9kNZFa%!q($6B+m`jRn-I zw?Gy>hPOu!`kTG)lq)cJpzq@<{K)dFb8m zLurp}$`LIztBq<@Ey{is;;6$8A?NtOM-A@ClHox8WvbhDqze34s+ac7%rDRJte3V!h^>}`g5k` zr)}F;o|74w%G$OkMZv}52^SgwX<2F|ipmnpbTEA>0%>DVVB2XY6-t?Q1n87Zmz^|= zwBzPnw;*KzC6)|h^mYyex<(JTY^;j=s$SZNo#z=<4*ky6NlC9pcqEAJ27q!eO(2#h-vvkrP9dd8kNe0Lpy0V!2)MBjq-V3)N*GqM z+1d0cpRvu<<}QS}m8q$fTv$-MMDgCh4h}uFN1Y>zJEbT(H9vnUib_Y+Wu+tXeeAnX zx@m!9YKgQv%Ee~EzQKXhIJ zRi>%+Qt4#)T<>gZE({k7OQ$C%XI$H)t4IF^E_`_3t@4c*~!V%OU0#J zK2ELXmdg{HGmV$3)urTKJFuadTp>-psH2NelJ$m6mRfIth@d7eEN3Ph*VWL4#W0*p zo$Wmro-CEtr!;tPW^FoSJz6(m{MM!m|<@-zo~o8YONmCt1wAblJ^FEy-m2Ix5xAHEqT}K zARJl3GfYIlF5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D)jX17(C!CY39NQ%XW3wot%1rBaD5hL96^I;cx27Z$E< z5ZQ6!Sj;$~wobJ_G*mg54s$UbKMoG2Lr6Sk=b>N-7y}ZK-qzISju%&@|-jd6;~1yb{vDj&Pk(C zEcB%)F-0M)JjF1L5D!Vp5#+tuRiVEF?cRij3xizT`LNHa$qf$^n<*(jP_SQ_7>?s-XEkg^abp03po7Yc{# zHN7XxwzFByWTaWCG)IzbY0W2dPx%GMDfp^4lKZ9c6QiRi#!J0%8O^4yo1z0-+m?mh zp2Tc7%XM90tQzYA8Oulq_FFa9&Dq~Q@BjSm^p9@`C!c|v*9YJI^xlw}&d2UakC$I| z3w8C(eFeZ54U7HW&0z$1apptbn@NMDr(klo0&#FXYH*8gnadLak~}asD7IZl#^s%c zFScWDa?5#6N)#x>og9e4pt7`#onjS^!sr*oS*o!iXm z+-6SaHgj5_?(wc}ZnM9*`S&8I4|8p0V|`=e=7E~3znawNXx-8rO`(ETh@*g{y`?~-D diff --git a/clear_before_translate/css/fonts/piskel.svg b/clear_before_translate/css/fonts/piskel.svg deleted file mode 100644 index e7d9704a..00000000 --- a/clear_before_translate/css/fonts/piskel.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - \ No newline at end of file diff --git a/clear_before_translate/css/fonts/piskel.ttf b/clear_before_translate/css/fonts/piskel.ttf deleted file mode 100644 index a6836b3585712666a034e53dd39253e7d4e39cad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2424 zcma)7&1+m$6hHUl-Fx5HeQ(~!Or|rLOp`Rxq)aktlCiXek_sizV6CL;MmtT@rnYH9 z8=*xgUAVBg@ek0A-Kn^8A>yXsQqYwPK?n#%#Epxtti*HQoph3d;+;G9eB5(>=bU%n zI~NE5_;4Q>OuzEl)QlQ_`Za34#s9_CjqcW=mG9pKAa#__UhUrALK>sIj#OQ}areqZ zTKx=V)C<18*1gPz=l=qb+qgf!jtVi!+bDm5^62`;_8s>DOriWE%JmzYt6lmr`vB!X zP>wgcceWrTAENve<>t-q#@fpRU;TukFg`iHwRw9R^Tgr4VfKMhARmE)duPcN)ST(j zCs2j=jorRMFztim6u@Ijc6RYcb`T9=_8Ax%fa2do%y2ck8E|+BsRs)8Fg!FL)7`&! zcToq(L&1~XUk~w~N3nqm0fJUhfns%t-8o)_?8p6Y9cHq-!8(k zW)_gP=!l$Y&^*(0WVl7=W*6wO94+$9TFlL&1wHcmqlfQY`sBMy7ao0j{rba4D`IT1 zJvi829NVJ{uTlBIQhE`@>RU+$ts*X_3BVi_MK!I+a|GXXQGP zb)v~Le5pxRwsG;Pwy5>$w2O>w-k55E*6s`uTj!p)bsZw6C^9>5&2gQ>NtWw0CPRcV zN*y7X&~f4=wvX7@N}T)MteT8C1VlEibub*&9Ge;p>Vt!!P|7529xh{?3g4AT8Hr~wlQ0fL*G)<# z6(!nNO!>a!1ir^b;QO2lgrxW!IUa%%I*OzWb?oY_6uBbQkyNn`cuYi;=Dy>59#=Z> z9PVNaCyXNHM%rUJ*GVPt@-$XlNi5j&j14Ycp2TADK#3Ad6vDA3#(9#3Nft$c(vcSC zMfzVQDtui`iBq8yr@2>DqypDgPB&0_9(eunK&^zdSaroM^_Lw_x&6LxY~6bT>2XGx;eh@3xjIV1qzPQ4(vxY=%)Ag z`u(53o&Ndl=;Rad%{2q?!!Pd*^=Yru0Xyf`hftJyS` z^b}0l2&nMzJQ{F|Zkx*!Wl0{G8x+SglR~nKhA(?D2xwHgLAg=FNjjIFF83;a#`^T?9DbfJLt%v;pqIHqy(`giCN2 S*QEk@xfi^s%09t=S^oiTj_VWv diff --git a/clear_before_translate/css/fonts/piskel.woff b/clear_before_translate/css/fonts/piskel.woff deleted file mode 100644 index 895352254dcb47cb469ef36bc5921da6f511db1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1848 zcmZ`(ZERCj7=CX*w#&o~a7Dh$fWaG!e7EMURA&WY~#}b4fWgBBi*REYZ*Vb<9 z_qq3W{a#xr)vX;vP`*qc5VIfrbH)UT(S#{R!w>iYKO}7|X1?d%E{;Ucz3+3L_v1Y0 zo;SJ2+|kz7v44LDK=pR00UT9NDE`-Yr>(64<9`CkuTX1EZv3@l-_~saigOr0N{wCr z?0T0*tpiZ9=)X^G&4Jm2y=nuE?MI)+sVzIvqwdDoVdTx!%Lp?Y`GuM(|#5A>@wJs7(Oz_d`?x$4@FI;~+4&$bF{8bp(0 z1{4Zl7>4cZ(rUEYeqdx6Yb~vlmDb8js}!%+!0LVTge=TUtH~#S&6Ng~ub{$69Yx=A zic1jW(<^{Qt-9qetz6sidPTA_85@mF#%+zpcbgkUXrc`JC1V1hglf920;;j^FM?h+ zB473_Rx7>bSZ!&pbfYw=Di3kxJLNdRQM^`;6;q^WCB+|#F&Zh~Ek?^0j`g&t9+SCN zvWaYLY2AcV%RTahJf6Gvn6TtMRXgeIB<-YqrgN6el9?HV+0L1E!q$FU{H^q%N~;gV zhJ54{XFOj}5>L>>d5B9G3A@9i5ns%AdNk+En{FKon`6Dv!_JfDey7=H?HN7p?)B?& z1HH09zT&S&uSTzoPvrB3$y@fHSVENU^X40GUp$$z#T{Xf;0p!#fDjN!B$(loLX?m4 z0wJs=qtqQ#5n>r59@0lV2}9D5HhgaSy4&xGm;^Ux4LAc1uhl&~JTzi6yG$;t-zILF zBNJo!_+)%Cllm;4PE7D;_%mafPbV#x4N1+UC1cADpB>J5b0o?7hE(>TlCuZE z;$+yIv0S!Zw9Pms#S`dAFW(jIigu41@&g6^t+d#-$oaE3e!h4ibvm93hlNmx=Xn8J z72z_0q(2&nVhahI%_uJ)R>ho3;vn=;j*uAfV!pJfbx8eraMj-$V;GCzgY;6{J(V3sZRDBl6_K*rpk$A`Hu-UQ5| zk_M5>5b<_^dPJJ7$A5D>&NX;j$?##I;el-a@A-L*0df#IGynSv8Bu^YdM-icD0t_S+9c(3lJb%=| .settings-title { - /* Override the default 10px margin bottom for this panel */ - margin-bottom: 15px; -} - -.settings-section-application .button-primary { - margin-top: 10px; -} - -/*******************************/ -/* Gif/Png Export Setting panel*/ -/*******************************/ -.gif-download-button, -.gif-render-button { - margin-top : 10px; - margin-right : 10px; -} - -.gif-export-preview, -.png-export-preview { - position:relative; - margin-top:10px; - max-height:32px; -} - -.gif-export-preview { - max-width:32px; -} - -.png-export-preview img { - max-height:32px; - float: left; -} - -.png-export-preview .light-picker-background { - max-width:240px; -} - -.gif-upload-status { - width: 180px; - margin-left: 5px; - margin-top: 10px; -} - -.gif-upload, -.png-export-preview { - overflow: hidden; -} - -.gif-upload-status, -.gif-export-preview { - float : left; -} - -.preview-upload-ongoing:before{ - content: "Upload ongoing ..."; - position: absolute; - display: block; - height: 100%; - width: 100%; - text-align: center; - padding-top: 45%; - box-sizing:border-box; - -moz-box-sizing:border-box; - background: rgba(0,0,0,0.5); - color: white; -} - -.export-scale { - margin-bottom: 10px; -} - -.export-scale .scale-input { - margin: 5px; - vertical-align: middle; - width: 150px; -} - -.export-scale .scale-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.export-resize { - margin: 10px 0; - overflow: hidden; -} - -.export-resize > * { - float: left; -} - -.export-resize > *:not(:last-child) { - margin-right: 10px; -} - -.export-resize > .resize-field { - width: 70px; -} - -.export-resize > .resize-label { - height: 23px; - line-height: 23px; -} - -.export-tabs { - overflow: hidden; - position: relative; -} - -.export-tabs:after { - content: ""; - display: block; - position: absolute; - bottom: 0; - width: 100%; - height: 1px; - z-index: 0; - background-color: gold; -} - -.export-tab { - float: left; - cursor: pointer; - padding: 5px; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; - /* Make sure the tab and its border are positioned above the :after element; */ - position: relative; - z-index: 1; -} - -.export-tab.selected, -.export-tab:hover { - color: gold; -} - -.export-tab.selected { - border-color: gold; - border-bottom-color: #444; - border-style: solid; - border-width: 1px; -} - -.export-panel-header { - padding: 10px 5px 0px; -} - -.export-info { - font-style: italic; - text-shadow: none; - font-weight: normal; -} - -.export-panel-section { - padding: 5px; - margin-top: 10px; - border: 1px solid #5d5d5d; - border-radius: 2px; -} - -.export-panel-row { - display: flex; - align-items: center; - overflow: hidden; -} - -.export-panel-gif .button { - margin-right: 5px; - width: 75px; - flex-shrink: 0; -} - -.export-panel-png .textfield { - width: 50px; -} - -.png-export-dimension-info, -.png-export-datauri-info { - margin-left: 5px; -} - -#png-export-columns, -#png-export-rows { - /* Override default textfield padding-right to keep the number spinners - aligned to the right. */ - padding-right: 0; -} - -/************************************************************************************************/ -/* Import panel */ -/************************************************************************************************/ - -.import-section, -.resize-section { - margin: 10px 0; -} - -.file-input-button { - margin-right: 8px; - border-radius: 2px; -} - -.import-highlight { - font-weight: bold; - color: white; -} -.resize-section-title { - vertical-align: top; - display: inline-block; - padding-top: 5px; - width: 25%; -} - -/*****************/ -/* ANCHOR WIDGET */ -/*****************/ - -.resize-origin-container { - overflow: hidden; - position: relative; - width: 70px; - margin-top: 5px; - display: inline-block; -} - -.transition .resize-origin-option, -.transition .resize-origin-option:before { - transition: background-color 0.2s, border-color 0.2s; -} - -.resize-origin-option { - float: left; - position: relative; - - box-sizing: border-box; - margin: 0 1px 1px 0; - width: 20px; - height: 20px; - - background : #888; - - font-size: 8px; - text-align: center; - cursor: pointer; -} - -.disabled .resize-origin-option { - cursor: default; - background : #555; - border-color: #555 !important; -} - -.resize-origin-option:hover { - border : 3px solid white; -} - -.resize-origin-option.selected { - border : 3px solid gold; -} - -.resize-origin-option:before { - content: ''; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin: -2px; -} - -.resize-origin-option.selected:before { - content: ''; - width: 4px; - height: 4px; - background: gold; -} - -.disabled .resize-origin-option.selected:before { - background: #555; -} - -.disabled .resize-origin-option[data-neighbor]:before { - border-color: #555 !important; -} - -.resize-origin-option[data-neighbor]:before { - width: 0; - height: 0; - border-width: 4px; - border-style: solid; - border-color: transparent; -} - -.resize-origin-option[data-neighbor="bottom"]:before { - border-top-color: gold; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="left"]:before { - border-right-color: gold; - margin-top: -4px; - margin-left: -6px; -} - -.resize-origin-option[data-neighbor="top"]:before { - border-bottom-color: gold; - margin-top: -6px; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="right"]:before { - border-left-color: gold; - margin-top: -4px; -} -.save-field { - width: 100%; -} - -.save-status { - margin-top: 10px; - margin-bottom: -10px; - vertical-align: middle; - font-weight: normal; - text-shadow: none; - font-style: italic; -} - -.save-file-name { - white-space: nowrap; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-desktop-file-name { - word-wrap: break-word; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-status-warning-icon { - float: left; - margin-top: 5px; -} - -.save-status-warning-icon { - overflow: hidden; - padding-left: 10px; -} - -.tool-icon { - position : relative; - cursor : pointer; - width: 46px; - height: 46px; - margin: 1px; - background-color: #3a3a3a; -} - -.tool-icon.selected { - cursor: default; - background-color: #444; -} - -.tool-icon.selected:before { - content:""; - position : absolute; - height : 100%; - width : 100%; - border: 3px solid gold; - box-sizing: border-box; -} - -.tool-icon:hover { - background-color: #444; -} - -/* - * Tool cursors: - */ - -.tool-paint-bucket .drawing-canvas-container:hover, -.tool-colorswap .drawing-canvas-container:hover { - cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; -} - -.tool-vertical-mirror-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; -} - -.tool-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/pen.png) 1 14, pointer; -} - -.tool-dithering .drawing-canvas-container:hover { - cursor: url(../img/cursors/dither.png) 1 14, pointer; -} - -.tool-lighten .drawing-canvas-container:hover { - cursor: url(../img/cursors/lighten.png) 1 15, pointer; -} - -.tool-eraser .drawing-canvas-container:hover { - cursor: url(../img/cursors/eraser.png) 3 14, pointer; -} - -.tool-stroke .drawing-canvas-container:hover { - cursor: url(../img/cursors/stroke.png) 1 14, pointer; -} - -.tool-rectangle .drawing-canvas-container:hover { - cursor: url(../img/cursors/rectangle.png) 5 15, pointer; -} - -.tool-circle .drawing-canvas-container:hover { - cursor: url(../img/cursors/circle.png) 5 15, pointer; -} - -.tool-move .drawing-canvas-container:hover { - cursor: url(../img/cursors/hand.png) 7 7, pointer; -} - -.tool-rectangle-select .drawing-canvas-container:hover, -.tool-lasso-select .drawing-canvas-container:hover { - cursor: crosshair; -} - -.tool-shape-select .drawing-canvas-container:hover { - cursor: url(../img/cursors/wand.png) 10 5, pointer; -} - -.tool-colorpicker .drawing-canvas-container:hover { - cursor: url(../img/cursors/dropper.png) 2 15, pointer; -} - -.swap-colors-button { - position: relative; - top: 50px; - left: 6px; - height: 18px; - width: 18px; - - opacity : 0.3; - - cursor : pointer; -} - -.swap-colors-button:hover { - opacity : 1; -} - -.tool-color-picker { - position:relative; -} - -.tool-color-picker:nth-child(1) { - z-index : 100; -} - -.tool-color-picker:nth-child(2) { - z-index : 90; - margin-top: 25px; - margin-left:-20px; -} - -.tool-color-picker input { - width: 16px; - height: 16px; - text-indent: -10000px; - border: 1px solid black; - background: white; - cursor: pointer; - position : relative; - top: 10px; - margin-left: 2px; -} - -.tool-color-picker .secondary-color-picker { - top : 18px; - margin-left: 0; -} - -.palette-wrapper { - margin-top: 10px; - margin-left: 10px; -} - -.palette-color[data-color=TRANSPARENT] { - position: relative; - top: 10px; - left: 10px; - background-color: white; - height : 16px; - width : 16px; - border: 2px solid #000; - background-size: 16px 16px; - background-position: 0 0; - background-image: -webkit-gradient( - linear, - left top, - right bottom, - color-stop(0, #fff), - color-stop(0.45, #fff), - color-stop(0.5, #ff0000), - color-stop(0.55, #fff), - color-stop(1, #fff) - ); - background-image: -moz-linear-gradient( - left top, - #fff 0%, - #fff 45%, - #f00 50%, - #fff 55%, - #fff 100% - ); -} - - -.pen-size-container { - overflow: hidden; - padding: 5px 5px; -} - -.pen-size-option { - float: left; - box-sizing: border-box; - width: 20px; - height: 20px; - margin-right: 2px; - border-style: solid; - border-width: 2px; - border-color: #444; - cursor: pointer; -} - -.pen-size-option[data-size='1'] { - padding: 5px; -} -.pen-size-option[data-size='2'] { - padding: 4px; -} -.pen-size-option[data-size='3'] { - padding: 3px; -} -.pen-size-option[data-size='4'] { - padding: 2px; -} - -.pen-size-option:before { - content: ''; - width: 100%; - height: 100%; - background-color: white; - display: block; - text-align: center; - line-height: 12px; - font-size: 90%; -} - -.pen-size-option:hover { - border-color: #888; -} - -.pen-size-option.selected:before { - background-color: gold; -} - -.pen-size-option.selected { - border-color: gold; -} - -.pen-size-option.labeled:before { - content: attr(real-pen-size); - color: black; -} - -/* -Icon classes can be used entirely standalone. They are named after their original file names. - -Example usage in HTML: - -`display: block` sprite: -

                    - -To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: - -// CSS -.icon { - display: inline-block; -} - -// HTML - -*/ -.icon-common-keyboard-gold { - background-image: url(../img/icons.png); - background-position: 0px -230px; - width: 36px; - height: 21px; -} -.icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons.png); - background-position: -230px -107px; - width: 18px; - height: 18px; -} -.icon-common-warning-red { - background-image: url(../img/icons.png); - background-position: -230px -86px; - width: 21px; - height: 21px; -} -.icon-frame-dragndrop-white { - background-image: url(../img/icons.png); - background-position: -230px -30px; - width: 30px; - height: 30px; -} -.icon-frame-duplicate-white { - background-image: url(../img/icons.png); - background-position: -230px 0px; - width: 30px; - height: 30px; -} -.icon-frame-plus-white { - background-image: url(../img/icons.png); - background-position: -230px -60px; - width: 26px; - height: 26px; -} -.icon-frame-recyclebin-white { - background-image: url(../img/icons.png); - background-position: -184px -184px; - width: 30px; - height: 30px; -} -.icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons.png); - background-position: -230px -143px; - width: 18px; - height: 18px; -} -.icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons.png); - background-position: -230px -125px; - width: 18px; - height: 18px; -} -.icon-settings-export-white { - background-image: url(../img/icons.png); - background-position: -138px 0px; - width: 46px; - height: 46px; -} -.icon-settings-gear-white { - background-image: url(../img/icons.png); - background-position: -138px -46px; - width: 46px; - height: 46px; -} -.icon-settings-open-folder-white { - background-image: url(../img/icons.png); - background-position: -138px -92px; - width: 46px; - height: 46px; -} -.icon-settings-resize-white { - background-image: url(../img/icons.png); - background-position: 0px -138px; - width: 46px; - height: 46px; -} -.icon-settings-save-white { - background-image: url(../img/icons.png); - background-position: -46px -138px; - width: 46px; - height: 46px; -} -.icon-tool-circle { - background-image: url(../img/icons.png); - background-position: -92px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorpicker { - background-image: url(../img/icons.png); - background-position: -138px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorswap { - background-image: url(../img/icons.png); - background-position: 0px 0px; - width: 46px; - height: 46px; -} -.icon-tool-dithering { - background-image: url(../img/icons.png); - background-position: -184px -46px; - width: 46px; - height: 46px; -} -.icon-tool-eraser { - background-image: url(../img/icons.png); - background-position: -184px -92px; - width: 46px; - height: 46px; -} -.icon-tool-lasso-select { - background-image: url(../img/icons.png); - background-position: -184px -138px; - width: 46px; - height: 46px; -} -.icon-tool-lighten { - background-image: url(../img/icons.png); - background-position: 0px -184px; - width: 46px; - height: 46px; -} -.icon-tool-move { - background-image: url(../img/icons.png); - background-position: -46px -184px; - width: 46px; - height: 46px; -} -.icon-tool-paint-bucket { - background-image: url(../img/icons.png); - background-position: -92px -184px; - width: 46px; - height: 46px; -} -.icon-tool-pen { - background-image: url(../img/icons.png); - background-position: -138px -184px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle-select { - background-image: url(../img/icons.png); - background-position: -184px 0px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle { - background-image: url(../img/icons.png); - background-position: -92px -92px; - width: 46px; - height: 46px; -} -.icon-tool-shape-select { - background-image: url(../img/icons.png); - background-position: -46px -92px; - width: 46px; - height: 46px; -} -.icon-tool-stroke { - background-image: url(../img/icons.png); - background-position: 0px -92px; - width: 46px; - height: 46px; -} -.icon-tool-vertical-mirror-pen { - background-image: url(../img/icons.png); - background-position: -92px -46px; - width: 46px; - height: 46px; -} -.icon-tool-center { - background-image: url(../img/icons.png); - background-position: -92px 0px; - width: 46px; - height: 46px; -} -.icon-tool-clone { - background-image: url(../img/icons.png); - background-position: -46px -46px; - width: 46px; - height: 46px; -} -.icon-tool-flip { - background-image: url(../img/icons.png); - background-position: 0px -46px; - width: 46px; - height: 46px; -} -.icon-tool-rotate { - background-image: url(../img/icons.png); - background-position: -46px 0px; - width: 46px; - height: 46px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - .icon-common-keyboard-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-warning-red { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-dragndrop-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-duplicate-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-plus-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-recyclebin-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-export-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-gear-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-open-folder-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-resize-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-save-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-circle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorpicker { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorswap { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-dithering { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-eraser { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lasso-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lighten { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-move { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-paint-bucket { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-shape-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-stroke { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-vertical-mirror-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-center { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-clone { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-flip { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rotate { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } -} - -.color-picker-slider * { - box-sizing: border-box; -} - -.color-picker-slider input[type="range"] { - -webkit-appearance: none; - -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - width: 100%; - border: none; - padding: 1px 2px; - border-radius: 3px; - background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); - box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; - outline: none; /* no focus outline */ -} - -/* thumb */ - -.color-picker-slider input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - cursor:pointer; - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ - background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} -.color-picker-slider input[type="range"]::-moz-range-thumb { - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -.color-picker-slider input[type="range"]::-ms-thumb { - width: 7px; - height: 18px; - border-radius: 2px; - border: 0; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -/*CROSS BROWSER RESET*/ - - -.color-picker-slider input[type="range"]::-moz-range-track { - border: inherit; - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-track { - border: inherit; - color: transparent; /* don't drawn vertical reference line */ - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-fill-lower, -.color-picker-slider input[type="range"]::-ms-fill-upper { - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-tooltip { - display: none; -} - -.color-picker-slider, -.color-picker-input { - padding: 0 10px; - height : 25px; - overflow: hidden; -} - -.color-picker-slider span{ - line-height : 25px; - width : 10px; - float:left; -} - -.color-picker-slider input[type="range"]{ - float:left; - height : 10px; - width : 100px; - margin: 7px 1px 7px 8px; -} - -.color-picker-slider input[type="text"]{ - float:left; - width : 47px; - margin-left: 5px; -} - -.color-picker-input { - margin-bottom: 10px; -} - -.color-picker-input .textfield{ - width:100%; -} - -.color-picker-slider input[type="range"][data-dimension="h"] { - background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} -#dialog-container-wrapper { - position: absolute; - z-index: 20000; - - top: 0; - right: 0; - bottom: 0; - left: 0; - - padding: 50px 150px; - overflow: hidden; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - background-color: rgba(0,0,0,0.8); - opacity: 0; - pointer-events: none; - - color: white; -} - -#dialog-container-wrapper.animated { - transition: opacity 0.2s; -} - -#dialog-container-wrapper.show { - opacity: 1; - pointer-events: auto; -} - -#dialog-container { - width: 100%; - height: 100%; - - margin-top: -1500px; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - border-radius: 3px; - border : 3px solid gold; - background: #444; - overflow: auto; -} - -.show #dialog-container { - margin-top: 0; -} - -#dialog-container.browse-local { - width: 700px; - height: 500px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -350px; -} - -.show #dialog-container.browse-local { - margin-top: -250px; -} - -.dialog-wrapper { - height: 100%; - position : relative; -} - -.dialog-content { - position: absolute; - top: 45px; - bottom: 0; - width: 100%; - box-sizing: border-box; -} - -.dialog-head { - width: 100%; - background: gold; - margin: 0; - padding: 10px; - color: black; - font-size: 1.8em; - height: 45px; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -.dialog-close { - position: absolute; - top: 0; - right: 0; - line-height: 45px; - margin-right: 10px; - font-size: 1.3em; - cursor: pointer; -} - -/************************************************************************************************/ -/* Browse local piskels panel */ -/************************************************************************************************/ - -.local-piskel-list { - width: 100%; -} - -.local-piskel-item { - height: 3em; -} - -.local-piskel-name { - width: 40%; -} - -.local-piskel-save-date { - font-weight : normal; -} - -.local-piskel-list a { - text-decoration: none; -} - -.local-piskel-list a:hover { - text-decoration: underline; -} - -.local-piskel-list-head { - font-weight: bold; - color: gold; -} - -.local-piskel-load-button, -.local-piskel-delete-button { - width : 75px; -} -.cheatsheet-link { - position: fixed; - bottom: 10px; - left: 10px; - - color : gold; - font-weight: bold; - font-size : 1.25em; - line-height: 20px; - - cursor: pointer; - - opacity: 0.5; - z-index: 11000; - transition : opacity 0.3s; -} - -.cheatsheet-link:hover { - opacity: 1; -} - -.cheatsheet-container { - box-sizing: border-box; - display: block; - - bottom: 46px; - padding: 20px 3%; - border-radius: 3px; - background-color: rgba(0,0,0,0.9); - overflow: auto; -} - -.cheatsheet-container .cheatsheet-title { - font-size:24px; - margin-top: 30px; -} - -.cheatsheet-container .cheatsheet-title:nth-of-type(1) { - margin-top: 0; -} - -.cheatsheet-section { - box-sizing: border-box; - float: left; - - vertical-align: top; - padding : 0 20px 20px 20px; - min-width: 300px; -} - -.cheatsheet-boxes { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - float: left; -} - -@media (min-width: 1300px) { - .cheatsheet-container > div { - width: 33%; - } - .cheatsheet-boxes { - flex-direction: column; - } -} - -.cheatsheet-shortcut { - overflow: hidden; - margin: 10px 0; -} - -.cheatsheet-icon.tool-icon { - float: left; - - height: 30px; - width: 30px; - margin: 0 10px 0 0; - background-size: 30px 30px; -} - -.cheatsheet-description { - color: white; - font-size : 14px; - margin-left: 10px; - line-height : 30px; -} - -.cheatsheet-key { - box-sizing: border-box; - display : inline-block; - height: 30px; - line-height: 26px; - padding: 0 10px; - - border : 2px solid white; - border-radius: 2px; - - text-align: center; - font-family: monospace; - font-weight: bold; - font-size : 18px; - color: white; -} - -.cheatsheet-shorcut-conflict .cheatsheet-key { - border-color: red; - color: red; -} - -.cheatsheet-shortcut-editable { - cursor : pointer; -} - -.cheatsheet-shortcut-editable .cheatsheet-key { - border-color: gold; - color: gold; -} - -.cheatsheet-shortcut-editing .cheatsheet-key { - animation: fade .5s infinite; -} - -.cheatsheet-shortcut-undefined .cheatsheet-key { - border-color: red; - color: red; -} - -/*Cheatsheet actions*/ - -.cheatsheet-actions { - position: absolute; - box-sizing: border-box; - - bottom : 0; - left : 0; - right : 0; - height : 46px; - - padding : 10px; - overflow: hidden; - - background-color : gold; -} - -.cheatsheet-helptext { - font-size: 14px; - height : 26px; - line-height : 26px; - color: black; -} - -.cheatsheet-helptext-tooltip { - text-align: left; -} - -.cheatsheet-helptext-tooltip-item { - line-height: 0.9em; - margin: 10px 0; -} - -.cheatsheet-button { - position: absolute; - bottom: 10px; - right: 10px; -} - - -.cheatsheet-icon-tool-circle { - background-image: url(../img/icons/tools/tool-circle.png); -} - -.cheatsheet-icon-tool-colorpicker { - background-image: url(../img/icons/tools/tool-colorpicker.png); -} - -.cheatsheet-icon-tool-colorswap { - background-image: url(../img/icons/tools/tool-colorswap.png); -} - -.cheatsheet-icon-tool-dithering { - background-image: url(../img/icons/tools/tool-dithering.png); -} - -.cheatsheet-icon-tool-eraser { - background-image: url(../img/icons/tools/tool-eraser.png); -} - -.cheatsheet-icon-tool-lasso-select { - background-image: url(../img/icons/tools/tool-lasso-select.png); -} - -.cheatsheet-icon-tool-lighten { - background-image: url(../img/icons/tools/tool-lighten.png); -} - -.cheatsheet-icon-tool-move { - background-image: url(../img/icons/tools/tool-move.png); -} - -.cheatsheet-icon-tool-paint-bucket { - background-image: url(../img/icons/tools/tool-paint-bucket.png); -} - -.cheatsheet-icon-tool-pen { - background-image: url(../img/icons/tools/tool-pen.png); -} - -.cheatsheet-icon-tool-rectangle-select { - background-image: url(../img/icons/tools/tool-rectangle-select.png); -} - -.cheatsheet-icon-tool-rectangle { - background-image: url(../img/icons/tools/tool-rectangle.png); -} - -.cheatsheet-icon-tool-shape-select { - background-image: url(../img/icons/tools/tool-shape-select.png); -} - -.cheatsheet-icon-tool-stroke { - background-image: url(../img/icons/tools/tool-stroke.png); -} - -.cheatsheet-icon-tool-vertical-mirror-pen { - background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); -} - -#dialog-container.create-palette { - width: 500px; - height: 600px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.create-palette { - margin-top: -300px; -} - -.create-palette-section { - position: absolute; - left: 10px; - top: 50px; -} - -.create-palette-import-section { - display : inline-block; -} - -.colors-container { - position: absolute; - - left: 10px; - right: 10px; - top: 85px; - - height: 460px; - - border: 1px solid black; - background: #333; -} - -.color-picker-container { - position:absolute; - left : 280px; - top:0; - bottom:0; - right:0; - background: #222; -} - -.create-palette-actions { - position: absolute; - box-sizing: border-box; - - width:100%; - height: 45px; - - left: 0; - right: 0; - bottom: 0; - - padding:10px; - text-align:right; -} - -.color-preview { - width: 170px; - height: 70px; - margin: 11px; -} - -.colors-list { - overflow: auto; - width: 280px; - box-sizing: border-box; - height: 100%; - padding-bottom: 10px; -} - -.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - position:relative; - float : left; - - width : 44px; - height : 44px; - margin : 10px 0 0 10px; - - box-sizing : border-box; - - cursor : pointer; -} - -@-moz-document url-prefix() { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - - -.create-palette-color { - border:1px solid #2c2c2c; - transition : border-color 0.2s; -} -.create-palette-color:hover { - border:1px solid gold; -} - -.colors-list-drop-proxy { - border:2px dotted #eee; -} - -.create-palette-new-color { - border:2px dotted gold; - - border-radius: 2px; - line-height: 40px; - text-align: center; - font-size: 20px; - color: gold; -} - -.create-palette-color.selected { - border:2px solid gold; -} - -.create-palette-remove-color { - position: absolute; - top: 0; - right: 0; - padding: 2px 4px 0 0; - opacity : 0.2; - - font-weight: bold; - color: rgb(255,255,255); - text-shadow : 0 0 1px rgb(0,0,0); - - transition : opacity 0.3s, color 0.1s; -} - -.light-color .create-palette-remove-color { - color: rgb(0,0,0); - text-shadow : 0 0 1px rgb(255,255,255); -} - -.selected .create-palette-remove-color { - top: -1px; - right: -1px; -} - -.create-palette-color:hover .create-palette-remove-color { - opacity: 0.6; -} - -.create-palette-color .create-palette-remove-color:hover { - opacity: 1; - color: rgb(240,80,80); - text-shadow : 0 0 1px rgb(0,0,0); -} - -/*SPECTRUM OVERRIDES*/ - -.create-palette .sp-container{ - background-color: transparent; - border: none; - box-shadow : none; - border-radius:0; - padding:5px; -} -/************************************************************************************************/ -/* Import dialog */ -/************************************************************************************************/ - -#dialog-container.import-image { - width: 550px; - height: 360px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.import-image { - margin-top: -150px; -} - -.import-subsection { - margin-left: 25px; -} - -.import-section:not(.import-subsection) > .dialog-section-title { - width: 50px; -} - -.import-section-preview-title { - position: absolute; - margin-left: 50%; - margin-top: -28px; -} - -.import-section-preview { - position: absolute; - display: inline-block; - border: 1px dashed #999; - border-radius: 3px; - margin-left: 50%; -} - -.import-section-preview img { - max-width: 220px; - max-height: 220px; - display: block; -} - -.import-section-preview.no-border { - border-color: transparent; -} - -.import-section-preview canvas { - position: absolute; - left: 0; - top: 0; -} - -.dialog-section-title { - display : inline-block; - width: 80px; -} - -.dialog-section-radio { - margin-top: 15px; - vertical-align: sub; -} - -.import-size-field:nth-of-type(2) { - margin-left: 5px; -} - -.import-image-file-name { - display: inline-block; - overflow: hidden; - - width: 200px; - vertical-align: middle; - - word-break : break-all; - white-space: nowrap; - text-overflow: ellipsis; - - font-style: italic; - font-weight: normal; - text-shadow: none; - color: gold; -} - -[name=smooth-resize-checkbox] { - margin : 0 8px; -} - -.dialog-import-body { - padding: 10px 20px; - font-size:1.3em -} - -.import-button { - font-size: 1em; - height: 28px; - padding: 0px 10px; - margin-top: 15px; -} -.performance-link { - display: none; - position: fixed; - bottom: 10px; - right: 10px; - z-index: 11000; - cursor: pointer; - opacity: 0; - transition : opacity 0.3s; -} - -.performance-link.visible { - display: block; - opacity: 0.66; - animation: glow 2s infinite; -} - -.performance-link.visible:hover { - opacity: 1; - animation: none; -} - -#dialog-container.performance-info { - width: 500px; - height: 525px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; - margin-top: -260px; - -} - -.dialog-performance-info-body { - font-size: 13px; - letter-spacing: 1px; - padding: 10px 20px; -} - -.dialog-performance-info-body ul { - border: 1px solid #666; - padding: 5px; - border-radius: 3px; -} - -.dialog-performance-info-body li { - list-style-type: initial; - margin: 0 20px; -} - -.dialog-performance-info-body sup { - color: gold; - cursor: pointer; -} - -.show #dialog-container.performance-info { - margin-top: -300px; -} - -.dialog-performance-info-body .warning-icon { - float: left; - margin-top: 10px; -} - -.dialog-performance-info-body .warning-icon-info { - overflow: hidden; - margin-left: 30px; -} - -/************************************************************************************************/ -/* Unsupported browser dialog */ -/************************************************************************************************/ - -#dialog-container.unsupported-browser { - width: 600px; - height: 260px; - top : 50%; - left : 50%; - position : absolute; - margin-top: -130px; - margin-left: -300px; -} - -.unsupported-browser .dialog-content { - font-size:1.2em; - letter-spacing: 1px; - padding:10px 20px; - overflow: auto; -} - -.unsupported-browser .supported-browser-list { - padding: 5px 20px; -} - -.unsupported-browser .supported-browser-list li { - list-style-type: square; -} - -#current-user-agent { - color: gold; -} - -.user-message { - position: absolute; - right: 0; - bottom: 0; - padding: 10px 47px; - max-width: 300px; - - border-top-left-radius: 7px; - border: #e1a325 2px solid; - border-right: 0; - border-bottom: 0; - - color: #222; - background-color: gold; - - font-weight: bold; - font-size: 13px; - - z-index: 30000; -} - -.user-message .close { - position: absolute; - top: 6px; - right: 17px; - - font-size: 18px; - font-weight: bold; - - cursor: pointer; -} - -.user-message .close:hover { - color: black; -} - -.progress-bar-container { - position: absolute; - left: 0; - bottom: 0; - padding: 10px; - width: 360px; - border-top-right-radius: 2px; - border: gold 2px solid; - border-left: 0; - border-bottom: 0; - background-color: #444; - font-size: 14px; - z-index: 30000; - color: #eee; -} - -.progress-bar-item { - float: left; - height:20px; -} - -.progress-bar-status { - line-height: 20px; - width : 40px; - overflow : hidden; - margin: 0 0 0 10px; -} - -.progress-bar { - border : 1px solid grey; - margin-top: 8px; - height : 4px; - width : 300px; - background : linear-gradient(to left, gold, gold) no-repeat -300px 0; - background-color : black; -} -.toolbox-container { - border: 2px solid #888; - font-size: medium; - color: white; - text-align: left; - border-radius: 2px; - margin-top: 5px; - overflow: hidden; -} - -.toolbox-title { - padding: 8px; - margin: 0; - font-size: 15px; - /* reset for firefox */ - height: 16px; - background: #222; -} - -.toolbox-buttons { - flex-shrink: 0; - overflow: hidden; - border-top: 1px solid #666; - border-bottom: 1px solid #222; -} - -.toolbox-buttons .button { - /* Override border propery on .button elements from form.css */ - border-style: solid; - border-color: #333; - border-width: 0 1px 0 0; - border-radius: 0; - - background-color: #3f3f3f; -} - -.toolbox-buttons .button[disabled], -.toolbox-buttons .button[disabled]:hover { - background-color: #aaa; -} - -.toolbox-buttons button:last-child { - border-right-width: 0; -} - - -/** - * Layers container - */ -.layers-list-container { - min-height: 85px; - display: flex; - flex-direction: column; -} - -/** - * Layers title and toggle preview - */ - -.layers-title { - position: relative; - flex-shrink: 0; -} - -.layers-toggle-preview { - position: absolute; - top: 0.3em; - right: 0.5em; - - color: #999; - font-size: 1.3em; - cursor: pointer; - - transition: 0.2s linear; -} - -.layers-toggle-preview:hover { - color: white; -} - -.layers-toggle-preview-enabled, -.layers-toggle-preview-enabled:hover { - color : gold; -} - -/** - * Layers buttons - */ - -.layers-button { - margin: 0; - width: 16.66667%; - float : left; -} - -/** - * Layers list - */ - -.layers-list { - font-size : 12px; - overflow: auto; -} - -.layer-item { - position: relative; - display: flex; - height:24px; - line-height: 24px; - border-top: 1px solid #444; - cursor: pointer; -} - -.layer-item .layer-name { - padding: 0 0 0 10px; - flex: 1 auto; - white-space: nowrap; -} - -.layer-item .layer-name.overflowing-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.layer-item:hover { - background : #222; -} - -.layer-item-opacity { - padding-right: 8px; -} - -.current-layer-item, -.current-layer-item:hover { - background : #333; - color: gold; -} -.palettes-list-container { - min-height: 100px; - display: flex; - flex-direction: column; -} - -.palettes-title { - flex-shrink: 0; - background-size: 22px; - background-repeat: no-repeat; - background-position: 97%; -} - -/** - * Palettes action buttons - */ - -.palettes-list-container .toolbox-buttons { - background-color: #3f3f3f; - height: 24px; - padding: 0; -} - -.palettes-list-button, -.palettes-list-select { - margin: 0; - float: left; -} - -.palettes-list-button { - width: 16.66667%; -} - -.palettes-list-select { - width: 66.66667%; - height: 100%; - padding: 0 5px 0 5px; - - color: #aaa; - font-size : 0.75em; - - text-align:left; - font-weight: normal; - - transition : background-color 0.3s, color 0.3s; - cursor:pointer; -} - -.palettes-list-select:hover, -.palettes-list-select:focus { - background-color: #484848; - color: white; -} - -.palettes-list-select:focus { - outline: none; -} - -/* - * Palette colors list - */ - -.palettes-list-colors { - height: 100%; - max-height: 160px; - overflow: auto; - padding-top: 5px; -} - -.palettes-list-color { - cursor: pointer; - float: left; - margin: 0 0 5px 5px; - width: calc((100% - 30px) / 5); - height: 32px; - position: relative; -} - -.palettes-list-color div { - height: 100%; -} - -/* - * Placeholder when no color is available in the current palette - */ - -.palettes-list-no-colors { - height: 35px; - line-height: 35px; - width: 100%; - color: gray; - font-size: 0.7em; - font-style: italic; - text-align: center -} - -/* - * Primary and secondary color markers - */ - -.palettes-list-primary-color:before, .palettes-list-secondary-color:before { - content: ""; - position: absolute; - bottom: 1px; - display: inline-block; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); - width: 14px; - height: 14px; -} - -.palettes-list-primary-color:before { - left: 1px; -} - -.palettes-list-secondary-color:before { - right: 1px; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); -} - -/* - * Color index for the 9 first colors - */ - -.palettes-list-color:nth-child(-n+10):after { - position: absolute; - top: 0; - right: 0; - - background-color: black; - color: gold; - - font-family: Tahoma; - font-size: 0.5em; - font-weight: bold; - - padding: 2px 3px 2px 3px; - border-radius: 0 0 0 2px; -} - -.palettes-list-color:nth-child(1):after { - content: "1"; -} - -.palettes-list-color:nth-child(2):after { - content: "2"; -} - -.palettes-list-color:nth-child(3):after { - content: "3"; -} - -.palettes-list-color:nth-child(4):after { - content: "4"; -} - -.palettes-list-color:nth-child(5):after { - content: "5"; -} - -.palettes-list-color:nth-child(6):after { - content: "6"; -} - -.palettes-list-color:nth-child(7):after { - content: "7"; -} - -.palettes-list-color:nth-child(8):after { - content: "8"; -} - -.palettes-list-color:nth-child(9):after { - content: "9"; -} - -/** - * Animated preview styles. - */ - -.preview-container { - flex-shrink: 0; - - border : 0 Solid black; - border-radius:5px 0 0 5px; - box-shadow : 0 0 2px rgba(0,0,0,0.2); - font-size: 0; -} - -.preview-container .canvas-container { - overflow : hidden; -} - -.preview-container canvas { - border : 0 Solid transparent; -} - -.canvas-container .animated-preview-canvas-background { - position : relative; - height: 100%; -} - -#animated-preview-container { - background: #333; - border-radius : 0 0 2px 2px; - overflow : hidden; -} - -.canvas-container-wrapper { - height :200px; - width : 200px; - overflow:hidden; -} - -.preview-container .background-image-frame-container { - height: 100%; - width: 100%; - position: relative; - background-position: center; -} - -.display-fps { - float: left; - color: #aaa; - font-size: 12px; - min-width: 55px; - vertical-align: bottom; - line-height: 26px; -} - -.range-fps { - overflow: hidden; - width: 100px; - height : 26px; - margin : 0; - box-sizing: border-box; -} - -.preview-toggle-onion-skin { - font-size: 2rem; - color: #aaa; - float: left; - line-height: 26px; - height: 100%; - padding-left: 5px; - padding-right: 5px; - border-right: 1px solid #222; - transition: 0.2s linear; - cursor:pointer; -} - -.preview-toggle-onion-skin:hover { - color : white; -} - -.preview-toggle-onion-skin-enabled, -.preview-toggle-onion-skin-enabled:hover { - color : gold; -} - -.preview-contextual-actions { - position : absolute; - z-index: 500; - right : 10px; - top : 10px; - - cursor : pointer; - - opacity: 0; - transition: 0.3s opacity, 0.3s border-color; -} - -.minimap-container:hover .preview-contextual-actions { - opacity: 1; -} - -.preview-contextual-action { - float: left; - - width : 18px; - height: 18px; - line-height: 18px; - margin: 0 5px; - - border: 2px solid white; - background-color: rgba(0, 0, 0, 0.3); - color: white; - - font-size: 10px; - font-weight: bold; - font-family: Tahoma; -} - -.preview-contextual-action-hidden { - display: none; -} - -.preview-contextual-action:hover { - color: gold; - border-color: gold; -} - -/** - * Drop-down in preview size selection - */ -.preview-drop-down { - float: left; - position: relative; - width : 22px; - min-height: 22px; - margin: 0 5px; -} - -.preview-drop-down.preview-drop-down-disabled { - opacity: 0.5; -} - -.preview-disable-overlay{ - position: absolute; - width: 100%; - height: 100%; - display: none; -} - -.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { - display: block; - z-index: 10; -} - -.preview-drop-down .preview-contextual-action { - position: relative; - margin: 0 0 -100% 0; - opacity: 0; - transition: opacity linear .2s, - margin linear .2s; - transition-delay: 0s, .2s; - z-index: 1; -} - -.preview-drop-down:hover .preview-contextual-action { - margin: 0 0 5px 0; - opacity: 1; - transition-delay: 0s, 0s; -} - -.preview-drop-down .size-button-selected { - opacity: 1; - color: gold; - border-color: gold; - z-index: 5; -} - - -.open-popup-preview-button { - border : 2px solid white; - background-color : rgba(0,0,0,0.3); -} - -.open-popup-preview-button:hover { - border-color: gold; -} - -/** - * The regular image is provided by the sprite icons.png+icons.css - */ -.icon-minimap-popup-preview-arrow-white:hover { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); - background-position: 0 0; - background-size: 18px 18px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); - -} - -.transformations-container { - flex-shrink: 0; -} - -.transformations-container .tool-icon { - float:left; -} - -/*** -Spectrum Colorpicker v1.1.2 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue -{ - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top -{ - margin-bottom: 3px; -} -.sp-color, .sp-hue -{ - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error -{ - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container -{ - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container -{ - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container -{ - border-right: solid 1px #ccc; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el -{ - position:relative; -} - -/* Initial */ -.sp-initial -{ - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -/* Buttons */ -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview -{ - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette -{ - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el -{ - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container -{ - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel -{ - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover -{ - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active -{ - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el -{ - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner -{ - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner -{ - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -/** - * Piskel specific CSS for spectrum widgets - */ - -/* Widget's main container */ -.sp-container { - border-radius: 4px; - background-color: #2B2B2B; - border: solid 4px #888; - padding: 5px 5px 0 5px; - box-shadow : 0 0 5px 0 black; -} - -.sp-container[data-y-position=bottom] { - border-top-left-radius: 0; -} - -.sp-container[data-y-position=top] { - border-bottom-left-radius: 0; -} - -/* Color square container */ -.sp-color, .sp-hue { - border : 1px solid #222; -} - -/* Remove the padding on the input container */ -.sp-replacer { - padding: 4px; - height: 100%; - border-width: 0; - box-sizing: border-box; - -moz-box-sizing:border-box; - background-color: #444; -} - -.sp-replacer:hover { - background-color: #888; -} - -/* Hide the triangle */ -.sp-dd { - display: none; -} - -/* */ -.sp-preview { - margin-right: 0; - height: 100%; - width: 39px; - border-width: 0; -} - -.sp-palette-row-selection { - max-width: 62px; -} - -.sp-palette .sp-thumb-el { - margin : 0 5px 5px 0; - width: 24px; - height: 24px; - border-color: #444; - -} - -.sp-picker-container, .sp-palette-container { - padding-top: 5px; - padding-right: 5px; - padding-left: 5px; - border-left-width: 0; - border-right-width: 0; -} - -.sp-picker-container { - padding: 5px; - padding-bottom: 300px; - margin-bottom: -295px; -} - -.sp-slider { - height: 5px; - left: -2px; - right: -2px; - border: 2px solid white; - background: rgba(255,255,255,0); - opacity: 1; - border-radius: 2px; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-dragger { - border-radius: 8px; - height: 12px; - width: 12px; - border: 2px solid white; - background: none; - box-sizing:border-box; - -moz-box-sizing:border-box; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-palette .sp-thumb-el.sp-thumb-active { - border-color: gold; - box-shadow: 0 0 0px 1px gold; -} - -.sp-input { - border: 1px solid #666; - margin: 0; - background: #111; - border-radius: 2px; - color: #D3D3D3; - font-family: monospace!important; -} - -.sp-input.sp-validation-error { - background: #330000; -} -/*! - * Bootstrap v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.tooltip { - position: absolute; - z-index: 30000; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; -} -.tooltip.right { - margin-left: 3px; -} -.tooltip.bottom { - margin-top: 3px; -} -.tooltip.left { - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} - -.tooltip { - line-height: 20px; -} - -.tooltip.in { - opacity: 0.95; - filter: alpha(opacity=95); -} - -.tooltip { - line-height: 20px; -} -.preview-list-wrapper { - position: relative; - height: 100%; - overflow: hidden; -} - -.preview-list-scroller { - overflow-y: scroll; - overflow-x: hidden; - height: 100%; -} - -.top-overflow, -.bottom-overflow { - height: 20px; - position: absolute; - left: 0; - right: 12px; - - -webkit-transition: all 500ms ease-out; - -moz-transition: all 500ms ease-out; - -ms-transition: all 500ms ease-out; - -o-transition: all 500ms ease-out; - transition: all 500ms ease-out; - - background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), - linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); - background-size: 30px 40px; - background-repeat: repeat-x; - background-position: 3px 0; - z-index: 10; -} - -.top-overflow { - top: -20px; -} - -.bottom-overflow { - bottom: -20px; - background-position: 3px -20px; -} - -.top-overflow-visible .top-overflow { - top: 0; -} - -.bottom-overflow-visible .bottom-overflow { - bottom: 0; -} - -.preview-list { - list-style-type: none; - padding-right: 9px; -} - -.add-frame-action { - margin-top: 8px; - padding: 6px 0; - overflow: hidden; - width: 96px; - - border: #888 solid 3px; - border-radius: 4px; - - color: #888; - background-color: #222; - font-size: 13px; - cursor: pointer; -} - -.add-frame-action-icon { - margin: 3px; - float: left; -} - -.add-frame-action .label { - overflow: hidden; - text-align: left; -} - -.add-frame-action:hover { - border-color: gold; -} - -.preview-tile { - position: relative; - border: #444 3px solid; - border-radius: 3px; - margin: 5px 0; - width: 96px; - height: 96px; -} - -.preview-tile:first-child { - margin-top: 0; -} - -.preview-tile:hover { - border: #999 3px solid; -} - -.tile-view { - position : relative; -} - -.preview-tile .tile-overlay { - z-index: 10; - position: absolute; - background-color: rgba(100, 100, 100, 0.6); - opacity: 0; - height: 30px; - width: 30px; - border: none; -} - -.preview-tile:hover .tile-overlay { - opacity: 1.0; -} - -.preview-tile .tile-overlay.tile-count { - display: block; - opacity: 1.0; - border-bottom-right-radius: 3px; - top: 0; - left: 0; - font-size: 14px; - line-height: 30px; - color: white; - font-weight: bold; - text-align: center; - cursor: default; -} - -.preview-tile .tile-overlay.delete-frame-action { - top: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.duplicate-frame-action { - bottom: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.dnd-action { - bottom: 0; - left: 0; - border-top-right-radius: 3px; - cursor: move; -} - -.preview-tile.selected { - border-color: gold; -} - -.preview-tile.selected:after { - content: ""; - position: absolute; - top: 38px; - right: -9px; - border: transparent 4px solid; - border-left-color: gold; - border-width: 6px 0 6px 6px; - border-style: solid; -} - - -/** - * Drag n drop styles. - */ - -.preview-tile-drop-proxy { - border: 3px dashed gold; - background-color: rgba(255, 215,0, 0.2); -} - -.minimap-crop-frame { - position: absolute; - border: 2px solid gold; - z-index: 100; - box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; -} \ No newline at end of file diff --git a/clear_before_translate/img/canvas-backgrounds/canvas-background-light.png b/clear_before_translate/img/canvas-backgrounds/canvas-background-light.png deleted file mode 100644 index d11f6acd9d9f3a9d245446e703d27d6063a2cbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^xl_H+M9WCij$3p^r= z85p<)K$vl@^4?OQpj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9ish**M!Iz?iKvhwm zE{-7{-fzz?3$6Wp)I~Ph(G$b5}H3_P)u~3up_2r>mdK II;Vst0P*=nD*ylh diff --git a/clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png b/clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png deleted file mode 100644 index 9f8f188e275a3b66aeb10d56b1c42e333c060334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?4#uWfniGRt5@5mAFQf1m~xf zlqVLYG6W=M=9TFAxrQi|8S9zq85$UTDOw0r747Nb7~FVdQ&MBb@0CHMUUH||9 diff --git a/clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png b/clear_before_translate/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png deleted file mode 100644 index acd57cdee51965cb440415dbf46b08f446772866..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d+4#6QOkP~xHV-HyRpJ^^5}cn_ zQl40p$`Fv4nOCCc=Nh6=W~^tbXJ}yXrD!2gRkWvzV~B_M+p`OK84P%s55C(UA2?03 za^@bc!!;@oM1P(+{#SuJ(n=uZrNe~O`UdSkoRKFkH7a3LyE@pAMX1UdpX7UE=rtdq8U#JYD@<);T3K0RT{TQ#Swr diff --git a/clear_before_translate/img/canvas-backgrounds/canvas-background-medium.png b/clear_before_translate/img/canvas-backgrounds/canvas-background-medium.png deleted file mode 100644 index a90cd46c1ed87d8dea055869cd26a9decc69287b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?2{Hm<{;9GXjOAN?apKg7ec# z$`gxH83GbB^GfvmTtgJfjP*?Q3=Isv6fFd*it==E4Ds-Odv+l&g8>io!FTpS)3Q&V zeiAD2Oqp^0iFCVn?2#ufH7aJqUu{{!Y-t86P95j5@FXp3`C`iyo^k94_~8&v(DeJs19Scz#c` zbi^xxCRMh%M(T`F#NdcXrx9&Cvu{c4pMaK*cq0%A*dB^(3(Er{N;aoVq+G@(T#RV= z+=1%$KL9Nq@kXyjq^#JB?XeKmd>HbxDCvx0U^GKEr{UIcP5U&Upxs|y;>BxOh$y0< zk}u2$s48x1oY-)RkoMGXueki)R}g3l*cQG*u_~w$L@BKExw7nQ)?_b1MJ<`+n^(i1 z%~2nK2-}Km52mnLgnSg#MU{D`i%mfXf7KpJD_1a;aB#XWU+@7KkvhxcMHR&4PZRy2 z4Q1vvTdEyOX0Ipq;t>JcB2XN}UtDe%06#Q!T3a-K=OP(m>w+7URvjWYaGg0Jo8Bk4 z!6?bG!9^B;78bBn5fp@0Vn`y8=r7Vr3F#NH};Z^ zl^+P!HIN;=3X&k3Ttwp0b8h<2^L}bE#%S9#;OzcT%oPa_e#?*>ddVttjdX4<}t;jhJi{f&D! wmuu~UAnWQX@RxYsP7aJT>~4J*|JQf^4$M)BwJZJuO#lD@07*qoM6N<$g4Fa{y#N3J diff --git a/clear_before_translate/img/cursors/color-palette.png b/clear_before_translate/img/cursors/color-palette.png deleted file mode 100644 index 6e6e85212b85b7ba0918570c2ebede3047596237..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5iLZjC;k_h{kHThqfC`(hFmxSO zSd?`bB$R({-*5T0gITA{|Fu6pn0eqpx>}JTL$UWimE@yNe}L98c)I$ztaD0e0sx43 BPNV<; diff --git a/clear_before_translate/img/cursors/dither.png b/clear_before_translate/img/cursors/dither.png deleted file mode 100644 index bbbe6e9d472136d68a86c783ad494315ceaf60c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmV;v0zv(WP)tN#a-ClgdGb6so4$%A$aJJ1f4o}=-@Hvs&wcm zdFvMR2fAn=>@J}h%s7h~>?A0JVah_L?Bbh2e;rmgwW3?!%j5GNAAaBW9vsAR96OiG zNiLTY+qT8FZ83AEm`6BgHqIT#u@Aj4!2JBYoyla(NF)LXnM@WmL67Jlkj-Wg(TJSV zLDNX5)8>cb3)Q(c)}sNWQYnc>qm)WTM8LB0Xqr$c7STk*%3np$C>4qbf|buxuhn>Z zr}cFhAP55dz-L$a0QkOYtjY%jb+E6LLNxG|A_xK^vE;A@Fg-mb*^7PTEeiw+r2-m_ zCIH1k5dbT10Yb4*V)5f59m|uu;l{)OUn!J2I+-S`!$!W3h@gCh@B3W3|FRW;L?U4u zh9O?X6VLO+FbpvaLp-k{UZwJjE1q~>gA<8_-TZ}Wwb~zx$8ERlngI2B9TCBG%K+4B zbe@K#D^p}mh4^de-8ZSux$G>j zkbE%vo7`*=ME6$*MxJq6Z)NF?!@|}cMtYE)xfyoXHyL{MyXXXa`=Pt9kwSj1R|CF0=Fk*Fx-qOOAWINqw kBIup*SJy{pZ}C6!6a7#o3cllY1poj507*qoM6N<$f?LBr$p8QV diff --git a/clear_before_translate/img/cursors/dropper.png b/clear_before_translate/img/cursors/dropper.png deleted file mode 100644 index 2a161faeb79a247dbd80ad204e01108ea328ecc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmV+)0^t3LP)A3!~jw>Ki$8d;SW1I!v_WiHn30@PX?`T+jM%F?tO8AtA>5R;@Y>jE&9zku-w<6S~u(nw@fs zs|pPj1T0Q2xwQWHnl)!b!@^8~HV6HOc#q*fvJ0?j-gEiY9U&gJm)kp|U%wC#nDBko zssf;r8mtKk1pfT_qx|X9C&z-aTDaz-Xy=navHgGl{=EaVaS6_pc=_^W26lFK+m61e zMKH}-!PZBBm179+>8M4}$~m-n}~nwD~SkdEwTrTh^;K zY|r-d^PP72?C}r4us90LANO%-;sZuE2eJV`+ullx^7R0j2S83nP7laH7$~j)q}hS^ hBUFr$((DWnU;xEL=rr*FUHkw5002ovPDHLkV1mZ;^XLEo diff --git a/clear_before_translate/img/cursors/eraser.png b/clear_before_translate/img/cursors/eraser.png deleted file mode 100644 index e0d4b0201b9fc3f6f6da0c9b888822eafaac8414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)1RCwB?lh2D1VHn4scXm_|RPb*o z2t2F@!9+q64R!|)wREXlm!UK;JjfC*NEabIL{LnZWuc;5?7HNoAE&4}dY4uA7Bo7F zznz)4=Y4a;*7ejgygcu`?|k0x_kG@X2q6UQh{xlQN~OTzaKP2V8xU}e%?d!m6d(ye z3FglRz)uq>7}!JxMj{c2#bV%cx!{txZUIg1etP?iiB)&*+w1;dlVT>5*#z>nEr66% zJt}oI4Xp@}uDvUL+_|^KjRAZYU~@3|*6#6Pse>@3Xx_4*)9JwN+WP|&K*DcskZd-~ z9XOrNWfnzo+p?_ilWP%0?{>K|vriUTKR*Y*-w(Bi`_I=LpwjkqIt}M?ImJkYfTAi> zW)4_iYc~J(DKFxda1owNCgFTOugqpMFijKOcazISelK93&j%-u_Fv%Wsjv!<$K!CJ zP*BhThwbLNa}$1@o#7f5hpUgDzQkiZK_B0QRpnx_s9^pFX03_J)?R|cr@4bySiob% zzVc(VmCNO_G8&E6j-uUeV+{rHdcCms;kEpL&?ceei#;zg?JO>firZMi qS0)6!_zO_`=C*PVMkCl5`N9Qfv&d*`0-eD}<~0i_h~T|9uK{Sh1iG{f~V95!&s7MKs|n60}C zkzn&HrC{iR*Lc_X(N1o~Q9{P^)rrCDkFPQFm~b3@LTf9wAr;d5u1t=3K0-=LFt^4d zwDcAs-6P=mfUo{R4@Tk%wS15xkMH2}yZ%^*p!kkKv?qH_1hLBwjSXDRw(e3yW`y{hXv0)gfQS~Uxm{K`_{tBKt0531)Juuzx~o6D;hygrL@*680jFiiV;OfsoG@FMMQ8>mkf^5Q99;jl@vr! zoZJ<35QJc%Ewt*Ep;Qcl)_|2(#DrGO_q{alIwVB;M=c26=??dtd+xah{;||<2R}YP z=GLn5a%ENZ1dYIobe2Cvo$!dgTY~Rj5B-qF07oxoP?p8Q(}{R>xpKFyAdyITK@eoO z0w*W)NK2>!1YvM*lmWNK!m~Sp4KOq`?74177J=!R8B*yqN(50bI(iy~0@VZ~3WZQ! ze2EpZeH*|Soz*%_vo{#6TMj9VF*~00W_g`Uv}7}M$@HI_naO*)+h z*=)Jzc>ve|zV9=VOd<+qr)No}Q_zy@`#yz20cjB^5d_8j{M;{sjmAb!8LHQ7J}%r^{A1ih0A10LHyo+Zd*nR9fm3|0t|F@OS8&^dD`Pzp swk*yZ?xMfbA>12#a_;7f%lwb}34-#&=1IIcK>z>%07*qoM6N<$f^?<_O#lD@ diff --git a/clear_before_translate/img/cursors/mirror-pen.png b/clear_before_translate/img/cursors/mirror-pen.png deleted file mode 100644 index f51489460073ccd61817ab46e6f96fd5b22cfebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmV+|0@D47P)Llf6q@Q5c7xb91>@gRz2|N(4=YMnrVF2udl^ z4x%6q4(cZO2S__eCuh+iD2m-WI7o*I0ZSF6Lm{byS3wCVe#4Dg8=BDIXUsir!C>~kdT`hLf`_q+&ay zVmkmR4)rdtK?c?n+(y4)U+El}7r4qj#7_5V9SMq@23hd=S7dr0y}lmzOO<kqx>Y`N5G#KZuk(+dT&<1^7t!h^v@Ly0|+T4pN73& zpIu^ywlOnjQ8G=` z6$k%*1~6*N*xiU={`!K`?WSiklDB0lKsa*A+vO>IMiTpUo3WxhWm0sk9Q!R`<)*Es7cZe`iGfa00000NkvXXu0mjfwg>H5 diff --git a/clear_before_translate/img/cursors/paint-bucket.png b/clear_before_translate/img/cursors/paint-bucket.png deleted file mode 100644 index f82a8865a7bc0326fd56f27a869326be4a7d688b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 707 zcmV;!0zCbRP)d6{}iR@dma4U zGwNI63={10?wsg6GrMIz9=9gZKjA|+f3>GAK+D|GJH82pDTdw`PIL|}-E9ldO1tCE zh!Y}h7`H{Mc=~qbQ(FLcAgsD6T*IKskM2jy_-qNlZnsM>1c*c;%G7om9HAYZ4@|gr ze-YdHGL{@3SlraFMS}W1yBeCDwgj)70ffV0WjdWkyAqr__<>5Lf>Nmjzuyn#`-SF| zCD@#CrZM!vJ3OHFTxO9ZIYyfsjRp#Z0 zMwk*D4u?7#jpFF&2#1GEG`Byu|C}hU^-i!wvCE+^rj9RT$?eTa}EEYkR zMK{!HwbGGEfk1HjC$2x=82slTsZ=WU`uaN4eVfe&i9|y3`F!?;Cy|z1E>{~228hLC plE>q<_Zv^tYSsXk%l)sJ)*onV;!t9*YM1~3002ovPDHLkV1n&hO1S_4 diff --git a/clear_before_translate/img/cursors/pen.png b/clear_before_translate/img/cursors/pen.png deleted file mode 100644 index 0bfecd50ee9f5bc5828f0c0745aa3e0effcbe250..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 450 zcmV;z0X_bSP)Rq1}l<=psl5*5Xz9i;M}s*NP=ugs7Q#8Z;Dyx|}!`#}xw_C3!B-yaPC&0j)XcpuX@rNfq|q}N(wJOjA& z>u+z?dfJEuLePrqzy!)73pvLjxk4d6XNZt?hm_iYES{i}J5y3l?}PPNYDBR7oPc~6 zL^d)Bi4Q2L3pnp!nFxN9c2E+=@XAl&+;2m6a~kZj1r3Mz3C=hmUG<{+vWR@t4q?fJ zhFc(ozZD#Mx`^Q~g1v=K6!QnfuqyD4>U4EjF0eamL}Jx| z%&`kR-H+3GBYr*Qx}frLU4`%n9(`uSomzw)t%%NagXkA*R5Mbv9VLDp1wMo$cOMa~ s3Wm%r7^bwK$2$}-<~D8p`#1iScU4^XCLAA~0ssI207*qoM6N<$g3sK(Qvd(} diff --git a/clear_before_translate/img/cursors/rectangle.png b/clear_before_translate/img/cursors/rectangle.png deleted file mode 100644 index d28dc6b1a4420e67d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!>B*)`xfEv!4N6IG{J&h49W#Bz^(#YWw%`e_a{8n{G9m5AeR~_yl0%<7V@p zoFLbbGsXyTy}N+`03Sfte6l%hAuO~kXPr`U@ZPxe%b zqMn2tlpaKkDW$bwL5w1Hg=mGSZ4*pfO+q&{wN1Lsjt3!^R9JA%?|Z}h-wg1dhq)~* z%nf+9s-e8~lXW>whikrk&Z{bemc7j zFs=dsoccO4(~}N&gZJsTL4Jnf;v?9VEbK}a0Kf%pGgnxxqEVcNv#Da)D8c6spz{4I zj$e7oge&~xG2~7T>VacmRtfdo2Mk<&&i=WDHoRSc(sKrt^n294tRQmjRm-(y@M0q3 z8n-o=z11i6^LJh2)(H15g+k#zW%bC&ILwt9MD@n5_{PJ0FA*Ch!6SlLDt<1wKmcHC z&gzL+0(%q>J|-7oRGaASKZ#m;9(A*XC&8)ISb~3&QXc9MT=Q!J8x2PXu+VymDi`?m zasqnLi_gXqjMr1py1QWk8jV3{op=>oYa}DSa+!VwuBKD4m-EU6$iFm*1_LKbqA8zPB9^elD00000NkvXXu0mjf Dw^|VR diff --git a/clear_before_translate/img/cursors/vertical-mirror-pen.png b/clear_before_translate/img/cursors/vertical-mirror-pen.png deleted file mode 100644 index cf2157d808d6e2257a792a2dd3ad1e9ddefb5c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)jk3mRNaU93L|Nr(jY_l2UJ2)^m2h&zGb`XMg zDG%YGIu%`lP6k02aaJTkr<6_=i5PSVBzH!ryt+X@B3p!g#Ey)Ei#$Rp3GGR`)+Vx0=LtWG3FRvd~t;w1x~2bX{xDD zIyb1s54n$O0|^-U1#m;@CB_&k^FMyd_vlEt9k%rb9^W!}U2_VC)MM}EvLW53y5VQh(i7O!z~?9K{_&3T z`VQID09AU7GE8h5L9D!+N6XDAR^&(F{`e}3!=iw#}5u#Tg^3nctWfs1Hmk-X; z@nk1*BVEXSn1Q$P6pH#9I{Ky=04#pn0Out=QOHWa{k|wd@iVZLapdxv4FI{kwqq&d z2*s1|`=Tghr43%vpBBDiZb{#{d~3)%`l!=Pghh8- pYX~H4&6M=-*DnmnOBDeTVHZOpxosdUl1cyo002ovPDHLkV1ipX1AhPj diff --git a/clear_before_translate/img/cursors/wand.png b/clear_before_translate/img/cursors/wand.png deleted file mode 100644 index 44ccbf812879c42cb1f9587d865bcfc337ce6361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)hUn2-Navsqo?5A8 zh}}V^=%7@_%C;=H{tGpIj5CMu*>5J=i;m^t2QTySd)}9aAppozC}++wDz`eOViU-dbRRoz=JsVlZk>N%^azhi%=xTCt9`LQjtqNFW~e|R=r9= z`@I3J^#z@aD5yBuq2DLQO#|4uFW6R5kzPZ+h&6Af&5}POarL&lA~3t5R1i7uh*ffDw@qEs=HBW ze?CI~MkvG6H-MF7r{Yv4kw_q&PNP^XqFgTHXlH@RpLO}3aV{T{Ez=8lo;PHV$Ads1 zfOtF(s5%5V>3qE|&{lueV1Y1j%GF zXt&#NI-LlGLPN>_18TJzN~Mxf*f6pY5Dteo^|P&3>(H{!KTr&_wGRQWb^rhX07*qo IM6N<$g7V1&P5=M^ diff --git a/clear_before_translate/img/favicon.png b/clear_before_translate/img/favicon.png deleted file mode 100644 index f85de46de273c6d0058ee69464c5bad1641e8ae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr}70DGLM)n!cRA^7ns# z&bi5IZf+M_oHdfxi{CK(w7YC!N9~>1V-_(y3shtdCLZ|Iz^YpCPvcKwO5E8VrElh6 z^p%5!g}ZL--&H@sL57VjK&B(!R5F06{kIkK<2u$5!{h8cJ+_ZlB&q64Dl}T~0F4n~ YJSEp6=*p+T3v>g6r>mdKI;Vst0Kqpr-~a#s diff --git a/clear_before_translate/img/icons.png b/clear_before_translate/img/icons.png deleted file mode 100644 index c6e3bef2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1e^n@a(<;v3CEBkWl zf+V%C*iL?Z;Yo|$!hfCn+kb73ajI2Q`+i$I<3M1p{OO4)ul`-}$xGIma+6Ec%#CNo4FVJ%gp00i_>zopr0JZOiV*mgE diff --git a/clear_before_translate/img/icons/common/common-keyboard-gold@2x.png b/clear_before_translate/img/icons/common/common-keyboard-gold@2x.png deleted file mode 100644 index c647658deb76b7f78bc445357551116b89a9df80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmeAS@N?(olHy`uVBq!ia0vp^9zd+c!3HD+F3O4lDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?+dW+z zLoyoQ&a%y73KVGAUujr-;8>K4S;BKhouH*31fr^#6fGOnJtX-j9B(Is9FAb?i=Z zd|!0FEq%cx|0%7Beha)~-9IR2Xg_D&amsSXq77;nmaS91$eH?p_r7K3Gl#`3mz;%) zu4yo@lMH$+{7rvlu}h0&XjqBBuQz^ytV_d{E+oY_8a)V;FYYi=4_Wz<(Z)znKKYN2)pKO_6 zd9t(6kxlQ!0anQ!3e7#~cBQ}LrB+@)S3aSU+o-^iO>$;Qms9$_{|0)k?-iKEQyw(& z#DJte_*nI(U)p~dtnL5#CI6+)FX?UtYXKYf<9cz^;q}iy#MW&~cKf=-P_*;Qt=3eA zW1YuD=L)xl=))2kKNyLZ&rX?|zHLDmp!vprRu_X?jmC=0x7auAPrE*sbwA^bw< zWzz36*GpX%oV|8ysqz1n1+9OrGCw$d>T&v{FBZ2mjcta7J20LZJYD@<);T3K0RRMR B=Dq*` diff --git a/clear_before_translate/img/icons/common/common-swapcolors-arrow-grey.png b/clear_before_translate/img/icons/common/common-swapcolors-arrow-grey.png deleted file mode 100644 index e80406a694e03977741bc1ef8a1dca64f4d4a550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)Oj6hRcne=~D)>d|gq(~u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~c970U@^b^~-+fqW6DapE=B=W2#33kvm~Y4&<_y-Kq# zP*+LN5e2X)uwUSsz-NJZfveWHsImycZq7(~LE)5Vn%z#^o#?FN?^Zb*0uAK^9a9b83#6TR)`?{uf7)u@+|gos zhhIXCISq6u?*Jk>=Xk;Uep54`a<5}dV{rc>rkPa}nG;AUjr()dt70je$@VuC(Y4PFaWd324ArqL6xvbk=p`*A?wf@hkY1+=w}rnZ2l z(^KzU4A94_=u5G;hXwRGf!tr>#@29aK1v1(mpr@g*db>^U}6VNho|nvB%n`Kv6-NA zI%L6&s{N!iP`KjRbz1Q%a$^Nws`tAhk#Cc5-YtXHCO)sdSea) z%fWXv<+US-eBC?58wtcS2?C_HV4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0uqJzX3_ zJUZV_bL2W~z{7HV>2e#@@B5bT{2u(v|NJ}uqI)qRNh@TPXFg)tlVD(Wi!pVv$^;kw zySoC|e`q~$o$h^b<}1kq(ck$QWzMkdb_O7cc?bFAG*8M`O`?p_Z_@K)(?~(Vi zU+W)mHdxfSW}mj=I5204dHMNMu_64ytHdW|tL+V2t1{oxZF_pnuCV37t4w724jejV zBF+5dO2WZ=X)of==uIt{%5?otXZizj%F1+q%ckcUQzopr06C?B6951J diff --git a/clear_before_translate/img/icons/frame/frame-dragndrop-white@2x.png b/clear_before_translate/img/icons/frame/frame-dragndrop-white@2x.png deleted file mode 100644 index c1011816c69f85ba04f296cb9828b6944a0c3d38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4JCOfpuKeW$?tgAG z9(F3ud#tFm=2?pLaVd7~_T_u-a@`kPQj^wF;j$RWA20NAUIQXN=MC-^ z#{Rh{|ID(lGU(ZKMLBn>>D4bEPaHHzt8giBU*EFi&vLFcGIb0)_U))+eeK=Qbky1J zvvxQ8c^T&0QF@=d5A5%;M}N;tzn%|_ OMg~t;KbLh*2~7aSjymg=bFoy|KI!2Hmu;V(1+(!OYZFX zX`uZp=jgZDkN;V)F27tXlD6Z#eZu|Qv){kixAo<6p5_vnT}+l6nU)D3dEe(8te_rt zprmR3o(E=yFF8+iiW=0;`MTCTLdn5zO~Xs3S&5wtAhp~XZK_O9j&RM;TOc`&V}h`D z!mfri3`G?=9OsrT&(VIcQPE=dyiIExj<-E{^Wf#qKkfRD!`p9vV(^p-OUQh9auU$@ N44$rjF6*2UngE!ZpI-m~ diff --git a/clear_before_translate/img/icons/frame/frame-duplicate-white@2x.png b/clear_before_translate/img/icons/frame/frame-duplicate-white@2x.png deleted file mode 100644 index d6c28c6e9ef509c8646c292ebece155690fc0baf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85pG3fiPoFZ1E4Epj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9i zsh**M!Iz?i3=B-{o-U3d8P0F71^Ve2^0)+wot3(IZO^J_St%yAg~!+HE}5Vl*;Eqh z^Y2H6ja+?}AAk6~r*GNU=h;`3{yw<+Hhb5ss-eK{%$v-%z`}68A z?0X(uerf*rbLzSyn!%MoEkC{-`S_tuX}X2na-XM}A^m#xa((>|UV!YHdFt{CyWM}P z9%Q^_mv(3G(_1*H$OJ69uf)=>V2aW_D0g1j&yoij9T}%CTBK_EFaEXd^mAtSd_iwZ zDX^J$|NgS8bUiY2`~Nu-8>cKTJQXs}?WqnXH-~Xzi-zopr0AI5yQvd(} diff --git a/clear_before_translate/img/icons/frame/frame-plus-white.png b/clear_before_translate/img/icons/frame/frame-plus-white.png deleted file mode 100644 index 5227e9cfd8fd7274377d3a8a7642f9d89290ce82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$AY=VKT^vI^ zI+OqW|8LK1%OD(^Be}Ih=z!CrsxMOxd#pM3P`qTZ*hJofrB+F&RbyTm1U>%1y^FD5 xImWVXONzwSjv|MwT9*gZZ&m>{5qh~44$rjF6*2UngAI|Lq`Ar diff --git a/clear_before_translate/img/icons/frame/frame-plus-white@2x.png b/clear_before_translate/img/icons/frame/frame-plus-white@2x.png deleted file mode 100644 index 090f9a6a1023d7a032b15ffe2ddcdff0064fca55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkg1|*MGNWTVBEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4mdKI;Vst09iF%L;wH) diff --git a/clear_before_translate/img/icons/frame/frame-recyclebin-white.png b/clear_before_translate/img/icons/frame/frame-recyclebin-white.png deleted file mode 100644 index 98a6e4ea60d7f9089be1617d33c3585cdce60d93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0v}JY5_^ zJUZV_HRL;Fz~dS(AT&22v9-~;fZ6Zn;stRH&ISi=t&2UIq|ei-92MlE6S?t`yuE7R z90jE*8$t!MSpTzD%w1^9DE`%W!}XtXI~c>i?p{5sV@Zv&(%K(uubN)mC08(=(e!mt z>ETP#CpbDTAJ;s%H~9IrXHC)y88Y`CrSW}O@Yrn8#ybKRQ<`(dySAP=`rl79=HPzjI>yQM3?Xv0$7TWj!QkoY K=d#Wzp$Pz|*?E@$ diff --git a/clear_before_translate/img/icons/frame/frame-recyclebin-white@2x.png b/clear_before_translate/img/icons/frame/frame-recyclebin-white@2x.png deleted file mode 100644 index 1ed1955f5d2c83deee2916b2f92a78456ce32d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4ZMV|lm0nGxYoNZ?+81)*tA9$`@XQ;@s zcB7z^1Y2!e>Nc;rQL=Vy=Nd(OH*nT4r5~7T;^F*5UZVDlX1H#BNM) zJ99#|K!MZaXQ=Jp9T-vME zZM585Q+SVmzgFy;Q7?CF?uAzyUdi2UZ9U>2tebeXe^QLK%=(9GtYyTPZ~b^8>c;XC zZ>!4>-?VP^=YRZ2Y-SCU#as6uTV6+&TO6%ldv47`9ph^CH|gG>VA`>vH0FktUXCm{ b^q#XfdTJ&pAE`PAj7SDgS3j3^P6!lvI6;>1s;*b3=C|qL736UaGn=XP^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs% zRL{`B;7id$psG2ZE{-7<{%a>jbF~`qxNP=}-@TK&$Ud^i$!ANF)bfsxbut;tCNnQp zQL1NblT4TaBi<=q_MfP>F}`7;-j>uA>kkyPXYTWi>z<*Ox|U_VtIy&lRkt_duNpD~ z79Dx^dgi|OJKDCTXnjA|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0TsRRba4!c zXnlKaFYh4(0f&drIXWkqZemnbO%`0{)H8weghW7)tZU1mc#HTq7J7fOynjB4d1E1{ zxO~-8#`&TX!Wc85#5J$ji#ypYeCnKZ&uxmizc5PbfyKn+bML3By8JvJpfn|Sh46x9 zHL2+(8sEY&ddL6N6qE~1BvtcMu5|S4Vm@3S6;ACsI zp2UlGD`}n|cT-OqENGsT^uS)jlI@sdcLIYP-@iEC1rvfmLCWCi>gTe~DWM4f1lEL? diff --git a/clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white.png b/clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white.png deleted file mode 100644 index 4afa0e5d8bbf29d3b1c28e3fce647ffec67ef402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|mSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsNk`>*-%l@ftLXG(>jm*H7rISl6^=FnarMNs(JjGwzwx}b((zc;Y z&^qgQ6Uz-Z2gVb7C#+Xkuee-c=Zv2mksc5JHE3;->d@!f$foNMB#=H;XN9!o!t6_i kn>jTXmYm6PW4OuqJ7D%@AG>8wfz~s4y85}Sb4q9e0Q~<@p#T5? diff --git a/clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png b/clear_before_translate/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png deleted file mode 100644 index 6ffe2bf1127f2d2fa76e4934bb2c8cbf451c1c9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0Tn&+ba4!c zXnlLlR;bB9pzWc!w0FOA=F6=gLi*f4m_#D;_DUDF(rCAF?#4a#sZ1^-OC9?TXzlefb1 zo$*xeSB=&MIth%Q9OBQcoWQ!Fc~!yzwpDG7CK~LUPr1c2Jx!Q*KypW$tMTUr(@mtF zpZT$~F3+!(J(=Y*zbMn%#+i%mEHE|PuOYsI<=ED;)`>3anP)6+i9ZmuyTx5PNoW7e wP=kcuB_W3$q(VfQPcL{SF@rs~iLrutW5<(_td|RPfxcz%boFyt=akR{0HvLVy8r+H diff --git a/clear_before_translate/img/icons/settings/settings-export-white.png b/clear_before_translate/img/icons/settings/settings-export-white.png deleted file mode 100644 index 45d76e67541af98c32b39533dd8b50fd76297978..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcmV-T0 z1)1Ot#)FWI2N(hr0Re(g+{6x|EiB`6hFz?QVO%oSxIaHAI9evb1OcTWayL zsm05t7B8F1iZ5%-S=1e>k@w@j&Ui|020Ws5hAW%#THJsT7y?nU46TkLB1I!bXKv95 zMNMcLuc7fgo=zxg&Ni?H+~mv|0y~QBcfhVmJfGqNU=P>=-ZJJyz^Y>VClHv#^Ht*; zKo@8MS2^?U4Yz0Gsm3p6YPL7;8uuX{h{(r`$g7C7a^#015+%z}%;I?yKUF7D1{%k< zzKXdvXA^iJu5lFye><9*}WoL#b|A#T*x)cSrh+;Kd0w;5%kDw#k;o|6%{mWqpb zTSGdfCnEi+_5LEo2L|HrA~Km;pNL4uMclSI*MUdk=Cox5Yy)GBc)zf1&J*0E0XBhi z+nsGP9sp1LJX^RhCeHdOC!P|Uj344h8ej#u#^SZmRJ;isn+7SM100#|WLhdc;>TCt zM8q}!!kkLw%tA_s0Jt>S!RL#FFSO#Bd{_BX|G8B5^Mp>u%PJ8gDx2|IyliUmvZ=+( brn2H+%ZY1lxC17*00000NkvXXu0mjfQ4{=F diff --git a/clear_before_translate/img/icons/settings/settings-export-white@2x.png b/clear_before_translate/img/icons/settings/settings-export-white@2x.png deleted file mode 100644 index 5c9f5d941a2967dc3068a88df3e3a131c3f07fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfdb&7< zRLprh$1q#OQKD_W#754T^yJ5h;w&3ETU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^0-q?`6?&`N-mkviQqw^|P4&B=7gL%asV?6G6@U cxQYb+dofE|EEZ>30?Rc9Pgg&ebxsLQ0P>`18UO$Q diff --git a/clear_before_translate/img/icons/settings/settings-open-folder-white.png b/clear_before_translate/img/icons/settings/settings-open-folder-white.png deleted file mode 100644 index fd68fbf4aeacc965d7e60a846237e96eeaf85e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)< zXqv`aWZl0OsHGS0nqItXdhxF5#k-~#@0y7C4KyR#0?tg#ZW#uFL)I*IEi*oc-FP=9 zrx4@VDqC=V4D+OjtoS@OPU!j#uHs}i7!iMiZ52`(w&QIk5ZNl_>+6}FT# zY{&*$KH@OmSLRnt?ag`7P{$x)(cJ?o0;F|&CB1mp^x|F9i+4>g-Zg7h Z{1;aL1`c3Bh9v+1002ovPDHLkV1j5l0?+^e diff --git a/clear_before_translate/img/icons/settings/settings-open-folder-white@2x.png b/clear_before_translate/img/icons/settings/settings-open-folder-white@2x.png deleted file mode 100644 index 0a1fb21d2b647eb8b36fd53e4ca9f36b4ad0f33b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1008 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Radb&7< zRLprhdv~@-ph)}v-momi8!9V)upeTMLGaDmKf)p*U-$z=j=0w(D20j5 zx)E_iyzPgAtJJ|C4hNMC*-Rq4ZyqQzZoO&y+}!%+=YtyxrrAFK^!BcCar(QkRadnd z`}!8KU&w1IFjS23;Sd)-bd+RfPwNNY1KJC29WZ2_V=tG9|##C4SL$kw#?(xd#R|(vUm}8>e z7|NEc*<^n}_W_T=I*km)KkOThCFr;sal8o>*_5FRl!)ob^Id7?MAyzCkyw@bU7ti zXRKb-3b%ZLp=QGSx+bEYXw>UQ2=N9J=?)S{kCPm!zn?H}gzzMcjSuXlu!XKi(~y{=xFo^iPx6x3FjGB2{}0~>^UkSnQ+{@~ey=~XL2TZ+o~Z}w z9!uSuq4zXcr{({ey?u=9Cx5?Hr#U}K@lW8}Qcazw_aE%hK9dxGDm8)o=CN;8yBhAY z{hYc3=(>#pcFzAw%Ot0N+P=5D;-2oEhcj+B|F+P18f??LzvN7=uc*aZjVGFalp>=m z-$fj5dVj#vWp|bCzYtNKrm$c0)1n2)NVxFy{+~feaqHZ$E4BK-+{xhS>gTe~DWM4f Dtwy;* diff --git a/clear_before_translate/img/icons/settings/settings-resize-white.png b/clear_before_translate/img/icons/settings/settings-resize-white.png deleted file mode 100644 index f85cae210bed031acf4d27d3c58de6fe1c6bd5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsz5uAFIl=c zM=_{N|E1Uc2Hg*wbMHKzEnKqc^i){J@Wj( z+SMh{OHn(9VSP+cE90Myk8i@9$px~$o|6$Z`W66E_5at guLDbK>75midTQ~u;rn8FV5l*8y85}Sb4q9e0C)$SkN^Mx diff --git a/clear_before_translate/img/icons/settings/settings-resize-white@2x.png b/clear_before_translate/img/icons/settings/settings-resize-white@2x.png deleted file mode 100644 index 2db490a83afeae7ae146523de79d4930daf46dea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Rkdb&7< zRLpsM=b)c(pp4tc;G~XEetA9-lCctH8rC;HtJpLYY73bQ$RFJCHP>W9z-cC_lPb%^ zXIhrOd-_{7Ho)ui^Cx9$bK@e`glQkz99rG5T~+`Vl7Osy z=J>|xTiI_eX@BtgMt(Mb(4wyoe2=zmYo2~=-c_@{Fd!Yr)PCkg%B`di?MLph+cBV*;%{0-fYKz^ABu0 zE~xKXzWsss1LhA;@#49WMX? diff --git a/clear_before_translate/img/icons/settings/settings-save-white.png b/clear_before_translate/img/icons/settings/settings-save-white.png deleted file mode 100644 index bf131536531bda7c7f0470e4c065893ed22ce2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs`KDmFpr(Y2NxriyuI)sA>po(X$&%O_*PeQk~wwDW95NAzaPkJ1go_tx*8 zR>)Q$E-4WBHlir;&iCw?&0AN$n>=q0JHvUWHEmB1mau%#IC6@cyyNVS=t94hGx86Z-bu4LvX-+j+v$$f_DA|n XUyr@l_YPPH3lpinR(g8$%zH2dih1^v)|cBF)%Q3db&7< zRLpsMd$;f51PQl?<`1oySfdRXr8h9?9NX4gG(pmt5ktYj-vOVXm_4 zV7<27-3O<;+{}Mu9bF_{vsdY&I_tW5cfT^W+wlGGUUz%@Bw@bQ4}CVTj#KY{)B<+Y znzq^>EB>84!Pzb;lU6X}U?LlgVLIo>ANR>mY)?<$toqq}yV!J{n*PP=e@st?PMW-i zZ_{g|vo#rflVsE^y^8MWxxYQnckBMm?CF`+_b;nl_q^9-_n7qyyMVZ-+^@KY_OWU^ z?-o?Aujftqa9rhi?fNzBlU4jZ&zar1CtWnXh<{zSxbGzEtkfsn&rVOf?Y%#HM`qA` z?)AU9Eg#-);^*Y{dv`edKabGOJpY;mko&?eulzf~T~k6G$Z82UY+P#j5FE6tGv(g} zcKr%R5mf&EaPcm_8d-IO|H2+=q>7~X#6qfiW694Azf1(BHwI5vKbLh*2~7aI C$`oY) diff --git a/clear_before_translate/img/icons/tools/tool-circle.png b/clear_before_translate/img/icons/tools/tool-circle.png deleted file mode 100644 index 52a148117d2e6d3539e188964f673be54c2cad73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs_t0F1Mkez$nzE1{%lA4nP7(L z40a6qccCU1m{i+{4ik<~p z2lGyy7}@FXDVDV-<72n(lt7Km;U76qZk4ioX%|wnh)3(P_UY|6r%Fv#xh!@mZ^@}e zo20M*%5%8BYaPRsga0}9PdT+J&0Hzu&&|zw;(FR$@+SKpWyfyjla0An^?Z$ekKZ3Q zhgXr&?yJ^hl^Gw~#MsDu_tRa8CyJ+g=TzHV>-*%o$cpXztFZQyr;Fqtsr5WtQ)GY? e5@!>R)-$a8khok-LqZrBISihzelF{r5}E*ATFI~g diff --git a/clear_before_translate/img/icons/tools/tool-circle@2x.png b/clear_before_translate/img/icons/tools/tool-circle@2x.png deleted file mode 100644 index 524de8b17324dd51c8778868d8a68051f73656c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1079 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q1@pN$v zshIP2_E~SyM3MISTkfd5J+)wynClW2*Y1uDVv@Q|8d@G%l5LLJ;cKI=S~V?L8l-o~ z{y^B)4za)s;*JYyIU=nc7YF%wm$&RZ-u-fK@wq#B&l?|piYu+#U%A8h`or4v-VT8u z7lXK^Wi90Yq1tSG?(+?xt4--rya(McV?0xoPApFgSb^=+yjLTmfK5H?B_G> zd$uk8fbxUM)t5y#En^Ii`^xmZA^E^LsqY^fRsJP@yJcX~^+D``jsb^^M#cT}jk8sL za*K4>gFw`q!I4RZnejvZ&-|6!ZQlzhPYf%FI4YStSp zIcMU&GaPSpKCmnGn$2A`;;fZ|j+I5Y99wG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tools/tool-colorpicker@2x.png deleted file mode 100644 index bebff88b40f870c967a8334b60dddcc1d484f070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Ry_jGX# zshIQj_T6sYLWu((-@m&Rs&mop)ak05F#_V%&r?8V`>50_?aY?B#AU%)!j|)y=LYK?k0J$Ei$nYj*Ex={%`o0|_n8X&3Xz-!%>xr>9RIX@Pjmla+1|qK6I*gV@$3_-V76iU)lhc+_wNR0!T;YZ z66&5zWStWJLGFQ8{lx2x%tyNSSv;z1d@8s{bjO+h|IPK)Z5}IhEr>j&H)wEkz>8N!7F0mNC8%$Zs)+dhV$~G$0{b_M4=5B!l;69pZ~rB8$N#!X`plP|_g?nM zziB3`Wc0*%?UYZm<3grw5qx|^PgmIWNpjf5%WXZ40=6{t3?DikxU3<>R z!2P&ky0X$-rB7=P)up>E@zt7N{Ze>h*xC2f&DOD%oqk~k^!%zfd+P)xSO1m0%+|+T zJ&pg{O`|uTmb$xK>;5!xuIY!W4fER$_|xB7|JA?y2 z+q~9ixZN<{u+Lvt_e1KA*PToEJwEql@28t~9M#qzl%IWExwN#ZZ13~0tXv(uRS%?X z*7yI+dEQ<-k?jE6T+LLych61)=@(q?{NB8~AUtaq(6~p>-rPxUJ}0>E(C1zA>o9@n5ppFah4}n zuRXt|p3#rFI>RByqt0ulSLqwYJHZ*X2TC7gA4>Mxy5yj?>{8_ews-g!GTzy2vUAts zE%PSL3%b>)>mdDscSnEqx}fiI6L_X>zdf}$KJ5LTtQ(}{B_y?V%sb+L^YBNU3j>xH N44$rjF6*2UngC*-9Krwq diff --git a/clear_before_translate/img/icons/tools/tool-colorswap.png b/clear_before_translate/img/icons/tools/tool-colorswap.png deleted file mode 100644 index 778a53d32d1e5959ad47f769c1cd9aa5bc0c31b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 zcmV-11Ou7$aV8j1ez4#)y|2r;LKl ziIOgqbg`r=NxhQxN$QmJcc}&`74cgn-6SJhr_3|iC+QKVy^i4kVb*^*wA zG}rG3CGC>*gUrhlBqb%)d*6V=l2%A+lQdM+$UrgeEZ`Mj5JMlZ2B^*P%sD_a@G&WD z2WA(;p%~KBfZu)KUSJh)c7Zmo2Yz)M{{Xj*Ht|Wo*FNCxA_zy@6rjy*9S5!%E#e7a zy$`exsL9Z02Cxix9$OOM0q+1yfeBgcu5z14fril_9tP+F&X4IP1Fb+m*>M_<*;!Eu-5w?0~W{hvw#6?)@GD~_)IM99VLAlCj&d2$a?o$KK54l%nSgF zV!E(o-YNz0W;eDrCJ$@=Glp-x3M@Wn+Q0%@{Mm1@O&{ddz#%LzjF@er_w)kr#5(%q6;Bps48HPW|T(h*6Q%W9dzkjLBgxo4s^ zMU%^(i^wXl^nCdcH#bPwT zHqx`|RNxCN<8A>S2d>3x`Kawc{vhxya2rNRlaRDpcXg9-4TVZSY8Q=oob?mT_%wcbQ?0yO9XfGAG|f>dP~FvRc!%YUtqFImSVEs?Za(&@5qB=a-$tCW}(~m~vAp~cw%Zni{ENZO8>XLvSY~!s4ZU=rj z0r_mCgKj^tq141ftHKV+dr3z>cGk>BJ{RfGJ|Vq`D=G14s{`%;?!pceOR-~LARp?H zX-*2@ksS8gu!J<~#Iv3r&62cL(hEuzU`3%^ n#7mBo_8*Bc;^oE|@p9u|oq8rcI!Uu!00000NkvXXu0mjfnPX^{ diff --git a/clear_before_translate/img/icons/tools/tool-colorswap@2x.png b/clear_before_translate/img/icons/tools/tool-colorswap@2x.png deleted file mode 100644 index 91a9586018d4fe879de54bc2aa89641ca3a60aa1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2844 zcmaKuc{me}AIB%x<_zDQiD4v*qWI=W=GxIlQm$yqlyk8)$I8`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M<-lR4? zPAl#577Ynd#VN!*33P+}&{6lQP>=ZML5>mCZml0Kxb~SAbIX)E`qG%XDr~7M9-T3} z>}SDLjOIH{PPc{UpPlpq4Q%^PFx?G{%S^-~`+{PRPWGEOdB00G03T90y*)vIC&o~h zOW=V+t?4`3?mH-Lzc!ZIDqSF_-RQK}kb8(JObB1WudWDgiN?I@oU{Kmu`W_^g&2Z| z>X1-&KB_~8JfkSnZx_UP#fQwlne1GLhJewrmaF>j@U#VdQ@g<{)eZIPuYLaVSlle>~@(rE-Hn+#m0 zWIR48WMae#*sBOe!pyFjEuQ6e1@F(*yQEg6j6yV_mMcV1-9|8eeT#<(d`=2c6Nj?0 z9RpjVUkamAoz!#z^U1^rfY0@w`m!wV3JrfnMYEfbCr!%D*XITw2D6LZznm|n$fA$% z{qLe-j=mX98LRHyVS8UQ??A!UF(>xqf9e&9iGSLB-Qj0_yn^Mn7JUmBoqbJ6PgnWG zE9{UASF&YnsOE01Rvjtf?3iSK`n$AFIJ>AJ%+Fdq=&I#-^GiwuKvqXNFSmE9>-->6 zF9yGC!zkCBp!9~vUU+2_-`l+O6V$iIg zJVSTW79?)^^}Gs2GJk@~{#+OTpAWqm(_)LMHN+w{hkv)H;|^AnNnx&d$c4eR$N;OU zxR5DktM2Dx5iNFsW{zOE5t0ODMAa3ARDCoCWh_u<<$)1>w{cZI2~o0bm&*!29${oN zhoQVQ>fzw!pXE)Mz^V}zDC6f zx>1`?oTt+EP1Tg&Qh}K(zJvA4yEjZR1?$H-&4s#V6rHRXiPyt|j==%wB_eJ6yIanU zqtAbQTQ?X-&~MqVDY;lX64_rFIS!YG{L!0)XufS0IINT|Ng(EQj6NnmYpoXR4DVL^ z@XW5p?_&J@m;C-8SNxdF?sFvb>%*0$a)u8SW=yEn$?0yLE~C-*j%N06$;bH;W9-Ud*o1!ph5399 diff --git a/clear_before_translate/img/icons/tools/tool-dithering.png b/clear_before_translate/img/icons/tools/tool-dithering.png deleted file mode 100644 index 00180e693e4c9362df6826b1449a2cd341b77434..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs@(YFp9fMD-I|7=qQ0*>Q?k81TD1?Px9u{|^1c6l WbEhxvJaQLkJAlpinR(g8$%zH2dih1^v)|cBF)%Q)dAc}; zRLpsM>mui210IKi%ToSNy(=o!5y!Jr`oN6#eJy=kueG21{*r%B?*qew$xX*u`Z?u< zZPY4!KFq)=Ft<5B-j?0Mth&C16T5P=o!&Qd%{Lu=ceDk&iN(`}j2~jR@XpdZ-~Yw? uV0XdBld-2lFPAI73%cil$AxHqsA~-1K5X9fb_p=p7(8A5T-G@yGywp!hnklF diff --git a/clear_before_translate/img/icons/tools/tool-eraser.png b/clear_before_translate/img/icons/tools/tool-eraser.png deleted file mode 100644 index 263a9c0435d1f8000dc4bfbde45615b7dda3ead0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs*TI%VyeH8!ywdpnl4Zr_mbn3ZGox}>M972#p zETW=u+`=(RDaP$S0?(QoCmjCcU)Ls}#`s0v_>##1GeJ2k1hP|Ex#Y<6meRw)p0=Lf zC#_RiTQys9MfQ>dg7ud_8rElQF|Ubz@mOe!cujCd`kwqRos73Q@0;9`de3~f$R+w= z?E?SJhxFw>WGg;sei5C(cB81}K7;4n4`Kz=L|-#+X1=~n_CfxEir5cEC3a;x58Fd! z&0c(7b3)c2yeR*?KrQ2z*A4w*7e0&5ySbJ*m&^V{mklE~+xfRY-DV#+{^ReR+*x9p z2cs7@p8Egz{iJ!DA8$K)|MRXTe-G{S_UxV{r~Aw}N^9;K@A(J1T&FMl5t-&U*DO}+ z=Zmyf`-W8KFI)Au@b2k|&tl@$U|jw88Bo=;w3S3+2x( zds{ItGxWA*#e^@ff>ua`S0r~@M=lh8h(MotZ{9Tajmc0<2gV$Or>mdKI;Vst01V69 A5dZ)H diff --git a/clear_before_translate/img/icons/tools/tool-eraser@2x.png b/clear_before_translate/img/icons/tools/tool-eraser@2x.png deleted file mode 100644 index 1fc023341ed3cc554ecaa7a417b5bc381bd12325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%PYc)B=- zRLpsMdvBIVphWw}^xl|hWVfAEMYCZ?gAyP%L!PmiGBoiHYO_GJyR_qZjmgfZOby~AF|nBO3OK>I<* z^F_B_mHu&C;Q2tZV8O$U_6IBT-VFm zn3tX6-JA9y=!T~Fm#Bl@$;+R-Fl}1BAvoyEtpitYXi8T3K8U-a$yufQ;NFduk6xHI zTyL7I)%A||UfbVmiMs!%U+8~6?}qRm-rr&c96L1QFTOe!v2W58)AibRxi_{qN*-vC zE2w>%eqOD?f2Z2#idO#Sv!|{{{)vAnY^fgHygl*!W-04X=3l?(Ox8Teo;W{Ux9pVg zU)2w)uY1y#-B3IGX7k$IduOVg&s{X$EX`XyCF|rFKE9pX7MlCNu{N{WCRKa#j9*?s zZfL{vBVh~04{tm4AooUjZpoWVFI+dSRjBZM6ZGQf#wSj(jmA@AZ?7tv|3fBEqT2VTy2+`N z6J?}7HS2SIyLip*LhJ@b`(x}6vhUvzDX{uncT0-xE-z5_KdYWek3HKmYk5|O@@|_){yJU$QvN)a=I{wLq@DRXHF2zW5$E&0crTYS#zJ$9{HQ`Fj3Vx!(KPmfK^A fNsd?&?mxyg2R$x#N_>n5W;g~n`(5kzfT(S!(5KZ`TmF4~@R?!7&f`%fk_ zXU;cse)FA~FW;1@j763IX@GoH0?%3{@T^q=&srt$to2`lR{@iX1(H^2z#D-Jz_Rds z9Ows55G^8GsY%Kr^@EWvhrW~QKAuxdS9)!svpDRABFzC<}{!lD>iu2 zQl>r&AYVdzhT3FqOWja62m1-?0<~T3Ro4|0yjDG@ZcI2~qk2jG5kO~!{zEZflS4ht zX!{imzB>SPr1btAqr*Bb#h50wPkpCOinEUkhf_oSBxSIA2Rs7?QjB>4JO^e22jh(6 zz`ulgVhVtKC2%;jcf}cxk9mI&I0`&05Gtu|12=)YKn3t^IKwjiH*fjXz!Bj5=%f7B zN?<>*d_=35(_5+bhsaW&GP2}bTEq9+3W+LTfvch2R=6`0sV>x?M>0yX$LoNnzA@=pfKFgTdZ!MlZ9oTbA6T4dL>``5V=h166#5$S`~#Kh6?3|-RwNml z?{BS8w}*C((e0>HJ*uva8QZL$P`lNOMwg3Tb)PyuDMK;#<_h)AAg^_sI}eZ5J4Uyp z)1iOQAlp~L3AJgzngCHYys92WrhHAh{ESD^@h3wXb<&W;5#GaB*SSmbCqgf z0Z;?<5iO{{Sd;&=N!DMh5_r}sfoH7}c-AU`XRR>{{uBS~ZsF`-m@WVS002ovPDHLk FV1i-nWd#5L diff --git a/clear_before_translate/img/icons/tools/tool-lasso-select@2x.png b/clear_before_translate/img/icons/tools/tool-lasso-select@2x.png deleted file mode 100644 index 17e7162fa6fe4ad97d1b255a1c25a6b40cdb848d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmb7FX;>177Def~<-VnoWeS1gmbql9S>^_!W@2fj;UE|;;RJ<-1-Xzo&r}3OP2QAP z-=yJ^Td76Pq)p<6QkqMernzFNxZBYG`7!T)-?`^I_ugOk$2pAC{@!XTMk)XRKn?EW zaYn`$e?Un=*2g8H5E<vzgXMQ%sOP{vppy+z$?;vg z#<KJ zvI2Yu^xeA(B{%4X|EEcPhzpbKcF}G>60u|6cIL%P-H`dp0ApJwLJh;bSQ;GNbpXB_ zB7WE>F~b+|CPTJy@LXf*@8P0s*0&Vqd58o2Mu5oRPFx<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before_translate/img/icons/tools/tool-lighten.png b/clear_before_translate/img/icons/tools/tool-lighten.png deleted file mode 100644 index 74a2ef427ed521a84a52f2645d927d245c6a7c54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{siP)5i}z$^mT*Ua@83_Jr0V9^4))WY@3`UcN{qXvje;2rP^cnVB`+rUHMTi_2I z#lpve7Y)Y8z*a*|4x9$SalLy1KcKoiE`Vo&y4MD1TyOK5w?a>-zK9pV-9X(-BXp@5 z#;=VP{IJF(^rY_rzaznMUY&sFRKL^5hPpQi&^WKW3-CR!@g>bKVi~)M(53c5T$Wj7 z-^)Krng?p0r0wI4o)uZZcf9=6%W<)+ZA0G}&x$PIQ!hU=)U*ZnJuAu}c*_4NX>%#R zqrcN$Q(-3QO47}m-|JM@=StG8RZxA+<3D=p`%f0|b1yH~U#9<`;&T3_rVkBa@vNu~ z_$t+b$EXu<|7G0ua{tLo(q}{87|)6<;3r=GSkhLY=B=dfhTc}ssth}4>X!c^ao6l@ z%TFD$Hh`}Q;GGRwB7LlV0Q`!8?tH8j=?97DM(AD+5@i$(rmK!_0zMePix`$z@Yuuh z4d6cTJ^XGGOT zJh6gIHXSX0eZwWM))s-7wdoTxaxjuMGIS!owqzU2{N zz{0TI%jMsWx^qKY4zoY<_icJpQw#xW!P6Rk8R!`x&UUHyJMsYBKJN z3H(FUvz50z_$e>Nvo>?d{yCsGIScvztAud5;)Dza4^RO+1I87@>XULG| zj0-p#!mwwqUNhn=pMH>L2}JgcWdZ)eqe6DwDZ`9hg)(q>P5N#h2)#V* zdk+VoGknu$db?}vWuO?vgkjqn#WKh)ob}zy0sb;ez!Px1Fw~e&l*S4ngxvlHaejCv zvSf)M*%1>$u^s}oq*?0*Bvg$_z(Qp<*Ya$?{tXo~KgDnK0CNQrIUUzF%aEzDi;^*~ zpd=*Axo-GWJ&@F5d}guv_hJUEL1oimqImo^td=&|Jdc?ER+u@xFN*i%uUPT;0YAE4 zF(X`8Y6X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ear_before_translate/img/icons/tools/tool-move@2x.png deleted file mode 100644 index 78fcc514a784ab07e6fc1522c39063c83b9beb18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1015 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfc)B=- zRLprh%Q_>(QKW6Zugio8R&H18tsYAg6vdkQoh~}DDr@W$5Ru*}$P*ED<3{Gnri8_U z@~s++S~cvr<2y9Enp%HwboqN+**b$aC(L~E*>``w-`V@TdBWYDvn?n08*hGo?oQCo zm}3_&PW;Ny)y6IU_|VZE1%`StJwz}kt3Q-=kpHmj(`EO4$M_vI-P31fH~yQoE$%@H zTe75i<*5m|6Su{jX|PHCp}%1BvbW|23qM(j8y^T_J7TmYtSmP=hi%4zptj>iTkbh{ zPrbiUGJ(lk@?K8cv9tzGozw~)=VVE_-FZNuUVfd?Pb!p`M`0PT63Ri@w3_+Geh6A3m=;`WyAY656wSLPpZrdmb|Lo@jc{t>*=;JdG}1+` z;)y=Ol6)ToZm9QFa&FAoFd673hjmQdtQ$`quz9dg;Tp%96bly4=nFQ(+_jm V9miVMSq99c44$rjF6*2UngHyjyLSKp diff --git a/clear_before_translate/img/icons/tools/tool-paint-bucket.png b/clear_before_translate/img/icons/tools/tool-paint-bucket.png deleted file mode 100644 index c3dbd17a85eeda98d139e7e2e75eadf6f0298c94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 741 zcmV+~t7pMW9mEbwx+!Ty(osq4l4_Ec zC4H9kQc|@;zSaVKYy?;#U0c9;&;0*1-@qpZ_YfEY_5p{1F&@EiDLz;4?V zunnvNi+RHP1RXG-uPM-{fikd=7rakU1gry_Kz|G9x^HgqzJbpT<`Xaq30t4exc=k2S5r=B8RKY=Q6 z7r0;}Ki}lD1zZRE+U?&LdK6eAuIZD&5#SPV8+Z-W5+39@P)dM@cv+3|2HydEvkot( z_ze)({4{XU8PyUnmjHhwZ}3U$=$S`s-F5>%n!wk9!K^uaHd$xvc+YE6Nfk+Rk_Hm) zPiIZy10LCN%p>|@_0yq>Bybgbd_yeP^ z8gR8s`TsKC-C-*YOFAZLRnjX-8{JIqs@vef)U*Fp3h>Y>z(cD553K?`vRIqV XFPhTFkFG;n00000NkvXXu0mjfazj4v diff --git a/clear_before_translate/img/icons/tools/tool-paint-bucket@2x.png b/clear_before_translate/img/icons/tools/tool-paint-bucket@2x.png deleted file mode 100644 index aafd114ab3fe4cb3250af545ac3d9f2826bc622f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1582 zcmbW1dpOez7{}+@Mrbb0?YK->EG(C_6S-_`%V8-phZ(u%GHh6mTah*?xvxm6xgC+q z>6{Yv%RNz|NOM`o{c+h`7NQ*eeg5lx-tYT;zVGw>`@7k=Af$I|HX*z(w7@*~R^{n(6L#4EmYruiQg$#yVo^7hqS$*h}SS_f~;A zmkbF5HC-}H9nJ?dfk&m2%7P;TrARP)n7jXW^hdpVWrnP>xDjq^3{No@DA#eLybOY+ z`Qp~%Lqnvuc#6&%v8h}jS||O)VrGrRL-va!am0z{yxNNc3GC>RlcI8>Fp)l>mG@1G z7swOgVR@05#8WAyOthM6pT>7{+SMFwo)Pb^!NkJ8@qI>_TM1+#y+(t~Nf=Ek_~ifA zGoS#ZDK`8bdRNu6b^GCZ1TWWMf|b*vIR_!PAv<=u%$n&(J{Nk-FS+$}y&4CpgCg|F z@zf>Xz^np+yP=g^X_)TFi+%G^2B&<^(Ksp(ba$wREqdi%@*}#0feq5u5@4a~*2D}} zA3Iuzhms=l=V950t4FP&B=@pqS?Gx2bmq104}=%SE2SUWOC380(4y^;kZar>wcx})Zs(` zoFAZjJmkAXg7^tYLLuUU(pHW5#?IG2TkUV9>cCbd?5F0}5yF3Y)aA znhMd-Y`%%aW*uqIN}nB;}p_OiTPXl?7mGQRjS=#9q&zVV4rcBZ`q z;@Julb40lUPQq=I!emcQ_H&hwx3LF2P5ZXDTr7asb3KxcY80KB$Fb#Pv=eJyg#@aI)^WUsD z7^cJL{Zpf8|18*;rExd39ub30owB1xasey04E}T>N4Hpdm`(cP(7PyU78nC}Rm|3L z=PJOX&r~`&nha+84a7L9o{Yc5EUruHW;5yLDT@Q|;BaaOjvA{{*m?7)M03crcRDF! zsi(3J{;sY24se6HI-BCidOi|WKiI7p&!{ToXUti>U~ZR`lm~IUW|+$7o@Tn7vV=F- zVH}PYkh8)t{-t?x$)Voy{iDBIrjwL*UiR?Y`vk6s#!TcpR47^b!|p*|wEiSfzq~LG ztjZ^rW$*sg<2nkP)1{+dTLz2LSDTU26ua@B=!m>%H91N6syf;usq++56VskEYwso` z_+*iGV-KtG=yTs-G4B=d<1Y1Xxf;S?f(QdlgH`C{@$D>nm8`vjyr&W5gYIaw?$?|s zPt4yL-4{^YA<6czx>;?6X1_CA!JC%w|3MF$7-LDjKo{A~oTZNzXB)@z(q8a0% ze{<|sb;i`%Q7-=n D%c#WT diff --git a/clear_before_translate/img/icons/tools/tool-pen.png b/clear_before_translate/img/icons/tools/tool-pen.png deleted file mode 100644 index 68e3b7e7d2153530ad2750137f1eb9ccc9be8e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 670 zcmV;P0%84$P)$d$JuZRgU-3M#{b3m)(odv!DFMy^-DwR{f8n6HycD!@ISKu|U&o_2V=%c`A zU0Zzi60BP1Ndm+&N$vM@Dq3i90+|ztV}Oh=<|*@idk7+5>Os7!8?H^ zOkMXn-c5|20?kFARVMTaOieEXrycLEg}#sH>Jc0KB=7}Tv{|q9ZdvH@5|dO4csH;L zRDmOoH)f$H%7iWhya!XyRp5~0jR4!gJ)qJ^;Jv^)=8Vzdcvms2$HN%VMZo(pTlE^y z<#?AcC&0&)^dgoC{seRW=yS%eTj*!No>@~07*qoM6N<$ Eg8nNh@&Et; diff --git a/clear_before_translate/img/icons/tools/tool-pen@2x.png b/clear_before_translate/img/icons/tools/tool-pen@2x.png deleted file mode 100644 index 5a8c1569f06a935e560213ed7d57011fedb34a3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1488 zcmbtU`#aMM82|3LZJ5haE*WwQ6^&D_QKIcj*2r~IvP~AdSeV3dNvMc6cZ<@F;t`JP zbiyi<%H@$u9HXT~W~n&D!I^*IocH;B-p})Xp3n2V&-4E9UdLh4aCt3x007`1#>Gpb zXSNBImGtSagZ>hczT^ygLnRdtC1yxw7#$OENs=GkCdApKBvxW-M!EV&ou-9GG0!td z0F%iyCsV^O5zf;|<}}8I60w680LXZNF2}rMISZV?2sIz=^bY6b5R0(mxKw?phAKg= zQ{B_M9ER!)OGP7K7AFi)#Tqo!S_mN|-m+MQ;1%zA+5(1mbrB<$AoF<$(;Ft%J1w}T zGQT-;0+=y_F%^wJ%H~8rS!~hRkq%K}dueH@;K*NEV5~@k9Ss>yQ>SMB51gco$PhaX zgHemhbqY3w<<8;5&$}U~0CWwQC`e5I_=Pe?qc^|)4H_W1_zMSnU`wg$54cE7N^R(Lasl1p0oFtYfQ zKg=td(&>2v=(s)72VE)dh8vG8oxtMJejbX|T*b;F5Bm%mkyPt6!=P*F$tB5BQkfm_ z)nA9Uc7$Q?*Xf&^`hAEoFd9SCo#j|?szB+7k9;(wYscg-5z@wT8w8uNAXMw8+neqN zXGXWw$Y7CTM0YPeiOomcwKBHet6_zj?NF-5-al&6r$__rOkRth_Kw?(O-H7<*LUdk zBIUbO93io~JjdBGi0?1d26lq6HrM-ROc2Sw~xevtW=~<)R zt>xL6kc(Y=0~B^s10T5QfH{=~jkdYAX5<>5Z4(=w^^)q5(~29sg`44W!w<~&;m3bA zqYdiMx#tv_Ra)iR?jhfcUI@5pU)Fqr`pEoS=>*=z2bi>A3nUw{zN0x!{Ckbv-aQ2@<1S);)pvMx0t;XNGSKMI z%=0(0(5|I%UGlr~Qivr!*>h0;92(E@SXz+&ma#1!K446~(hJ#^AErq{i(8 z{Gb5FU_Si5^CR_BSlJyvVHPXq8h6z!q`->Ip#8%Z+h*;SVk zJJyiwkxSBjfi%^Lu7B#g+LoJb2s9!RR}*%Lt7GPt=20AxShcnf>Mm4pZfSv>>dq{? z&K4k+wg9T!-&wJwG=KRi-NynL2T2quazw9FHox+UkW7}@ioblB%HuZqFzw)pD2}M; z*p>}_U!8T+E5$#?e;*Qtt}YEE1n~sjtpf?x0L`;>3>|5;9(YyDqpnyOUYQH0%g|ML z4zo^~_R9XOjooww85aDo)stN|sq5pDN42FYQrFTWU%%YkOwT^MKXmnuqWNw!lJ2uR z^X8n0I@NaLnQ!d_3p9Ft;>lW01b7A1ROXa#eO=N8N~I^IDV?kkqo1bNSHypZk zf{_EV93}C((I-2`)h^xM3z4;!iF|O=Zei~mE7vuz;fHsjQ{OawVudgMGyah?=D#gW TIjyBB`Mv+OuJ5!! diff --git a/clear_before_translate/img/icons/tools/tool-rectangle-select.png b/clear_before_translate/img/icons/tools/tool-rectangle-select.png deleted file mode 100644 index a613bd9bc720b3e27d148c8304e99e68242bb045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNso-U3d z8I5nRALMFK5OE3Y{r7)*ytcWkiAT)r8Jl^;4=>?=8+uhHcQx}FuY#zi%R+OeJ=nss z{OzM%pIetX-_O5kcJJuzhY??HupHf1SlS=#d%FJGwnEd2t*=kUp8|_K+5F}AG2_sC zlU6#N4q2GG>Vi>d#^&JEo6*G^a${-usZbNYG1&1Tl*mWc}r@~Z_pj=|H_&t;uc GLK6U5^lHig diff --git a/clear_before_translate/img/icons/tools/tool-rectangle-select@2x.png b/clear_before_translate/img/icons/tools/tool-rectangle-select@2x.png deleted file mode 100644 index cc2e56502fb578776a10e0d4ef09cc1478d7afd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%QydAc}; zRLpsM`yf|SfPllro`3(R=jwY1o{#oKMZ z9!zdJ&eG2*CyZA>j(h#rSFF=>Z@jlpIt12{%Y9$hCNAUTO!Hn&u=Z`AENgDftUYOa zvIT75?xN{NZ++qqL3q)XZT`h4ZBIaWo4qa5ryDhbY%kL^6b4& zXS4TA2axl2PniKRKI~mk-COI^Pj;VChN#bZT0U#fL5O+y9gpn2jp`ShB#*tk&Y}bi ORt8U3KbLh*2~7aeSEu^` diff --git a/clear_before_translate/img/icons/tools/tool-rectangle.png b/clear_before_translate/img/icons/tools/tool-rectangle.png deleted file mode 100644 index a2d43856afc6ab716ae5be254920620bc8f6ed80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsmdKI;Vst0CFf-6951J diff --git a/clear_before_translate/img/icons/tools/tool-rectangle@2x.png b/clear_before_translate/img/icons/tools/tool-rectangle@2x.png deleted file mode 100644 index b1897a133ad96ed421918d0f9318283767062b8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q4c)B=- zRLpsM+mNr>K!D+(z{mgkv+Y!^*c{8`5*A*4neirf?bpuFdw(8a?*Y!C())5vS;_F-t)Kb=gzy- q0(P43yAR9vpH`Vg&~<3$S~JwLv+cDLT4WClI0jEwKbLh*2~7aEM3)u- diff --git a/clear_before_translate/img/icons/tools/tool-shape-select.png b/clear_before_translate/img/icons/tools/tool-shape-select.png deleted file mode 100644 index 55d6400f94999c5a2d4ed8ca48bf3d990af38736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsZF#?Utatoy@AtjxccSN*+lwt^?7lxdJ^k>*Z6SKfwWZu5s-4Hx z5UBj1P{H~&8^V@sKV|X3a?O1P?gO6sjT^P<)X%JMY(F6Pf!BiVS{F-L^~KDlm9c50q-7G zy9rxQ@+UAzFtar-yz^2ttj6Q-%Dh#JU#%0L8SwmYm34mI)JH4yuik(4(EieVr`ubu z&fQ>sdrBB%1p7W_W!dWLl^S2v8>swFBx7J>%{kr#;%ifDq z!d_0#Z3(t)k?m(UI(l??U&Oy^K4OJylODZg+{`$BAkl;)3yp)i1AVt-W;a=dIW5ZH@g0 z^b`1gOfp_9@~JDo?Waft>%M8LFWYXc^Pl4PYqIEU6*&ajzi=t%+Zj(EfRY7+r>mdK II;Vst00wgYcmMzZ diff --git a/clear_before_translate/img/icons/tools/tool-shape-select@2x.png b/clear_before_translate/img/icons/tools/tool-shape-select@2x.png deleted file mode 100644 index fed2da90297664784cdc45401ac097e352cc16f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1288 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0S#*Pba4!+ znDcgaWQUBa#PNFRa^*Bb&g>5?fntk1LR<`mT!jT#MNL?0Pj&krv{kmNc;b3c-1S36 zfQySj%_p}b!n`ZEwNgYquQ-H=6iXLWuV1~JxxPO3 za`4??Qw7fBeXOqP7ffPy80y`T5YOx3Hb2%X{rFIC;lpD)3X%y6FY7zh-njL^N>}wu zy;fZHk`;_U*mg{wB>ULm?6IYD7;EkZZkLSUugRb5WA0V@t@yzwz0%c<{*AA5f?xXG zZCT&(==|azEDuB<@IHurV4NWSLHc1zOxo0hyLy`M8L~J1aCyM>z%${a;J4X~dcHHR z@4w>tL+gRolm>{XO`Jru}~2^o;_YWVr2T3TTQEHeD`uiwS8Cp3B~pMRxJ9kd4_(q z{6m#90#VbeH++@zge^F2Rfy9G09Xrca@!T|Rl~e#zya=W$2H_&(TtNEOp(e0Snerqk(nNBiEC+85Za zl{;nhKr*QQwfBXn{%v<8ww|+Bxm(>bP1ke3chr@ScG6bcZcZ_JziL}S!}ErlI&mC1 zuaf8AZe+gr$>@Q_gY_%k<=tBUerHhXL!~c%zxIai6RnVtU|6Sg=gS+FFEMS4-m*1% zfAZcu7wGupX~HZ{6#`pjE%u)-ljhvSxQ;FE^~ZVnO!-fzCa8ys*|~Z@(pk9syY2_h zx0jM{GF*52DD%PUgW|)o`nD_Pj;cRCTF){P{d*#JqRFJI^YvajYTJkd$TiwjwC9IR&7MIG4POQK9>0kEDH^JZL&pMyy8NK+adY46;*4H4l zM)yq>(>_#uRZn24klvvXZO*$!*`}@6vh$n!j@y$`Z*>c8xn&dmEo94iCePQZwO5yJ z^}ck}RmS_GQt-*X(*bJ#nlo;nox~RVoWkZ#HqQU;D<0OMd<4H=8)$hktY7ELywggWCzc?hnUK=rw1`tS*1y@fsP&5Dj?-o$`xf%wWS^}R9dyak zuK7TJ%fV^Zjh{J~pFjSu!0N-$zsze<&XPaEm7 z*PE`-=G=Um?_{0M!{^h5Rxiv;zbtk4R>aK-W%Hf|9g5ihc=4{kEsBTxm;bu3X>wK4 zo1jB~Bsq-v(+uVu2yuI5BD_;5By&ZyZUK=Q7$dvSsAtHmR}^`ozi0ul)MD^-^>bP0 Hl+XkK9)wk< diff --git a/clear_before_translate/img/icons/tools/tool-stroke.png b/clear_before_translate/img/icons/tools/tool-stroke.png deleted file mode 100644 index 5ae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k(mxI@P07P_0H7FVX&%J&?>ghg)3? zxuY=-6UFm%mBKMj5Gm~wj47lYJl1S3<1k6SPCbRYspTWpK4>2@rT7$|jQ4_k(58sXlXdf~JQeY11E zYzZCN`xP6}sV}_Puomm0-&U4!QG$FH2uTNFPf-6&>7lffPRg@p_to}qvNjKRr8^ss zm|f7S2%V{Df7LovF}h?T@<+*2rr)O5#TvFM_Qq~|T*n?x5@x|`UHE?T=AyTPxe_Hw z+2^@kcYt9uGQ1?-nhGl5smS6Wl8||ZWT8ZNZ3GlSg+-(tL2HK08b!A)X3rm=g-l4C zk-vV1qNb9Z)wIYx*TqWRnWK;C{olc=j^bHQE?au2)KPa({X_sL-(a75Z(Qb|5_l)E diff --git a/clear_before_translate/img/icons/tools/tool-vertical-mirror-pen.png b/clear_before_translate/img/icons/tools/tool-vertical-mirror-pen.png deleted file mode 100644 index 618bd5a6f7b55f1962a5437aa8100f9344e93fe4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmVP)l4#WAWIz%T1OBBBQcK@czA42T z@p^u$tG;=>S~>zW9aWlYfUFAOz7@cID}eh}0Qao`?pw70_j36O8TYLKUZ5H!byVwA zZ{R(WMkEbO>X+0~u_sV;BjbC$z&LOWIB&)|QmKEvfcFBwfE|{19~jL8-c@7pZs0qx z#q!#Lx4^zU;Gb#;zR5s$TV69T3|s?d+8S5laa)ovUA24yDi4kxb zctc#PF5q1Tdb{N<0iFY=m{>=Jf+sb1&+;PR4DkY6T?Kq2@D12zc`d|S-q|eBuHZ?# zX=1YCOTanc1F)t7_-5b-u-o$H0}p@;q%4oD;Eg5@naLCQi^PXilDPyt0)7IAtub1O zkMhe*a=5s(G`GVqCN@YKl+-F|T+(q#O^UChwiZj8ZTd=5yQCp=``aq%Pl~z!SB8JP z0JsZ026}*pCd+%uGJeQBj{*CMcaJNi*z$@h6}vS7*MV0|=vf)~n0fvU+$P>eXB7br zD1zJ{R6e_w4V90~$~ zv;hnXui{hRpb1g+*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=M|nBYPhR`5CVao0V m*>pu=9b2Jk$7)XPeazubDqe5a+0O;Kn8DN4&t;ucLK6V3*lrI1 diff --git a/clear_before_translate/img/icons/transform/tool-center@2x.png b/clear_before_translate/img/icons/transform/tool-center@2x.png deleted file mode 100644 index 64ff4e92c54e43837e2c881f2d791fbdf629bbd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q?dAc}; zRLpsM=XTa12N8$B;9vju&)K(KWuw6NGcTh0;|y~64Be0B-v7=%cl|~751B0eoN~f8 zY85^oW;`%FnA~(6tH5u$S_bvH`kT9C@6?z4zWBM#=pk5fnq7PR%vX2*=m^6N**LZN zegFRGr(eSO_Njmj%$a2fk$ofj{KL(4z3;8&Mc*^_smOWyz|42u-bXTazkXGGc|9L! zmBo&j+@SeY+~4K@ho6Np71Z$6tI4s{Cw?=r4=taxA(m;NMRurqkN`njxg HN@xNA$;ZK$ diff --git a/clear_before_translate/img/icons/transform/tool-clone.png b/clear_before_translate/img/icons/transform/tool-clone.png deleted file mode 100644 index 0323455896c90e9fb849ba6d71550296436f6278..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs9e$o zIAs~O-nhZxXcOG&rmK=+C}w<7>CW3TaWbOcT9ebKzn@(xnU=TjWvjrSexJX&joV5d zZGCwp`*P>?Wy0%y)#GOS?O|n}b3EJT5UWpmdb@zy&#z7#&0>|+P8`<{hvl^kEGzo; zLUhX3+BpZ<-aTM1duTDOfWg0z>$JqO8FqfjqSb{aM|&PAt}{D1r9=NwOx_0;oyR`G z7y5eomKFNSX5Q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/transform/tool-flip.png b/clear_before_translate/img/icons/transform/tool-flip.png deleted file mode 100644 index 8369b2b45723265eae138a282ac24baf2cb565ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 708 zcmV;#0z3VQP)*9Jn>8PBcGcy4vZbE`9+Td9pN*PiRga(zBnsf`~-&WlwfysIn$eW0+! zDBvaVCAL{g;!>JPsHY;n0Gy&}yND}b5jcx!n2PuT&4!z(6ed1ODTvPj=RmKlS(#G} z&j3T<1#lVKGzIZ}9!%HOwrqMPFIcg}XMihUv|7^=UpD&;yaJvB-$NS565r#oX{p|r zyuHxIF~p~V0WeXoSsAyj@dEe?%mcH)jc@Z9;=BB9+DC6q{%%NeDDf%a8!*{a(~?&u z-UBXxr@%Adr;mY9;yW~(_R$b{XX8W=-U|1C8ULVSyM z({;J1+yU=Ry)7RTzQiZcJIS=IW@T*KRZ2ZUe}i}E9p+YI#FzLccGGp)mQAT&zz0)z zQ(V}C_$d06oN?8(%ry}QZTcGcfj&+DxXkzv-@t7;R5!p!Q-4E}ASK>I-vH+%H7jGu z8ZR}A-q#1{o8!>dL`r-enduk}fFsjq-4!e$UZDToEC>yRtnpHd=sV1r8Mm5~5MM)X zI##E^C)01u8mW|Wefr8zwpx;y*CwWKi*qfN72w#Dn&ihR)hck(G~rq*$zI?DslpinR(g8$%zH2dih1^v)|cB0SyZBba4!+ znDchd{%lc45x4WkEIxuxt3n)AG`i>1d_xhtHw#8}$$PY@VBJ zaUlKy(+AVy7^N#2Ka%?nPfJ*4nI?KA?T66^-Wk1h)3YrO$S1J=m{_4>m}UG&@PE7R z(VXHpkFKQr5Zb_fW^3JiWBz_imUGO%Jr@fvQadbPWR&CiY*w+zQnAD0jqeZq>8K5A zW0qlf-Y|c!o4SW?n|(sbjZ0^kzw@3mo+iaJU;V~ji?sbmbX1?IAN9ltq_gl8*Vfjp%Z7Sy%UH3k_^Q>m( z51ohWiYib2Ucw{KFuP@WyTCiEaE|hYX;V!8@LfJUEzP!S@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lH8MPRz3weJ0I zm{%sYT?v3Fk-xkET`{jBcNh7mO-T+0 zt9JSiRH%h-;n(WtDi00f?S3shaI0%Ru$vXV6XV*?T0CeW%^IKsXZfYKLEftBa{gZ18SlW_I08|GmYOM UGM@l{+rV`ha>cU#C-2n%0?Ip#YybcN diff --git a/clear_before_translate/img/unused/circle-dark.png b/clear_before_translate/img/unused/circle-dark.png deleted file mode 100644 index dec10e5ece9cfa9e5280fab2ce1dbf69906df266..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3356 zcma);c{J4h_rNt-XOLtmyKka0o>HObAu^05`!WnAhU|qfV{D_5;faP)mMoFIY@@-@ zGz>lEn{Bc`XhO0tLt||WzmMnlJLh-K_pk5gocHH_-uK?mec$sr_ukiiWNU3I0+s>u z@bHM3n;F~l@En02EA;${aZ%Da|LHHS5z+_$AXm zYWY>1;j15SUFY2k9nKmi%}Q|j2t&8h`_m1Sk`yci{U6cIMG4Qdufwe*{h=5ym!;)* zN$<|oG5^ZMM9lWY=s&Sgxz@$v;wB=4RTv5XME2jkLck&p^ef?1W{QP{MQd<_Yb$oc ztGI7Izs+N<656$zeU4WO&ObDC#mXRdj4?4Wae&M8rgY1JQkoYwqlnh!mw#UvnTve6 z!Ql${r29V223dcU(x##JX)H(~Fi3HxX1S6%`p7xj3z$ppZB;G=v;BX9z-- zB_FP1<$wsw^jE)s_w>`w)vPJlKaPxl)7^8G)zS5rp0gm-5E1W_>*JTd;etfGu;9%s z%(?GyEynog>$p4FbCKi;mQA-N$ilX#KC*LPJo!9>MlZV5bBU$;XhzE&?Ro+ae=S=q zEOLAx#c}DK2`HsK=lW5k4xSKCNgcNHI2Zcyo?CS#-Tn*G7Z10CS7EDlK^ARAqP&^^ zLKFtTtOTn%rOS#O6&H;>n&XR{cr!tcF%`0SL`soENPwA$5R{PUDvktO-hWlYo2jlG zU`Z5$IvWh;((Uz<1<-0F2@#kDSE%ZD>6Aj41{lg0pX2y!Qxr#U!h;n0 z+w8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H1)p6!m4i)Y#x? zsE~jRKFeS`(CX%hJG2h`?a1H(@>b`T3Oqa}S{3k!{mCJw8n#Q?RDc znHvDW4mhmN4E3pY0;CkX6oxWwH*G9wwH(+uX2TWHk(naudnVOnHAzfUAs+}y*8NTIcgM_tx^V{sr;hVv< zVE#v!Nc)vT0R#YEYPc$9kO2n1wl&xP^=R{M2(e`o{wBDUyHzdL?(3t`%gmq`-DpFr zC#=oqhVv^Yw7!rp`)GjU=aqUuPu^G-iK>9%XH@@qu0IK8*_p!VqLAwza2&q?&EY9M zR1tDRHl%dk>QLS_EVc2N4q7JVW#Hd#-?4uxgoY-_Y$Tsn79;j6v|5Lr3CT+c*nTcA zHEA{j4`sq&eX zk`)NNcM|XBa)!xAsSkZ()JpJ3#D^lV#$dzgSJAwM0M%y6bc}0-H{Sb|p$GuH)Uj&Z ziZ=B97g!ItDp~TuBrIQwVIu@Nd)D?Q1{tO<2zV}|+n*Fv*E&a%5DWlFF40E#bpn~p zk1k*3&HQdi6N17^p4fVUx`vLSOaB+n<{sy+5E5m?k?YcVMGiWPCLVC-7_e=1g(QCF z&7)sp$fo!rRRHmblEv%tf>6E`v^2824l7xQHt{&;R|Sj-U&Hpw*NUWVEi2<`n*a)o{67mahw@OGcR#AmIwvG5J5d zn78UP*d-Gz1ClE65&wu@Zt2LCyaA76Q)pmV{!1zIA8j1T++e<_eGY;1UjRAGljXpj<~1H<7I0&rpvO3C3x zKE|IZ1iGUL>15D5$XPsr2crC(JtD*VoDO?(&F*RI)$`fBQhH$(hwKEP_+l?oEjHjN z2=dZT;b7-f%Xv+{yum6M9EnQ$*!_I!2<~rGo5N@JdzZ5Nq!01Ij$2u_N~B3m&G)kq oJYO2Wv&02^zW;8F{|~D-vlDyl&QMmar0=1|9Byq~1M`UgA5BtP)Bpeg diff --git a/clear_before_translate/img/unused/eraser-dark.png b/clear_before_translate/img/unused/eraser-dark.png deleted file mode 100644 index 05b49d61a6d49d97f00e8b3ac4e0560c2dd5ffc2..0000000000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jZ!ne^ z(#*=EW6RGehi{39yknUsw@ySBI?j=c%DG!CB5zxkb-jojpD@SpW)b;FL>5PsuO=e1 zb$;M9^E@XTzA8n_Pc*MgFxtNlyV(AJbj#mWz-WI3cCr1p7~7(qKh0?M;$XBtx?a;M?!g?PGk}w(VKXo_-WYVrZPcdIi6$@N0(4Pn5%# z0zOGRNv(q4HTa(C?j6Dp44{={_TWts_zOz}9|Mr9maihM?*0PtG+e_e@LpXH@W=!S`(7ckBW*{5hf7!a0`kRR!OAv~NcF zBrE*32B6{Z9r6x>R7>d2j3h-I=SPi9s_?M z1iFcT{m54<_+5cN?!Rz&wO>6VLNy~aJ80=jITrXtitl<^4;U->ZeU3c#xyP`Q0dWq z82*P!siug0t%BdxmY;_{WgZmSrz^Ln9|dgH@ICx|{3I2<8#spik7b#MAKpFGGRX54 zGG4aOcOX^Hhfq9aaNHWItd7$(D^@!e8R8;P;TePGQ{(NS-sWsz=;@ z1wVxWBz6D8+5oCPzsK}>ZIm8O{NY7mc^p_@!S6kN?L0u5x&Lhy{NB_TX#j(Rg9^Af zVL9F<-JypS{1WMlJ0s{6{Cnz>$c;*=t19@tsV}YzNVD#LuO_&8%)Q_aD)2yVDoV11*)5h43!aFr#e#NmTDTh6kWc0&hB4;XSIu8sg(Ml1FTsQ@V8pRPj#1W7vOuiJ1s1A z`Rb(G@tagO;IHl99lrmjjhmhsf*-X*DUI8ouECGHPq&2d$DQ_3borEsEY$Ps!!4n2 z#^0=Yms0A5l(52E(goOQ0e_ldOryuJmJq&YyzfXi$``}|vKqk-{M|rz0FS42)iGPr z<8~+|)z{D1@hPotwX6;UKF|0>!YJCA>O%JlNj}EmC^Kqch(~r^yVWZEL)0p cSBCQaA1Q@JkH9H^xc~qF07*qoM6N<$g2!{3W&i*H diff --git a/clear_before_translate/img/unused/gallery.png b/clear_before_translate/img/unused/gallery.png deleted file mode 100644 index 23db3a94b3d666c3081543da07b8fe186c204b4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc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{@shS6fAA0FPBI zNT<*>1|Vr;LSDRjOdH_ehdo_m0EGF5dehKz3ERLW>d+MiAZY^dodFI{b~nA~M5g0k z0<+~&PY|}A?ayLhyzMuum8x^-1`jZq`pO5mJSo319qj=modVo4z~Kjg!;|}OOvf5P zru?bY_hL(dy=*V4R;tdUBfEes_;euU1AHkdzZe~70Fq7zZf0QFukD5))2isGE+9*0 zc?|>4xz7NOOD}%K=?D)XX{4l^33+e^QvUCOW0Ud+N88T^W;>hSLE~8ayMWI)Y?hc9 z1a0jBB%Mc?$Z4efUjZj1qRWAEXdGF)82F;?>6Hl9<+OzXNIHn{ZJ!sla~~nqS=z-U5-sfl zB#n}E9q=HHmH!rSAz}4wQhr2Q<^d!f3fxG3Sod5)hOxARc@wDI14tSz=?36_@|8c8 zkX0-xze!Z;0VEv(+(6ihwh@bfvuvkOt|n872avRxq$$93@|AxJuxC0WlF50X&yk*7)iGhCTa4Ne-khvDZhG};sGS>2mF%!y=xW%XV`wA z8FD1@iS7X;oeRvOvGPqwAT=Q=zqLg30Fp)%T=@w(Rp$ez+kQCKwG%@piU*LiH}F>) zE8oD62*H|3`E5dJ4%2e^^O%AW~L zOv>*JhGGDB5_bBi#}$P2crh}7CMsY^3q!J8JX2T~w`bt1wu@|Ao@gUVtqhWM4q;oe huh^a%O{zp?{14RO0u$RNi-iCH002ovPDHLkV1i)k1+V}B diff --git a/clear_before_translate/img/unused/magicwand-dark.png b/clear_before_translate/img/unused/magicwand-dark.png deleted file mode 100644 index 433aef2a67149cc53cd03731656db6ccb6e29861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7703 zcmZX3XH-*LwDk$0mk_#A3=oPmsiL7vN2E!Y9+09S9U(vxkP?bWQNTt35rHcTh$u=E zL%E1jq@#eLBPF0hgh1ZmzVF93#`~2svgTfUuDRFRd!4g0Y^}|>*oD~v0N}DPH@*x2 z5bzNKurh-`?h#e~03bGFVSK?Mc534>ca`&KVb2~iFfc53=t)_bN+z?kD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Er_%Nk6MzvXJypyYCKLw#)YMy<&135dX@Mqu3talo5#S(6p$hx8X z_^Y1bnl%9$J1jt)yn0@dd?o)Yg&^O_YIvn%qa`H;g$G~49mqBkbq5jMU$T_U)pjz= zo6NlblW*Mp4G9tsOAzJ=V`4iV71+>-(jVjLc8e7QfFnYTu8M~`8#u8 z0qc1m%~_{$PQurA4C4JA=bxef`7-x_je#V^+`df6GS?{kr|beoCK}Mo>&Cs0P~RZz zYCjk@XkP}R_e&f!&Q(iZGPjqT2W(}2KFM#tY1Vgmn1?!e^~D4}%-nY#-!M-n8i&#E z_SF#<9#cnpoMw#V5d0D$71_{^Dct>mErf9tJ-@Sx!0$=e6zOkWCFC~Qc0u5i}?HmOqq$kjv|KUBB$qp&1e(J z+?op}GZ3dGX(_R*=b)*IOiOt6!xX>L=TMi$%n>)ounqy&c+^)Lb9A2;u-*S;`e5i({|>T%a${@>DW(6Q zQ`~K#QK4SUTsp1w;AIx&rNf~u>ni)y6#n$b)VtsIj6D&S82Ax(=_itODmvO*JZDZ0 z6%w|%$3FM!C`CVqurlCy2;Ow6*}+QF&oiX_{_=}ObI-dRUVlV=WCnr#-YlNb{$!J2 qxMsx5V!#?C^M7tc|Ifwg5uzJ6QE8L>)EK<*1uRUgjb9jgC;t!7s(ru! diff --git a/clear_before_translate/img/unused/paintbucket-dark.png b/clear_before_translate/img/unused/paintbucket-dark.png deleted file mode 100644 index b6bd648bcc9985b0c1996c04d403a075aa8f5c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4104 zcmZ8kc{mhY)Soe98QI40+KnuOtYZr?S;iJ4iIR0hDzaqHHg*$}B}ru|Q5Z|}rm-_4 z2EByHC=61T$d)W2^G)CL{q^1FId^~Vx%WBe_dDm_b+EVM{L%8bd;?uY>^rX!*YaG`Zg6#F`Wfw{Qu+80;4w%Gl|ajPr? zLanEjMoY<(B5Zt!5&4l^JBB?x6_FM$ZYE&@+oSYWHc=E$jEAGYKA<+tF|)T^ag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p6@ zifp*y>dAWV%`yH}EBs6CI|Y~`y|uc8as@nIf`I@vAF2TyuFK z>JvnByW(r><>kf7gL$>bpEeZ$iCd=|52~2k647q&hdflj@V0-$wd>G^5y?64>3W_I=9^m@KWonUpv6Y!X903hE4t- DQ}>`* diff --git a/clear_before_translate/img/unused/pen-dark.png b/clear_before_translate/img/unused/pen-dark.png deleted file mode 100644 index beacd0d1e8af0d5be9ebf9b5bdb667372c942fb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1679 zcmb7^drVVz6vxl)EiI3fTP7+KMlVAx**fqsUlVK{AmEfbM;6@NiaKAJ+B(QktnEc- zs>9hjwi&Ff4vD%%R3aHZ##&Kl@i~bRd|)fqR~)eva8&x(`Bk0%;~%@py}#e@Jih01 z&M&!}X65IIB8No+fG96FYc>FdTMEJjxXk@(?;>0T^FPSR!WAEH<}p1k5t`gN#Q;%* z$VIWBq^oO2u@A-=uHw*bMdxW zT+ZY~x>P5=aYV6TAJaLsSQgl_9@y0b#wUGqqk^fJYDjigaIC)H@g)tfH=AEjPs4)l zAt+@P;R_%JTUQ$1Kv?MH8j65C?0eUw2(TL+i2CSUONr~{%r^0D?)EDX~^qlahwkg9#$`h+E zHq5#P2`d`)1tG_Rx2<5Z_^@|Rr8PCQM=Z{VT%mOBG@e4|F)SWVv{vCE@Qv>z33h1t z7&Spc)Nl91fN%%t$3|hrz(Y^P)CA3;mNRNvV>7pOcEY(Ve6hg{~)w5NQb!7JlLHxFf%1s+61-pebh*e5~^%55oaVE|Eqz zhOFe{Z(G%}JmZGSC7*Q3C2g7x35v@6l6T*-2+#qMQVFyx`&?r%VRp8#g zJ|FRpQqRdw?^bfb3^&rHQ+DPu&#CV_;;&x`H_BWF5xd4lgnB9^O;8wYVd52@odaJ> zTB#IAfVj)rpSe3AwoQ-VHHMp|lUcZ;Yn1bMmc)NA;fXW)@xluSFfgSqh}*-+*|mD+ z;4f;#cuJSqV<*`eC70b<7dX03;wguOGWvk8xFay}ZiM@XoyzH%x^}2B177#fw96p1 z6(l_}wVY?D_WRRx+X_m9@pj`T?G>Rr>vy|x!2~YiQMV=Xaj#8^em_1ksuZBF;rPng1RzJt_Ze+#3cp*soKDe2U{;7NlBY7HQkxcMpj zg0%*bZ8;MT4=5$K>x#aWJ}%<=6*8z5-gNWZm-?j{;_Hyh@M(qCc~@#{=(F@HmeFj6 zI0_z=pHhP57p5IHh6E@!gT*{P*UNz^(H_S2KL5j$)mEmXob`Xk?TdRuO3r!N`C0ql HFIx96u@K5o diff --git a/clear_before_translate/img/unused/rectangle-dark.png b/clear_before_translate/img/unused/rectangle-dark.png deleted file mode 100644 index 37487c8e62b4daefb1b41441b5c54f780af75665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-;BmO< za%XjEQR$`|tSoy)YvsKZkGogpxVgxu^V?=dOYGs6Fh~gAdhg8nRj=yXPM%4QIonn_ z=|BS`vswazWb*;Bp(M`?5F1KL7=YMdGUwO3f8N{9=-8M6`3d)52_-P7wzB^;P4WH< PbQOcAtDnm{r-UW|K}=45 diff --git a/clear_before_translate/img/unused/rectangle_selection-dark.png b/clear_before_translate/img/unused/rectangle_selection-dark.png deleted file mode 100644 index 3b5b827d6c4f6d5b0a8b4bcc60e25d202de38dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-_|>L79WRYi3(CNx#tOTO|F0t?vQbSJqVtYcm$ae~qcQpf;i3S>t5$vME8bS4G0^ zn)v<-QI2`P^PP%kV1sB{*Mn@mz}w$`&N-MDxV$Vu(lq(Yr0AOOef`r{{pC2-&&b9j zVUTbxF(@?D&TEa;;n$fyI*$@B&)jkBoOQzM`-ze{*Co%hM<%?RbfAHenau}CJkzt> z_r&hs9^-G - - - - - Piskel - - - - - -
                    - Loading Piskel ... -
                    - - -
                    - - - - - -
                    -
                    -
                    -
                    -
                    -
                    -
                    -
                    -
                    -
                    -
                      - -
                    -
                    -
                    - -
                    -
                    - -
                    -
                    -
                    -
                    -
                    - - - - - -
                    - - -
                    -
                    -
                    -
                    -
                      -
                      -
                      -
                      -
                      -
                      - -
                      -
                      -
                      -
                      -
                      - -
                      -
                      -
                      -
                      -
                      -
                      -
                      1x
                      -
                      -
                      Full
                      -
                      -
                      -
                      - -
                      -
                      -
                      -
                      -
                      -
                      - - -
                      -
                      -
                      -
                      -
                      -

                      Layers -
                      -

                      -
                      - - - - - - - - - - - - -
                      - -
                        - - -
                        - -
                        -

                        Transform

                        -
                          -
                          -
                          -

                          Palettes

                          -
                          - - - -
                          -
                          - - - - -
                          - - - -
                          -
                          -
                          - -
                          -
                          -
                          -
                          -
                          - -
                          -
                          - -
                          -
                          - -
                          -
                          - -
                          -
                          - -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - -
                          - - - - - - - - - - -
                          -
                          - -
                          - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clear_before_translate/js/lib/gif/gif.ie.worker.js b/clear_before_translate/js/lib/gif/gif.ie.worker.js deleted file mode 100644 index b6150c93..00000000 --- a/clear_before_translate/js/lib/gif/gif.ie.worker.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1< to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
                           
                          a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
                          t
                          "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
                          "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
                          "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

                          "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
                          ", "
                          " ], - thead: [ 1, "", "
                          " ], - tr: [ 2, "", "
                          " ], - td: [ 3, "", "
                          " ], - col: [ 2, "", "
                          " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
                          ", "
                          " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
                          " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
                          ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
                          - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
                          ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
                          ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
                          ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
                          ", - "
                          ", - "
                          ", - "
                          " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
                          "; - } - } - - return [ - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - gradientFix, - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "
                          ", - "", - "
                          ", - "
                          ", - "
                          ", - "", - "", - "
                          ", - "
                          ", - "
                          " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
                          " + html.join('') + "
                          "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
                          -
                          -
                          -
                          -
                            -
                            -
                            -
                            -
                            -
                            - -
                            -
                            -
                            -
                            -
                            - -
                            -
                            -
                            -
                            -
                            -
                            -
                            1x
                            -
                            -
                            Full
                            -
                            -
                            -
                            - -
                            -
                            -
                            -
                            -
                            -
                            - - -
                            -
                            -
                            -
                            -
                            -

                            Layers -
                            -

                            -
                            - - - - - - - - - - - - -
                            - -
                              - - -
                              - -
                              -

                              Transform

                              -
                                -
                                -
                                -

                                Palettes

                                -
                                - - - -
                                -
                                - - - - -
                                - - - -
                                -
                                -
                                - -
                                -
                                -
                                -
                                -
                                - -
                                -
                                - -
                                -
                                - -
                                -
                                - -
                                -
                                - -
                                -
                                -
                                -
                                -
                                -
                                -
                                - - -
                                -
                                -
                                -
                                - -
                                - - - - - - - - - - -
                                -
                                - -
                                - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file diff --git a/clear_capped/css/fonts/icomoon.eot b/clear_capped/css/fonts/icomoon.eot deleted file mode 100644 index f5314adf7b63f3e372c57b1dc2c12280cfbba943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4416 zcmb7IU2Ggz6+UNX?%es?pIPthdi|H#tnGDNaBZ*G+Y;KY8Z|$vqeRd^6;#zGO_Nk{ zylR4!B2=v?Dnjam)z>0q@qk1nO2i8i;$ffQg-R8D=^M+B`h*}4sRRPneD}`U-d#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_G!whoUMaq8Y9cQ;uI2`%D0vS(8Y5P0qx6PSNchC`;ub~ z_qs{L8t58M$BGO87EsAlWVIrra=j|bxU(*68WrwbY_%>n4QlpqQ>)l)?e4a^tyVjZ z+nqS(xZU2})v>n+ezB@e$B-6k<<<44cx}D{zeVIq?n>8{y;!=O-Bh5ysd>7d>e4LM zrGoW%44G+~u@=*uFPv0`fO7Uzj3lG^@%?*x@;$|50OWWSlMI6Gp$wbI`R_Y7OhvNQ6Ga2Q`~kGEAa4 z3GgscyapkIWWW3q~@xzY;cw5P&^m; zUO4T0DHIa66}Ms>xj2t|t$3FgTD?#Bba$#d#od(WPlu{l@&$-28|1y+-B{E7LXl{H z@c!?4pMOU$Ag-T4_1nM=nRtEvag=_lCPZIWaYG)Q*K4RwJ@kue1mkw$7|-b18vTYE z!FT}+{Io8x`5*7Sr%OBQoavz!G0;T;JeVrKHP{dpPG92<;)j9 zBVQ+7`smrl4-`Im_PvjHL`sHLoRE6gLIQ3Q8qmNDHROS#rUuniqe&b3dC)(4#=tlK z%b3C+j3shByt~cNv&J{gMf0Zlf!Q&CYd)~PZM|>(%KDq|#FV%$ekShQn-HL86!^Qy z;i@SSqb*Gz^z~ - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/clear_capped/css/fonts/icomoon.ttf b/clear_capped/css/fonts/icomoon.ttf deleted file mode 100644 index 5ae72b63d94aa0e3ec7d7054ec589def6ca9f394..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4252 zcmb7HO^hQ)6@IU~tE>O~)3)0l&u@D@GoGEmWM(`bCoD;!$b!$txD9=@vf%y>*# zLAhQ1>eZ|7y?Ryk>NPPD`P3nkRxf_}(RJssPm5;UE6=??mZU^lx4V!~BEML|e(vU*EZNccI0f zNBeEGU%0t@WqawJ`S;NN6WS{~+jrYE%ikx;6wr=uZSP$DYWYWhL3;x_o^9{mz5_c^ zvfozyWE#YKB+z%BUj^sP@ck*3>AO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*oS*o!iXm z+-6SaHgj5_?(wc}ZnM9*`S&8I4|8p0V|`=e=7E~3znawNXx-8rO`(ETh@*g{y`?~-D diff --git a/clear_capped/css/fonts/piskel.svg b/clear_capped/css/fonts/piskel.svg deleted file mode 100644 index e7d9704a..00000000 --- a/clear_capped/css/fonts/piskel.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - \ No newline at end of file diff --git a/clear_capped/css/fonts/piskel.ttf b/clear_capped/css/fonts/piskel.ttf deleted file mode 100644 index a6836b3585712666a034e53dd39253e7d4e39cad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2424 zcma)7&1+m$6hHUl-Fx5HeQ(~!Or|rLOp`Rxq)aktlCiXek_sizV6CL;MmtT@rnYH9 z8=*xgUAVBg@ek0A-Kn^8A>yXsQqYwPK?n#%#Epxtti*HQoph3d;+;G9eB5(>=bU%n zI~NE5_;4Q>OuzEl)QlQ_`Za34#s9_CjqcW=mG9pKAa#__UhUrALK>sIj#OQ}areqZ zTKx=V)C<18*1gPz=l=qb+qgf!jtVi!+bDm5^62`;_8s>DOriWE%JmzYt6lmr`vB!X zP>wgcceWrTAENve<>t-q#@fpRU;TukFg`iHwRw9R^Tgr4VfKMhARmE)duPcN)ST(j zCs2j=jorRMFztim6u@Ijc6RYcb`T9=_8Ax%fa2do%y2ck8E|+BsRs)8Fg!FL)7`&! zcToq(L&1~XUk~w~N3nqm0fJUhfns%t-8o)_?8p6Y9cHq-!8(k zW)_gP=!l$Y&^*(0WVl7=W*6wO94+$9TFlL&1wHcmqlfQY`sBMy7ao0j{rba4D`IT1 zJvi829NVJ{uTlBIQhE`@>RU+$ts*X_3BVi_MK!I+a|GXXQGP zb)v~Le5pxRwsG;Pwy5>$w2O>w-k55E*6s`uTj!p)bsZw6C^9>5&2gQ>NtWw0CPRcV zN*y7X&~f4=wvX7@N}T)MteT8C1VlEibub*&9Ge;p>Vt!!P|7529xh{?3g4AT8Hr~wlQ0fL*G)<# z6(!nNO!>a!1ir^b;QO2lgrxW!IUa%%I*OzWb?oY_6uBbQkyNn`cuYi;=Dy>59#=Z> z9PVNaCyXNHM%rUJ*GVPt@-$XlNi5j&j14Ycp2TADK#3Ad6vDA3#(9#3Nft$c(vcSC zMfzVQDtui`iBq8yr@2>DqypDgPB&0_9(eunK&^zdSaroM^_Lw_x&6LxY~6bT>2XGx;eh@3xjIV1qzPQ4(vxY=%)Ag z`u(53o&Ndl=;Rad%{2q?!!Pd*^=Yru0Xyf`hftJyS` z^b}0l2&nMzJQ{F|Zkx*!Wl0{G8x+SglR~nKhA(?D2xwHgLAg=FNjjIFF83;a#`^T?9DbfJLt%v;pqIHqy(`giCN2 S*QEk@xfi^s%09t=S^oiTj_VWv diff --git a/clear_capped/css/fonts/piskel.woff b/clear_capped/css/fonts/piskel.woff deleted file mode 100644 index 895352254dcb47cb469ef36bc5921da6f511db1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1848 zcmZ`(ZERCj7=CX*w#&o~a7Dh$fWaG!e7EMURA&WY~#}b4fWgBBi*REYZ*Vb<9 z_qq3W{a#xr)vX;vP`*qc5VIfrbH)UT(S#{R!w>iYKO}7|X1?d%E{;Ucz3+3L_v1Y0 zo;SJ2+|kz7v44LDK=pR00UT9NDE`-Yr>(64<9`CkuTX1EZv3@l-_~saigOr0N{wCr z?0T0*tpiZ9=)X^G&4Jm2y=nuE?MI)+sVzIvqwdDoVdTx!%Lp?Y`GuM(|#5A>@wJs7(Oz_d`?x$4@FI;~+4&$bF{8bp(0 z1{4Zl7>4cZ(rUEYeqdx6Yb~vlmDb8js}!%+!0LVTge=TUtH~#S&6Ng~ub{$69Yx=A zic1jW(<^{Qt-9qetz6sidPTA_85@mF#%+zpcbgkUXrc`JC1V1hglf920;;j^FM?h+ zB473_Rx7>bSZ!&pbfYw=Di3kxJLNdRQM^`;6;q^WCB+|#F&Zh~Ek?^0j`g&t9+SCN zvWaYLY2AcV%RTahJf6Gvn6TtMRXgeIB<-YqrgN6el9?HV+0L1E!q$FU{H^q%N~;gV zhJ54{XFOj}5>L>>d5B9G3A@9i5ns%AdNk+En{FKon`6Dv!_JfDey7=H?HN7p?)B?& z1HH09zT&S&uSTzoPvrB3$y@fHSVENU^X40GUp$$z#T{Xf;0p!#fDjN!B$(loLX?m4 z0wJs=qtqQ#5n>r59@0lV2}9D5HhgaSy4&xGm;^Ux4LAc1uhl&~JTzi6yG$;t-zILF zBNJo!_+)%Cllm;4PE7D;_%mafPbV#x4N1+UC1cADpB>J5b0o?7hE(>TlCuZE z;$+yIv0S!Zw9Pms#S`dAFW(jIigu41@&g6^t+d#-$oaE3e!h4ibvm93hlNmx=Xn8J z72z_0q(2&nVhahI%_uJ)R>ho3;vn=;j*uAfV!pJfbx8eraMj-$V;GCzgY;6{J(V3sZRDBl6_K*rpk$A`Hu-UQ5| zk_M5>5b<_^dPJJ7$A5D>&NX;j$?##I;el-a@A-L*0df#IGynSv8Bu^YdM-icD0t_S+9c(3lJb%=| .settings-title { - /* Override the default 10px margin bottom for this panel */ - margin-bottom: 15px; -} - -.settings-section-application .button-primary { - margin-top: 10px; -} - -/*******************************/ -/* Gif/Png Export Setting panel*/ -/*******************************/ -.gif-download-button, -.gif-render-button { - margin-top : 10px; - margin-right : 10px; -} - -.gif-export-preview, -.png-export-preview { - position:relative; - margin-top:10px; - max-height:32px; -} - -.gif-export-preview { - max-width:32px; -} - -.png-export-preview img { - max-height:32px; - float: left; -} - -.png-export-preview .light-picker-background { - max-width:240px; -} - -.gif-upload-status { - width: 180px; - margin-left: 5px; - margin-top: 10px; -} - -.gif-upload, -.png-export-preview { - overflow: hidden; -} - -.gif-upload-status, -.gif-export-preview { - float : left; -} - -.preview-upload-ongoing:before{ - content: "Upload ongoing ..."; - position: absolute; - display: block; - height: 100%; - width: 100%; - text-align: center; - padding-top: 45%; - box-sizing:border-box; - -moz-box-sizing:border-box; - background: rgba(0,0,0,0.5); - color: white; -} - -.export-scale { - margin-bottom: 10px; -} - -.export-scale .scale-input { - margin: 5px; - vertical-align: middle; - width: 150px; -} - -.export-scale .scale-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.export-resize { - margin: 10px 0; - overflow: hidden; -} - -.export-resize > * { - float: left; -} - -.export-resize > *:not(:last-child) { - margin-right: 10px; -} - -.export-resize > .resize-field { - width: 70px; -} - -.export-resize > .resize-label { - height: 23px; - line-height: 23px; -} - -.export-tabs { - overflow: hidden; - position: relative; -} - -.export-tabs:after { - content: ""; - display: block; - position: absolute; - bottom: 0; - width: 100%; - height: 1px; - z-index: 0; - background-color: gold; -} - -.export-tab { - float: left; - cursor: pointer; - padding: 5px; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; - /* Make sure the tab and its border are positioned above the :after element; */ - position: relative; - z-index: 1; -} - -.export-tab.selected, -.export-tab:hover { - color: gold; -} - -.export-tab.selected { - border-color: gold; - border-bottom-color: #444; - border-style: solid; - border-width: 1px; -} - -.export-panel-header { - padding: 10px 5px 0px; -} - -.export-info { - font-style: italic; - text-shadow: none; - font-weight: normal; -} - -.export-panel-section { - padding: 5px; - margin-top: 10px; - border: 1px solid #5d5d5d; - border-radius: 2px; -} - -.export-panel-row { - display: flex; - align-items: center; - overflow: hidden; -} - -.export-panel-gif .button { - margin-right: 5px; - width: 75px; - flex-shrink: 0; -} - -.export-panel-png .textfield { - width: 50px; -} - -.png-export-dimension-info, -.png-export-datauri-info { - margin-left: 5px; -} - -#png-export-columns, -#png-export-rows { - /* Override default textfield padding-right to keep the number spinners - aligned to the right. */ - padding-right: 0; -} - -/************************************************************************************************/ -/* Import panel */ -/************************************************************************************************/ - -.import-section, -.resize-section { - margin: 10px 0; -} - -.file-input-button { - margin-right: 8px; - border-radius: 2px; -} - -.import-highlight { - font-weight: bold; - color: white; -} -.resize-section-title { - vertical-align: top; - display: inline-block; - padding-top: 5px; - width: 25%; -} - -/*****************/ -/* ANCHOR WIDGET */ -/*****************/ - -.resize-origin-container { - overflow: hidden; - position: relative; - width: 70px; - margin-top: 5px; - display: inline-block; -} - -.transition .resize-origin-option, -.transition .resize-origin-option:before { - transition: background-color 0.2s, border-color 0.2s; -} - -.resize-origin-option { - float: left; - position: relative; - - box-sizing: border-box; - margin: 0 1px 1px 0; - width: 20px; - height: 20px; - - background : #888; - - font-size: 8px; - text-align: center; - cursor: pointer; -} - -.disabled .resize-origin-option { - cursor: default; - background : #555; - border-color: #555 !important; -} - -.resize-origin-option:hover { - border : 3px solid white; -} - -.resize-origin-option.selected { - border : 3px solid gold; -} - -.resize-origin-option:before { - content: ''; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin: -2px; -} - -.resize-origin-option.selected:before { - content: ''; - width: 4px; - height: 4px; - background: gold; -} - -.disabled .resize-origin-option.selected:before { - background: #555; -} - -.disabled .resize-origin-option[data-neighbor]:before { - border-color: #555 !important; -} - -.resize-origin-option[data-neighbor]:before { - width: 0; - height: 0; - border-width: 4px; - border-style: solid; - border-color: transparent; -} - -.resize-origin-option[data-neighbor="bottom"]:before { - border-top-color: gold; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="left"]:before { - border-right-color: gold; - margin-top: -4px; - margin-left: -6px; -} - -.resize-origin-option[data-neighbor="top"]:before { - border-bottom-color: gold; - margin-top: -6px; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="right"]:before { - border-left-color: gold; - margin-top: -4px; -} -.save-field { - width: 100%; -} - -.save-status { - margin-top: 10px; - margin-bottom: -10px; - vertical-align: middle; - font-weight: normal; - text-shadow: none; - font-style: italic; -} - -.save-file-name { - white-space: nowrap; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-desktop-file-name { - word-wrap: break-word; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-status-warning-icon { - float: left; - margin-top: 5px; -} - -.save-status-warning-icon { - overflow: hidden; - padding-left: 10px; -} - -.tool-icon { - position : relative; - cursor : pointer; - width: 46px; - height: 46px; - margin: 1px; - background-color: #3a3a3a; -} - -.tool-icon.selected { - cursor: default; - background-color: #444; -} - -.tool-icon.selected:before { - content:""; - position : absolute; - height : 100%; - width : 100%; - border: 3px solid gold; - box-sizing: border-box; -} - -.tool-icon:hover { - background-color: #444; -} - -/* - * Tool cursors: - */ - -.tool-paint-bucket .drawing-canvas-container:hover, -.tool-colorswap .drawing-canvas-container:hover { - cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; -} - -.tool-vertical-mirror-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; -} - -.tool-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/pen.png) 1 14, pointer; -} - -.tool-dithering .drawing-canvas-container:hover { - cursor: url(../img/cursors/dither.png) 1 14, pointer; -} - -.tool-lighten .drawing-canvas-container:hover { - cursor: url(../img/cursors/lighten.png) 1 15, pointer; -} - -.tool-eraser .drawing-canvas-container:hover { - cursor: url(../img/cursors/eraser.png) 3 14, pointer; -} - -.tool-stroke .drawing-canvas-container:hover { - cursor: url(../img/cursors/stroke.png) 1 14, pointer; -} - -.tool-rectangle .drawing-canvas-container:hover { - cursor: url(../img/cursors/rectangle.png) 5 15, pointer; -} - -.tool-circle .drawing-canvas-container:hover { - cursor: url(../img/cursors/circle.png) 5 15, pointer; -} - -.tool-move .drawing-canvas-container:hover { - cursor: url(../img/cursors/hand.png) 7 7, pointer; -} - -.tool-rectangle-select .drawing-canvas-container:hover, -.tool-lasso-select .drawing-canvas-container:hover { - cursor: crosshair; -} - -.tool-shape-select .drawing-canvas-container:hover { - cursor: url(../img/cursors/wand.png) 10 5, pointer; -} - -.tool-colorpicker .drawing-canvas-container:hover { - cursor: url(../img/cursors/dropper.png) 2 15, pointer; -} - -.swap-colors-button { - position: relative; - top: 50px; - left: 6px; - height: 18px; - width: 18px; - - opacity : 0.3; - - cursor : pointer; -} - -.swap-colors-button:hover { - opacity : 1; -} - -.tool-color-picker { - position:relative; -} - -.tool-color-picker:nth-child(1) { - z-index : 100; -} - -.tool-color-picker:nth-child(2) { - z-index : 90; - margin-top: 25px; - margin-left:-20px; -} - -.tool-color-picker input { - width: 16px; - height: 16px; - text-indent: -10000px; - border: 1px solid black; - background: white; - cursor: pointer; - position : relative; - top: 10px; - margin-left: 2px; -} - -.tool-color-picker .secondary-color-picker { - top : 18px; - margin-left: 0; -} - -.palette-wrapper { - margin-top: 10px; - margin-left: 10px; -} - -.palette-color[data-color=TRANSPARENT] { - position: relative; - top: 10px; - left: 10px; - background-color: white; - height : 16px; - width : 16px; - border: 2px solid #000; - background-size: 16px 16px; - background-position: 0 0; - background-image: -webkit-gradient( - linear, - left top, - right bottom, - color-stop(0, #fff), - color-stop(0.45, #fff), - color-stop(0.5, #ff0000), - color-stop(0.55, #fff), - color-stop(1, #fff) - ); - background-image: -moz-linear-gradient( - left top, - #fff 0%, - #fff 45%, - #f00 50%, - #fff 55%, - #fff 100% - ); -} - - -.pen-size-container { - overflow: hidden; - padding: 5px 5px; -} - -.pen-size-option { - float: left; - box-sizing: border-box; - width: 20px; - height: 20px; - margin-right: 2px; - border-style: solid; - border-width: 2px; - border-color: #444; - cursor: pointer; -} - -.pen-size-option[data-size='1'] { - padding: 5px; -} -.pen-size-option[data-size='2'] { - padding: 4px; -} -.pen-size-option[data-size='3'] { - padding: 3px; -} -.pen-size-option[data-size='4'] { - padding: 2px; -} - -.pen-size-option:before { - content: ''; - width: 100%; - height: 100%; - background-color: white; - display: block; - text-align: center; - line-height: 12px; - font-size: 90%; -} - -.pen-size-option:hover { - border-color: #888; -} - -.pen-size-option.selected:before { - background-color: gold; -} - -.pen-size-option.selected { - border-color: gold; -} - -.pen-size-option.labeled:before { - content: attr(real-pen-size); - color: black; -} - -/* -Icon classes can be used entirely standalone. They are named after their original file names. - -Example usage in HTML: - -`display: block` sprite: -

                                - -To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: - -// CSS -.icon { - display: inline-block; -} - -// HTML - -*/ -.icon-common-keyboard-gold { - background-image: url(../img/icons.png); - background-position: 0px -230px; - width: 36px; - height: 21px; -} -.icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons.png); - background-position: -230px -107px; - width: 18px; - height: 18px; -} -.icon-common-warning-red { - background-image: url(../img/icons.png); - background-position: -230px -86px; - width: 21px; - height: 21px; -} -.icon-frame-dragndrop-white { - background-image: url(../img/icons.png); - background-position: -230px -30px; - width: 30px; - height: 30px; -} -.icon-frame-duplicate-white { - background-image: url(../img/icons.png); - background-position: -230px 0px; - width: 30px; - height: 30px; -} -.icon-frame-plus-white { - background-image: url(../img/icons.png); - background-position: -230px -60px; - width: 26px; - height: 26px; -} -.icon-frame-recyclebin-white { - background-image: url(../img/icons.png); - background-position: -184px -184px; - width: 30px; - height: 30px; -} -.icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons.png); - background-position: -230px -143px; - width: 18px; - height: 18px; -} -.icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons.png); - background-position: -230px -125px; - width: 18px; - height: 18px; -} -.icon-settings-export-white { - background-image: url(../img/icons.png); - background-position: -138px 0px; - width: 46px; - height: 46px; -} -.icon-settings-gear-white { - background-image: url(../img/icons.png); - background-position: -138px -46px; - width: 46px; - height: 46px; -} -.icon-settings-open-folder-white { - background-image: url(../img/icons.png); - background-position: -138px -92px; - width: 46px; - height: 46px; -} -.icon-settings-resize-white { - background-image: url(../img/icons.png); - background-position: 0px -138px; - width: 46px; - height: 46px; -} -.icon-settings-save-white { - background-image: url(../img/icons.png); - background-position: -46px -138px; - width: 46px; - height: 46px; -} -.icon-tool-circle { - background-image: url(../img/icons.png); - background-position: -92px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorpicker { - background-image: url(../img/icons.png); - background-position: -138px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorswap { - background-image: url(../img/icons.png); - background-position: 0px 0px; - width: 46px; - height: 46px; -} -.icon-tool-dithering { - background-image: url(../img/icons.png); - background-position: -184px -46px; - width: 46px; - height: 46px; -} -.icon-tool-eraser { - background-image: url(../img/icons.png); - background-position: -184px -92px; - width: 46px; - height: 46px; -} -.icon-tool-lasso-select { - background-image: url(../img/icons.png); - background-position: -184px -138px; - width: 46px; - height: 46px; -} -.icon-tool-lighten { - background-image: url(../img/icons.png); - background-position: 0px -184px; - width: 46px; - height: 46px; -} -.icon-tool-move { - background-image: url(../img/icons.png); - background-position: -46px -184px; - width: 46px; - height: 46px; -} -.icon-tool-paint-bucket { - background-image: url(../img/icons.png); - background-position: -92px -184px; - width: 46px; - height: 46px; -} -.icon-tool-pen { - background-image: url(../img/icons.png); - background-position: -138px -184px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle-select { - background-image: url(../img/icons.png); - background-position: -184px 0px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle { - background-image: url(../img/icons.png); - background-position: -92px -92px; - width: 46px; - height: 46px; -} -.icon-tool-shape-select { - background-image: url(../img/icons.png); - background-position: -46px -92px; - width: 46px; - height: 46px; -} -.icon-tool-stroke { - background-image: url(../img/icons.png); - background-position: 0px -92px; - width: 46px; - height: 46px; -} -.icon-tool-vertical-mirror-pen { - background-image: url(../img/icons.png); - background-position: -92px -46px; - width: 46px; - height: 46px; -} -.icon-tool-center { - background-image: url(../img/icons.png); - background-position: -92px 0px; - width: 46px; - height: 46px; -} -.icon-tool-clone { - background-image: url(../img/icons.png); - background-position: -46px -46px; - width: 46px; - height: 46px; -} -.icon-tool-flip { - background-image: url(../img/icons.png); - background-position: 0px -46px; - width: 46px; - height: 46px; -} -.icon-tool-rotate { - background-image: url(../img/icons.png); - background-position: -46px 0px; - width: 46px; - height: 46px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - .icon-common-keyboard-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-warning-red { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-dragndrop-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-duplicate-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-plus-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-recyclebin-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-export-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-gear-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-open-folder-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-resize-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-save-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-circle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorpicker { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorswap { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-dithering { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-eraser { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lasso-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lighten { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-move { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-paint-bucket { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-shape-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-stroke { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-vertical-mirror-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-center { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-clone { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-flip { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rotate { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } -} - -.color-picker-slider * { - box-sizing: border-box; -} - -.color-picker-slider input[type="range"] { - -webkit-appearance: none; - -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - width: 100%; - border: none; - padding: 1px 2px; - border-radius: 3px; - background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); - box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; - outline: none; /* no focus outline */ -} - -/* thumb */ - -.color-picker-slider input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - cursor:pointer; - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ - background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} -.color-picker-slider input[type="range"]::-moz-range-thumb { - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -.color-picker-slider input[type="range"]::-ms-thumb { - width: 7px; - height: 18px; - border-radius: 2px; - border: 0; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -/*CROSS BROWSER RESET*/ - - -.color-picker-slider input[type="range"]::-moz-range-track { - border: inherit; - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-track { - border: inherit; - color: transparent; /* don't drawn vertical reference line */ - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-fill-lower, -.color-picker-slider input[type="range"]::-ms-fill-upper { - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-tooltip { - display: none; -} - -.color-picker-slider, -.color-picker-input { - padding: 0 10px; - height : 25px; - overflow: hidden; -} - -.color-picker-slider span{ - line-height : 25px; - width : 10px; - float:left; -} - -.color-picker-slider input[type="range"]{ - float:left; - height : 10px; - width : 100px; - margin: 7px 1px 7px 8px; -} - -.color-picker-slider input[type="text"]{ - float:left; - width : 47px; - margin-left: 5px; -} - -.color-picker-input { - margin-bottom: 10px; -} - -.color-picker-input .textfield{ - width:100%; -} - -.color-picker-slider input[type="range"][data-dimension="h"] { - background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} -#dialog-container-wrapper { - position: absolute; - z-index: 20000; - - top: 0; - right: 0; - bottom: 0; - left: 0; - - padding: 50px 150px; - overflow: hidden; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - background-color: rgba(0,0,0,0.8); - opacity: 0; - pointer-events: none; - - color: white; -} - -#dialog-container-wrapper.animated { - transition: opacity 0.2s; -} - -#dialog-container-wrapper.show { - opacity: 1; - pointer-events: auto; -} - -#dialog-container { - width: 100%; - height: 100%; - - margin-top: -1500px; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - border-radius: 3px; - border : 3px solid gold; - background: #444; - overflow: auto; -} - -.show #dialog-container { - margin-top: 0; -} - -#dialog-container.browse-local { - width: 700px; - height: 500px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -350px; -} - -.show #dialog-container.browse-local { - margin-top: -250px; -} - -.dialog-wrapper { - height: 100%; - position : relative; -} - -.dialog-content { - position: absolute; - top: 45px; - bottom: 0; - width: 100%; - box-sizing: border-box; -} - -.dialog-head { - width: 100%; - background: gold; - margin: 0; - padding: 10px; - color: black; - font-size: 1.8em; - height: 45px; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -.dialog-close { - position: absolute; - top: 0; - right: 0; - line-height: 45px; - margin-right: 10px; - font-size: 1.3em; - cursor: pointer; -} - -/************************************************************************************************/ -/* Browse local piskels panel */ -/************************************************************************************************/ - -.local-piskel-list { - width: 100%; -} - -.local-piskel-item { - height: 3em; -} - -.local-piskel-name { - width: 40%; -} - -.local-piskel-save-date { - font-weight : normal; -} - -.local-piskel-list a { - text-decoration: none; -} - -.local-piskel-list a:hover { - text-decoration: underline; -} - -.local-piskel-list-head { - font-weight: bold; - color: gold; -} - -.local-piskel-load-button, -.local-piskel-delete-button { - width : 75px; -} -.cheatsheet-link { - position: fixed; - bottom: 10px; - left: 10px; - - color : gold; - font-weight: bold; - font-size : 1.25em; - line-height: 20px; - - cursor: pointer; - - opacity: 0.5; - z-index: 11000; - transition : opacity 0.3s; -} - -.cheatsheet-link:hover { - opacity: 1; -} - -.cheatsheet-container { - box-sizing: border-box; - display: block; - - bottom: 46px; - padding: 20px 3%; - border-radius: 3px; - background-color: rgba(0,0,0,0.9); - overflow: auto; -} - -.cheatsheet-container .cheatsheet-title { - font-size:24px; - margin-top: 30px; -} - -.cheatsheet-container .cheatsheet-title:nth-of-type(1) { - margin-top: 0; -} - -.cheatsheet-section { - box-sizing: border-box; - float: left; - - vertical-align: top; - padding : 0 20px 20px 20px; - min-width: 300px; -} - -.cheatsheet-boxes { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - float: left; -} - -@media (min-width: 1300px) { - .cheatsheet-container > div { - width: 33%; - } - .cheatsheet-boxes { - flex-direction: column; - } -} - -.cheatsheet-shortcut { - overflow: hidden; - margin: 10px 0; -} - -.cheatsheet-icon.tool-icon { - float: left; - - height: 30px; - width: 30px; - margin: 0 10px 0 0; - background-size: 30px 30px; -} - -.cheatsheet-description { - color: white; - font-size : 14px; - margin-left: 10px; - line-height : 30px; -} - -.cheatsheet-key { - box-sizing: border-box; - display : inline-block; - height: 30px; - line-height: 26px; - padding: 0 10px; - - border : 2px solid white; - border-radius: 2px; - - text-align: center; - font-family: monospace; - font-weight: bold; - font-size : 18px; - color: white; -} - -.cheatsheet-shorcut-conflict .cheatsheet-key { - border-color: red; - color: red; -} - -.cheatsheet-shortcut-editable { - cursor : pointer; -} - -.cheatsheet-shortcut-editable .cheatsheet-key { - border-color: gold; - color: gold; -} - -.cheatsheet-shortcut-editing .cheatsheet-key { - animation: fade .5s infinite; -} - -.cheatsheet-shortcut-undefined .cheatsheet-key { - border-color: red; - color: red; -} - -/*Cheatsheet actions*/ - -.cheatsheet-actions { - position: absolute; - box-sizing: border-box; - - bottom : 0; - left : 0; - right : 0; - height : 46px; - - padding : 10px; - overflow: hidden; - - background-color : gold; -} - -.cheatsheet-helptext { - font-size: 14px; - height : 26px; - line-height : 26px; - color: black; -} - -.cheatsheet-helptext-tooltip { - text-align: left; -} - -.cheatsheet-helptext-tooltip-item { - line-height: 0.9em; - margin: 10px 0; -} - -.cheatsheet-button { - position: absolute; - bottom: 10px; - right: 10px; -} - - -.cheatsheet-icon-tool-circle { - background-image: url(../img/icons/tools/tool-circle.png); -} - -.cheatsheet-icon-tool-colorpicker { - background-image: url(../img/icons/tools/tool-colorpicker.png); -} - -.cheatsheet-icon-tool-colorswap { - background-image: url(../img/icons/tools/tool-colorswap.png); -} - -.cheatsheet-icon-tool-dithering { - background-image: url(../img/icons/tools/tool-dithering.png); -} - -.cheatsheet-icon-tool-eraser { - background-image: url(../img/icons/tools/tool-eraser.png); -} - -.cheatsheet-icon-tool-lasso-select { - background-image: url(../img/icons/tools/tool-lasso-select.png); -} - -.cheatsheet-icon-tool-lighten { - background-image: url(../img/icons/tools/tool-lighten.png); -} - -.cheatsheet-icon-tool-move { - background-image: url(../img/icons/tools/tool-move.png); -} - -.cheatsheet-icon-tool-paint-bucket { - background-image: url(../img/icons/tools/tool-paint-bucket.png); -} - -.cheatsheet-icon-tool-pen { - background-image: url(../img/icons/tools/tool-pen.png); -} - -.cheatsheet-icon-tool-rectangle-select { - background-image: url(../img/icons/tools/tool-rectangle-select.png); -} - -.cheatsheet-icon-tool-rectangle { - background-image: url(../img/icons/tools/tool-rectangle.png); -} - -.cheatsheet-icon-tool-shape-select { - background-image: url(../img/icons/tools/tool-shape-select.png); -} - -.cheatsheet-icon-tool-stroke { - background-image: url(../img/icons/tools/tool-stroke.png); -} - -.cheatsheet-icon-tool-vertical-mirror-pen { - background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); -} - -#dialog-container.create-palette { - width: 500px; - height: 600px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.create-palette { - margin-top: -300px; -} - -.create-palette-section { - position: absolute; - left: 10px; - top: 50px; -} - -.create-palette-import-section { - display : inline-block; -} - -.colors-container { - position: absolute; - - left: 10px; - right: 10px; - top: 85px; - - height: 460px; - - border: 1px solid black; - background: #333; -} - -.color-picker-container { - position:absolute; - left : 280px; - top:0; - bottom:0; - right:0; - background: #222; -} - -.create-palette-actions { - position: absolute; - box-sizing: border-box; - - width:100%; - height: 45px; - - left: 0; - right: 0; - bottom: 0; - - padding:10px; - text-align:right; -} - -.color-preview { - width: 170px; - height: 70px; - margin: 11px; -} - -.colors-list { - overflow: auto; - width: 280px; - box-sizing: border-box; - height: 100%; - padding-bottom: 10px; -} - -.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - position:relative; - float : left; - - width : 44px; - height : 44px; - margin : 10px 0 0 10px; - - box-sizing : border-box; - - cursor : pointer; -} - -@-moz-document url-prefix() { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - - -.create-palette-color { - border:1px solid #2c2c2c; - transition : border-color 0.2s; -} -.create-palette-color:hover { - border:1px solid gold; -} - -.colors-list-drop-proxy { - border:2px dotted #eee; -} - -.create-palette-new-color { - border:2px dotted gold; - - border-radius: 2px; - line-height: 40px; - text-align: center; - font-size: 20px; - color: gold; -} - -.create-palette-color.selected { - border:2px solid gold; -} - -.create-palette-remove-color { - position: absolute; - top: 0; - right: 0; - padding: 2px 4px 0 0; - opacity : 0.2; - - font-weight: bold; - color: rgb(255,255,255); - text-shadow : 0 0 1px rgb(0,0,0); - - transition : opacity 0.3s, color 0.1s; -} - -.light-color .create-palette-remove-color { - color: rgb(0,0,0); - text-shadow : 0 0 1px rgb(255,255,255); -} - -.selected .create-palette-remove-color { - top: -1px; - right: -1px; -} - -.create-palette-color:hover .create-palette-remove-color { - opacity: 0.6; -} - -.create-palette-color .create-palette-remove-color:hover { - opacity: 1; - color: rgb(240,80,80); - text-shadow : 0 0 1px rgb(0,0,0); -} - -/*SPECTRUM OVERRIDES*/ - -.create-palette .sp-container{ - background-color: transparent; - border: none; - box-shadow : none; - border-radius:0; - padding:5px; -} -/************************************************************************************************/ -/* Import dialog */ -/************************************************************************************************/ - -#dialog-container.import-image { - width: 550px; - height: 360px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.import-image { - margin-top: -150px; -} - -.import-subsection { - margin-left: 25px; -} - -.import-section:not(.import-subsection) > .dialog-section-title { - width: 50px; -} - -.import-section-preview-title { - position: absolute; - margin-left: 50%; - margin-top: -28px; -} - -.import-section-preview { - position: absolute; - display: inline-block; - border: 1px dashed #999; - border-radius: 3px; - margin-left: 50%; -} - -.import-section-preview img { - max-width: 220px; - max-height: 220px; - display: block; -} - -.import-section-preview.no-border { - border-color: transparent; -} - -.import-section-preview canvas { - position: absolute; - left: 0; - top: 0; -} - -.dialog-section-title { - display : inline-block; - width: 80px; -} - -.dialog-section-radio { - margin-top: 15px; - vertical-align: sub; -} - -.import-size-field:nth-of-type(2) { - margin-left: 5px; -} - -.import-image-file-name { - display: inline-block; - overflow: hidden; - - width: 200px; - vertical-align: middle; - - word-break : break-all; - white-space: nowrap; - text-overflow: ellipsis; - - font-style: italic; - font-weight: normal; - text-shadow: none; - color: gold; -} - -[name=smooth-resize-checkbox] { - margin : 0 8px; -} - -.dialog-import-body { - padding: 10px 20px; - font-size:1.3em -} - -.import-button { - font-size: 1em; - height: 28px; - padding: 0px 10px; - margin-top: 15px; -} -.performance-link { - display: none; - position: fixed; - bottom: 10px; - right: 10px; - z-index: 11000; - cursor: pointer; - opacity: 0; - transition : opacity 0.3s; -} - -.performance-link.visible { - display: block; - opacity: 0.66; - animation: glow 2s infinite; -} - -.performance-link.visible:hover { - opacity: 1; - animation: none; -} - -#dialog-container.performance-info { - width: 500px; - height: 525px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; - margin-top: -260px; - -} - -.dialog-performance-info-body { - font-size: 13px; - letter-spacing: 1px; - padding: 10px 20px; -} - -.dialog-performance-info-body ul { - border: 1px solid #666; - padding: 5px; - border-radius: 3px; -} - -.dialog-performance-info-body li { - list-style-type: initial; - margin: 0 20px; -} - -.dialog-performance-info-body sup { - color: gold; - cursor: pointer; -} - -.show #dialog-container.performance-info { - margin-top: -300px; -} - -.dialog-performance-info-body .warning-icon { - float: left; - margin-top: 10px; -} - -.dialog-performance-info-body .warning-icon-info { - overflow: hidden; - margin-left: 30px; -} - -/************************************************************************************************/ -/* Unsupported browser dialog */ -/************************************************************************************************/ - -#dialog-container.unsupported-browser { - width: 600px; - height: 260px; - top : 50%; - left : 50%; - position : absolute; - margin-top: -130px; - margin-left: -300px; -} - -.unsupported-browser .dialog-content { - font-size:1.2em; - letter-spacing: 1px; - padding:10px 20px; - overflow: auto; -} - -.unsupported-browser .supported-browser-list { - padding: 5px 20px; -} - -.unsupported-browser .supported-browser-list li { - list-style-type: square; -} - -#current-user-agent { - color: gold; -} - -.user-message { - position: absolute; - right: 0; - bottom: 0; - padding: 10px 47px; - max-width: 300px; - - border-top-left-radius: 7px; - border: #e1a325 2px solid; - border-right: 0; - border-bottom: 0; - - color: #222; - background-color: gold; - - font-weight: bold; - font-size: 13px; - - z-index: 30000; -} - -.user-message .close { - position: absolute; - top: 6px; - right: 17px; - - font-size: 18px; - font-weight: bold; - - cursor: pointer; -} - -.user-message .close:hover { - color: black; -} - -.progress-bar-container { - position: absolute; - left: 0; - bottom: 0; - padding: 10px; - width: 360px; - border-top-right-radius: 2px; - border: gold 2px solid; - border-left: 0; - border-bottom: 0; - background-color: #444; - font-size: 14px; - z-index: 30000; - color: #eee; -} - -.progress-bar-item { - float: left; - height:20px; -} - -.progress-bar-status { - line-height: 20px; - width : 40px; - overflow : hidden; - margin: 0 0 0 10px; -} - -.progress-bar { - border : 1px solid grey; - margin-top: 8px; - height : 4px; - width : 300px; - background : linear-gradient(to left, gold, gold) no-repeat -300px 0; - background-color : black; -} -.toolbox-container { - border: 2px solid #888; - font-size: medium; - color: white; - text-align: left; - border-radius: 2px; - margin-top: 5px; - overflow: hidden; -} - -.toolbox-title { - padding: 8px; - margin: 0; - font-size: 15px; - /* reset for firefox */ - height: 16px; - background: #222; -} - -.toolbox-buttons { - flex-shrink: 0; - overflow: hidden; - border-top: 1px solid #666; - border-bottom: 1px solid #222; -} - -.toolbox-buttons .button { - /* Override border propery on .button elements from form.css */ - border-style: solid; - border-color: #333; - border-width: 0 1px 0 0; - border-radius: 0; - - background-color: #3f3f3f; -} - -.toolbox-buttons .button[disabled], -.toolbox-buttons .button[disabled]:hover { - background-color: #aaa; -} - -.toolbox-buttons button:last-child { - border-right-width: 0; -} - - -/** - * Layers container - */ -.layers-list-container { - min-height: 85px; - display: flex; - flex-direction: column; -} - -/** - * Layers title and toggle preview - */ - -.layers-title { - position: relative; - flex-shrink: 0; -} - -.layers-toggle-preview { - position: absolute; - top: 0.3em; - right: 0.5em; - - color: #999; - font-size: 1.3em; - cursor: pointer; - - transition: 0.2s linear; -} - -.layers-toggle-preview:hover { - color: white; -} - -.layers-toggle-preview-enabled, -.layers-toggle-preview-enabled:hover { - color : gold; -} - -/** - * Layers buttons - */ - -.layers-button { - margin: 0; - width: 16.66667%; - float : left; -} - -/** - * Layers list - */ - -.layers-list { - font-size : 12px; - overflow: auto; -} - -.layer-item { - position: relative; - display: flex; - height:24px; - line-height: 24px; - border-top: 1px solid #444; - cursor: pointer; -} - -.layer-item .layer-name { - padding: 0 0 0 10px; - flex: 1 auto; - white-space: nowrap; -} - -.layer-item .layer-name.overflowing-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.layer-item:hover { - background : #222; -} - -.layer-item-opacity { - padding-right: 8px; -} - -.current-layer-item, -.current-layer-item:hover { - background : #333; - color: gold; -} -.palettes-list-container { - min-height: 100px; - display: flex; - flex-direction: column; -} - -.palettes-title { - flex-shrink: 0; - background-size: 22px; - background-repeat: no-repeat; - background-position: 97%; -} - -/** - * Palettes action buttons - */ - -.palettes-list-container .toolbox-buttons { - background-color: #3f3f3f; - height: 24px; - padding: 0; -} - -.palettes-list-button, -.palettes-list-select { - margin: 0; - float: left; -} - -.palettes-list-button { - width: 16.66667%; -} - -.palettes-list-select { - width: 66.66667%; - height: 100%; - padding: 0 5px 0 5px; - - color: #aaa; - font-size : 0.75em; - - text-align:left; - font-weight: normal; - - transition : background-color 0.3s, color 0.3s; - cursor:pointer; -} - -.palettes-list-select:hover, -.palettes-list-select:focus { - background-color: #484848; - color: white; -} - -.palettes-list-select:focus { - outline: none; -} - -/* - * Palette colors list - */ - -.palettes-list-colors { - height: 100%; - max-height: 160px; - overflow: auto; - padding-top: 5px; -} - -.palettes-list-color { - cursor: pointer; - float: left; - margin: 0 0 5px 5px; - width: calc((100% - 30px) / 5); - height: 32px; - position: relative; -} - -.palettes-list-color div { - height: 100%; -} - -/* - * Placeholder when no color is available in the current palette - */ - -.palettes-list-no-colors { - height: 35px; - line-height: 35px; - width: 100%; - color: gray; - font-size: 0.7em; - font-style: italic; - text-align: center -} - -/* - * Primary and secondary color markers - */ - -.palettes-list-primary-color:before, .palettes-list-secondary-color:before { - content: ""; - position: absolute; - bottom: 1px; - display: inline-block; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); - width: 14px; - height: 14px; -} - -.palettes-list-primary-color:before { - left: 1px; -} - -.palettes-list-secondary-color:before { - right: 1px; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); -} - -/* - * Color index for the 9 first colors - */ - -.palettes-list-color:nth-child(-n+10):after { - position: absolute; - top: 0; - right: 0; - - background-color: black; - color: gold; - - font-family: Tahoma; - font-size: 0.5em; - font-weight: bold; - - padding: 2px 3px 2px 3px; - border-radius: 0 0 0 2px; -} - -.palettes-list-color:nth-child(1):after { - content: "1"; -} - -.palettes-list-color:nth-child(2):after { - content: "2"; -} - -.palettes-list-color:nth-child(3):after { - content: "3"; -} - -.palettes-list-color:nth-child(4):after { - content: "4"; -} - -.palettes-list-color:nth-child(5):after { - content: "5"; -} - -.palettes-list-color:nth-child(6):after { - content: "6"; -} - -.palettes-list-color:nth-child(7):after { - content: "7"; -} - -.palettes-list-color:nth-child(8):after { - content: "8"; -} - -.palettes-list-color:nth-child(9):after { - content: "9"; -} - -/** - * Animated preview styles. - */ - -.preview-container { - flex-shrink: 0; - - border : 0 Solid black; - border-radius:5px 0 0 5px; - box-shadow : 0 0 2px rgba(0,0,0,0.2); - font-size: 0; -} - -.preview-container .canvas-container { - overflow : hidden; -} - -.preview-container canvas { - border : 0 Solid transparent; -} - -.canvas-container .animated-preview-canvas-background { - position : relative; - height: 100%; -} - -#animated-preview-container { - background: #333; - border-radius : 0 0 2px 2px; - overflow : hidden; -} - -.canvas-container-wrapper { - height :200px; - width : 200px; - overflow:hidden; -} - -.preview-container .background-image-frame-container { - height: 100%; - width: 100%; - position: relative; - background-position: center; -} - -.display-fps { - float: left; - color: #aaa; - font-size: 12px; - min-width: 55px; - vertical-align: bottom; - line-height: 26px; -} - -.range-fps { - overflow: hidden; - width: 100px; - height : 26px; - margin : 0; - box-sizing: border-box; -} - -.preview-toggle-onion-skin { - font-size: 2rem; - color: #aaa; - float: left; - line-height: 26px; - height: 100%; - padding-left: 5px; - padding-right: 5px; - border-right: 1px solid #222; - transition: 0.2s linear; - cursor:pointer; -} - -.preview-toggle-onion-skin:hover { - color : white; -} - -.preview-toggle-onion-skin-enabled, -.preview-toggle-onion-skin-enabled:hover { - color : gold; -} - -.preview-contextual-actions { - position : absolute; - z-index: 500; - right : 10px; - top : 10px; - - cursor : pointer; - - opacity: 0; - transition: 0.3s opacity, 0.3s border-color; -} - -.minimap-container:hover .preview-contextual-actions { - opacity: 1; -} - -.preview-contextual-action { - float: left; - - width : 18px; - height: 18px; - line-height: 18px; - margin: 0 5px; - - border: 2px solid white; - background-color: rgba(0, 0, 0, 0.3); - color: white; - - font-size: 10px; - font-weight: bold; - font-family: Tahoma; -} - -.preview-contextual-action-hidden { - display: none; -} - -.preview-contextual-action:hover { - color: gold; - border-color: gold; -} - -/** - * Drop-down in preview size selection - */ -.preview-drop-down { - float: left; - position: relative; - width : 22px; - min-height: 22px; - margin: 0 5px; -} - -.preview-drop-down.preview-drop-down-disabled { - opacity: 0.5; -} - -.preview-disable-overlay{ - position: absolute; - width: 100%; - height: 100%; - display: none; -} - -.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { - display: block; - z-index: 10; -} - -.preview-drop-down .preview-contextual-action { - position: relative; - margin: 0 0 -100% 0; - opacity: 0; - transition: opacity linear .2s, - margin linear .2s; - transition-delay: 0s, .2s; - z-index: 1; -} - -.preview-drop-down:hover .preview-contextual-action { - margin: 0 0 5px 0; - opacity: 1; - transition-delay: 0s, 0s; -} - -.preview-drop-down .size-button-selected { - opacity: 1; - color: gold; - border-color: gold; - z-index: 5; -} - - -.open-popup-preview-button { - border : 2px solid white; - background-color : rgba(0,0,0,0.3); -} - -.open-popup-preview-button:hover { - border-color: gold; -} - -/** - * The regular image is provided by the sprite icons.png+icons.css - */ -.icon-minimap-popup-preview-arrow-white:hover { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); - background-position: 0 0; - background-size: 18px 18px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); - -} - -.transformations-container { - flex-shrink: 0; -} - -.transformations-container .tool-icon { - float:left; -} - -/*** -Spectrum Colorpicker v1.1.2 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue -{ - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top -{ - margin-bottom: 3px; -} -.sp-color, .sp-hue -{ - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error -{ - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container -{ - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container -{ - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container -{ - border-right: solid 1px #ccc; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el -{ - position:relative; -} - -/* Initial */ -.sp-initial -{ - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -/* Buttons */ -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview -{ - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette -{ - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el -{ - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container -{ - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel -{ - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover -{ - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active -{ - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el -{ - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner -{ - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner -{ - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -/** - * Piskel specific CSS for spectrum widgets - */ - -/* Widget's main container */ -.sp-container { - border-radius: 4px; - background-color: #2B2B2B; - border: solid 4px #888; - padding: 5px 5px 0 5px; - box-shadow : 0 0 5px 0 black; -} - -.sp-container[data-y-position=bottom] { - border-top-left-radius: 0; -} - -.sp-container[data-y-position=top] { - border-bottom-left-radius: 0; -} - -/* Color square container */ -.sp-color, .sp-hue { - border : 1px solid #222; -} - -/* Remove the padding on the input container */ -.sp-replacer { - padding: 4px; - height: 100%; - border-width: 0; - box-sizing: border-box; - -moz-box-sizing:border-box; - background-color: #444; -} - -.sp-replacer:hover { - background-color: #888; -} - -/* Hide the triangle */ -.sp-dd { - display: none; -} - -/* */ -.sp-preview { - margin-right: 0; - height: 100%; - width: 39px; - border-width: 0; -} - -.sp-palette-row-selection { - max-width: 62px; -} - -.sp-palette .sp-thumb-el { - margin : 0 5px 5px 0; - width: 24px; - height: 24px; - border-color: #444; - -} - -.sp-picker-container, .sp-palette-container { - padding-top: 5px; - padding-right: 5px; - padding-left: 5px; - border-left-width: 0; - border-right-width: 0; -} - -.sp-picker-container { - padding: 5px; - padding-bottom: 300px; - margin-bottom: -295px; -} - -.sp-slider { - height: 5px; - left: -2px; - right: -2px; - border: 2px solid white; - background: rgba(255,255,255,0); - opacity: 1; - border-radius: 2px; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-dragger { - border-radius: 8px; - height: 12px; - width: 12px; - border: 2px solid white; - background: none; - box-sizing:border-box; - -moz-box-sizing:border-box; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-palette .sp-thumb-el.sp-thumb-active { - border-color: gold; - box-shadow: 0 0 0px 1px gold; -} - -.sp-input { - border: 1px solid #666; - margin: 0; - background: #111; - border-radius: 2px; - color: #D3D3D3; - font-family: monospace!important; -} - -.sp-input.sp-validation-error { - background: #330000; -} -/*! - * Bootstrap v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.tooltip { - position: absolute; - z-index: 30000; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; -} -.tooltip.right { - margin-left: 3px; -} -.tooltip.bottom { - margin-top: 3px; -} -.tooltip.left { - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} - -.tooltip { - line-height: 20px; -} - -.tooltip.in { - opacity: 0.95; - filter: alpha(opacity=95); -} - -.tooltip { - line-height: 20px; -} -.preview-list-wrapper { - position: relative; - height: 100%; - overflow: hidden; -} - -.preview-list-scroller { - overflow-y: scroll; - overflow-x: hidden; - height: 100%; -} - -.top-overflow, -.bottom-overflow { - height: 20px; - position: absolute; - left: 0; - right: 12px; - - -webkit-transition: all 500ms ease-out; - -moz-transition: all 500ms ease-out; - -ms-transition: all 500ms ease-out; - -o-transition: all 500ms ease-out; - transition: all 500ms ease-out; - - background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), - linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); - background-size: 30px 40px; - background-repeat: repeat-x; - background-position: 3px 0; - z-index: 10; -} - -.top-overflow { - top: -20px; -} - -.bottom-overflow { - bottom: -20px; - background-position: 3px -20px; -} - -.top-overflow-visible .top-overflow { - top: 0; -} - -.bottom-overflow-visible .bottom-overflow { - bottom: 0; -} - -.preview-list { - list-style-type: none; - padding-right: 9px; -} - -.add-frame-action { - margin-top: 8px; - padding: 6px 0; - overflow: hidden; - width: 96px; - - border: #888 solid 3px; - border-radius: 4px; - - color: #888; - background-color: #222; - font-size: 13px; - cursor: pointer; -} - -.add-frame-action-icon { - margin: 3px; - float: left; -} - -.add-frame-action .label { - overflow: hidden; - text-align: left; -} - -.add-frame-action:hover { - border-color: gold; -} - -.preview-tile { - position: relative; - border: #444 3px solid; - border-radius: 3px; - margin: 5px 0; - width: 96px; - height: 96px; -} - -.preview-tile:first-child { - margin-top: 0; -} - -.preview-tile:hover { - border: #999 3px solid; -} - -.tile-view { - position : relative; -} - -.preview-tile .tile-overlay { - z-index: 10; - position: absolute; - background-color: rgba(100, 100, 100, 0.6); - opacity: 0; - height: 30px; - width: 30px; - border: none; -} - -.preview-tile:hover .tile-overlay { - opacity: 1.0; -} - -.preview-tile .tile-overlay.tile-count { - display: block; - opacity: 1.0; - border-bottom-right-radius: 3px; - top: 0; - left: 0; - font-size: 14px; - line-height: 30px; - color: white; - font-weight: bold; - text-align: center; - cursor: default; -} - -.preview-tile .tile-overlay.delete-frame-action { - top: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.duplicate-frame-action { - bottom: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.dnd-action { - bottom: 0; - left: 0; - border-top-right-radius: 3px; - cursor: move; -} - -.preview-tile.selected { - border-color: gold; -} - -.preview-tile.selected:after { - content: ""; - position: absolute; - top: 38px; - right: -9px; - border: transparent 4px solid; - border-left-color: gold; - border-width: 6px 0 6px 6px; - border-style: solid; -} - - -/** - * Drag n drop styles. - */ - -.preview-tile-drop-proxy { - border: 3px dashed gold; - background-color: rgba(255, 215,0, 0.2); -} - -.minimap-crop-frame { - position: absolute; - border: 2px solid gold; - z-index: 100; - box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; -} \ No newline at end of file diff --git a/clear_capped/img/canvas-backgrounds/canvas-background-light.png b/clear_capped/img/canvas-backgrounds/canvas-background-light.png deleted file mode 100644 index d11f6acd9d9f3a9d245446e703d27d6063a2cbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^xl_H+M9WCij$3p^r= z85p<)K$vl@^4?OQpj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9ish**M!Iz?iKvhwm zE{-7{-fzz?3$6Wp)I~Ph(G$b5}H3_P)u~3up_2r>mdK II;Vst0P*=nD*ylh diff --git a/clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png b/clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png deleted file mode 100644 index 9f8f188e275a3b66aeb10d56b1c42e333c060334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?4#uWfniGRt5@5mAFQf1m~xf zlqVLYG6W=M=9TFAxrQi|8S9zq85$UTDOw0r747Nb7~FVdQ&MBb@0CHMUUH||9 diff --git a/clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png b/clear_capped/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png deleted file mode 100644 index acd57cdee51965cb440415dbf46b08f446772866..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d+4#6QOkP~xHV-HyRpJ^^5}cn_ zQl40p$`Fv4nOCCc=Nh6=W~^tbXJ}yXrD!2gRkWvzV~B_M+p`OK84P%s55C(UA2?03 za^@bc!!;@oM1P(+{#SuJ(n=uZrNe~O`UdSkoRKFkH7a3LyE@pAMX1UdpX7UE=rtdq8U#JYD@<);T3K0RT{TQ#Swr diff --git a/clear_capped/img/canvas-backgrounds/canvas-background-medium.png b/clear_capped/img/canvas-backgrounds/canvas-background-medium.png deleted file mode 100644 index a90cd46c1ed87d8dea055869cd26a9decc69287b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?2{Hm<{;9GXjOAN?apKg7ec# z$`gxH83GbB^GfvmTtgJfjP*?Q3=Isv6fFd*it==E4Ds-Odv+l&g8>io!FTpS)3Q&V zeiAD2Oqp^0iFCVn?2#ufH7aJqUu{{!Y-t86P95j5@FXp3`C`iyo^k94_~8&v(DeJs19Scz#c` zbi^xxCRMh%M(T`F#NdcXrx9&Cvu{c4pMaK*cq0%A*dB^(3(Er{N;aoVq+G@(T#RV= z+=1%$KL9Nq@kXyjq^#JB?XeKmd>HbxDCvx0U^GKEr{UIcP5U&Upxs|y;>BxOh$y0< zk}u2$s48x1oY-)RkoMGXueki)R}g3l*cQG*u_~w$L@BKExw7nQ)?_b1MJ<`+n^(i1 z%~2nK2-}Km52mnLgnSg#MU{D`i%mfXf7KpJD_1a;aB#XWU+@7KkvhxcMHR&4PZRy2 z4Q1vvTdEyOX0Ipq;t>JcB2XN}UtDe%06#Q!T3a-K=OP(m>w+7URvjWYaGg0Jo8Bk4 z!6?bG!9^B;78bBn5fp@0Vn`y8=r7Vr3F#NH};Z^ zl^+P!HIN;=3X&k3Ttwp0b8h<2^L}bE#%S9#;OzcT%oPa_e#?*>ddVttjdX4<}t;jhJi{f&D! wmuu~UAnWQX@RxYsP7aJT>~4J*|JQf^4$M)BwJZJuO#lD@07*qoM6N<$g4Fa{y#N3J diff --git a/clear_capped/img/cursors/color-palette.png b/clear_capped/img/cursors/color-palette.png deleted file mode 100644 index 6e6e85212b85b7ba0918570c2ebede3047596237..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5iLZjC;k_h{kHThqfC`(hFmxSO zSd?`bB$R({-*5T0gITA{|Fu6pn0eqpx>}JTL$UWimE@yNe}L98c)I$ztaD0e0sx43 BPNV<; diff --git a/clear_capped/img/cursors/dither.png b/clear_capped/img/cursors/dither.png deleted file mode 100644 index bbbe6e9d472136d68a86c783ad494315ceaf60c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmV;v0zv(WP)tN#a-ClgdGb6so4$%A$aJJ1f4o}=-@Hvs&wcm zdFvMR2fAn=>@J}h%s7h~>?A0JVah_L?Bbh2e;rmgwW3?!%j5GNAAaBW9vsAR96OiG zNiLTY+qT8FZ83AEm`6BgHqIT#u@Aj4!2JBYoyla(NF)LXnM@WmL67Jlkj-Wg(TJSV zLDNX5)8>cb3)Q(c)}sNWQYnc>qm)WTM8LB0Xqr$c7STk*%3np$C>4qbf|buxuhn>Z zr}cFhAP55dz-L$a0QkOYtjY%jb+E6LLNxG|A_xK^vE;A@Fg-mb*^7PTEeiw+r2-m_ zCIH1k5dbT10Yb4*V)5f59m|uu;l{)OUn!J2I+-S`!$!W3h@gCh@B3W3|FRW;L?U4u zh9O?X6VLO+FbpvaLp-k{UZwJjE1q~>gA<8_-TZ}Wwb~zx$8ERlngI2B9TCBG%K+4B zbe@K#D^p}mh4^de-8ZSux$G>j zkbE%vo7`*=ME6$*MxJq6Z)NF?!@|}cMtYE)xfyoXHyL{MyXXXa`=Pt9kwSj1R|CF0=Fk*Fx-qOOAWINqw kBIup*SJy{pZ}C6!6a7#o3cllY1poj507*qoM6N<$f?LBr$p8QV diff --git a/clear_capped/img/cursors/dropper.png b/clear_capped/img/cursors/dropper.png deleted file mode 100644 index 2a161faeb79a247dbd80ad204e01108ea328ecc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmV+)0^t3LP)A3!~jw>Ki$8d;SW1I!v_WiHn30@PX?`T+jM%F?tO8AtA>5R;@Y>jE&9zku-w<6S~u(nw@fs zs|pPj1T0Q2xwQWHnl)!b!@^8~HV6HOc#q*fvJ0?j-gEiY9U&gJm)kp|U%wC#nDBko zssf;r8mtKk1pfT_qx|X9C&z-aTDaz-Xy=navHgGl{=EaVaS6_pc=_^W26lFK+m61e zMKH}-!PZBBm179+>8M4}$~m-n}~nwD~SkdEwTrTh^;K zY|r-d^PP72?C}r4us90LANO%-;sZuE2eJV`+ullx^7R0j2S83nP7laH7$~j)q}hS^ hBUFr$((DWnU;xEL=rr*FUHkw5002ovPDHLkV1mZ;^XLEo diff --git a/clear_capped/img/cursors/eraser.png b/clear_capped/img/cursors/eraser.png deleted file mode 100644 index e0d4b0201b9fc3f6f6da0c9b888822eafaac8414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)1RCwB?lh2D1VHn4scXm_|RPb*o z2t2F@!9+q64R!|)wREXlm!UK;JjfC*NEabIL{LnZWuc;5?7HNoAE&4}dY4uA7Bo7F zznz)4=Y4a;*7ejgygcu`?|k0x_kG@X2q6UQh{xlQN~OTzaKP2V8xU}e%?d!m6d(ye z3FglRz)uq>7}!JxMj{c2#bV%cx!{txZUIg1etP?iiB)&*+w1;dlVT>5*#z>nEr66% zJt}oI4Xp@}uDvUL+_|^KjRAZYU~@3|*6#6Pse>@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644 index f51489460073ccd61817ab46e6f96fd5b22cfebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmV+|0@D47P)Llf6q@Q5c7xb91>@gRz2|N(4=YMnrVF2udl^ z4x%6q4(cZO2S__eCuh+iD2m-WI7o*I0ZSF6Lm{byS3wCVe#4Dg8=BDIXUsir!C>~kdT`hLf`_q+&ay zVmkmR4)rdtK?c?n+(y4)U+El}7r4qj#7_5V9SMq@23hd=S7dr0y}lmzOO<kqx>Y`N5G#KZuk(+dT&<1^7t!h^v@Ly0|+T4pN73& zpIu^ywlOnjQ8G=` z6$k%*1~6*N*xiU={`!K`?WSiklDB0lKsa*A+vO>IMiTpUo3WxhWm0sk9Q!R`<)*Es7cZe`iGfa00000NkvXXu0mjfwg>H5 diff --git a/clear_capped/img/cursors/paint-bucket.png b/clear_capped/img/cursors/paint-bucket.png deleted file mode 100644 index f82a8865a7bc0326fd56f27a869326be4a7d688b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 707 zcmV;!0zCbRP)d6{}iR@dma4U zGwNI63={10?wsg6GrMIz9=9gZKjA|+f3>GAK+D|GJH82pDTdw`PIL|}-E9ldO1tCE zh!Y}h7`H{Mc=~qbQ(FLcAgsD6T*IKskM2jy_-qNlZnsM>1c*c;%G7om9HAYZ4@|gr ze-YdHGL{@3SlraFMS}W1yBeCDwgj)70ffV0WjdWkyAqr__<>5Lf>Nmjzuyn#`-SF| zCD@#CrZM!vJ3OHFTxO9ZIYyfsjRp#Z0 zMwk*D4u?7#jpFF&2#1GEG`Byu|C}hU^-i!wvCE+^rj9RT$?eTa}EEYkR zMK{!HwbGGEfk1HjC$2x=82slTsZ=WU`uaN4eVfe&i9|y3`F!?;Cy|z1E>{~228hLC plE>q<_Zv^tYSsXk%l)sJ)*onV;!t9*YM1~3002ovPDHLkV1n&hO1S_4 diff --git a/clear_capped/img/cursors/pen.png b/clear_capped/img/cursors/pen.png deleted file mode 100644 index 0bfecd50ee9f5bc5828f0c0745aa3e0effcbe250..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 450 zcmV;z0X_bSP)Rq1}l<=psl5*5Xz9i;M}s*NP=ugs7Q#8Z;Dyx|}!`#}xw_C3!B-yaPC&0j)XcpuX@rNfq|q}N(wJOjA& z>u+z?dfJEuLePrqzy!)73pvLjxk4d6XNZt?hm_iYES{i}J5y3l?}PPNYDBR7oPc~6 zL^d)Bi4Q2L3pnp!nFxN9c2E+=@XAl&+;2m6a~kZj1r3Mz3C=hmUG<{+vWR@t4q?fJ zhFc(ozZD#Mx`^Q~g1v=K6!QnfuqyD4>U4EjF0eamL}Jx| z%&`kR-H+3GBYr*Qx}frLU4`%n9(`uSomzw)t%%NagXkA*R5Mbv9VLDp1wMo$cOMa~ s3Wm%r7^bwK$2$}-<~D8p`#1iScU4^XCLAA~0ssI207*qoM6N<$g3sK(Qvd(} diff --git a/clear_capped/img/cursors/rectangle.png b/clear_capped/img/cursors/rectangle.png deleted file mode 100644 index d28dc6b1a4420e67d2ad201e77fa6ffdff47b0f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 660 zcmV;F0&D$=P)-HHgciWXH=58>$m+)aUP_=fNurq~c9Jfr+{g4OA6VysNJCVr!>1 zyO(ukr-@eVVQOd_eeEr`d;&*7#Zd36d)>ub=%lXvJGs$=On&Pn97vP9zKEPnrBRKfD#EKdHd|_ZeufOm#a)m@NAF&m3;5bVE$Q(zLZS1JKPk-x02D-XgTe_RX z#5m7GmzbE!!E}bj^$Yyl#_Q*HW-gz-5F#kVUOZxW=<7_hAg}KDjh>#B%CwB&uQ)_iwz;@6pmo1X^%*Tz443SFZSDVxCn00004Tx04R}-Ro!pfR1`mnZ(O7nKcKOW4i$^9Ra0BJ8yc;~21%2p=|UR0&DbiW z$#rfTQ`a`O(`{9s_5yDV_yd5l2Of}kLK+Oj_Ok5(v`JGz71bo9J#^YYXp{DWs&KBa zQ@dTpxRI}aIp=pi@6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=>oYa}DSa+!VwuBKD4m-EU6$iFm*1_LKbqA8zPB9^elD00000NkvXXu0mjf Dw^|VR diff --git a/clear_capped/img/cursors/vertical-mirror-pen.png b/clear_capped/img/cursors/vertical-mirror-pen.png deleted file mode 100644 index cf2157d808d6e2257a792a2dd3ad1e9ddefb5c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)jk3mRNaU93L|Nr(jY_l2UJ2)^m2h&zGb`XMg zDG%YGIu%`lP6k02aaJTkr<6_=i5PSVBzH!ryt+X@B3p!g#Ey)Ei#$Rp3GGR`)+Vx0=LtWG3FRvd~t;w1x~2bX{xDD zIyb1s54n$O0|^-U1#m;@CB_&k^FMyd_vlEt9k%rb9^W!}U2_VC)MM}EvLW53y5VQh(i7O!z~?9K{_&3T z`VQID09AU7GE8h5L9D!+N6XDAR^&(F{`e}3!=iw#}5u#Tg^3nctWfs1Hmk-X; z@nk1*BVEXSn1Q$P6pH#9I{Ky=04#pn0Out=QOHWa{k|wd@iVZLapdxv4FI{kwqq&d z2*s1|`=Tghr43%vpBBDiZb{#{d~3)%`l!=Pghh8- pYX~H4&6M=-*DnmnOBDeTVHZOpxosdUl1cyo002ovPDHLkV1ipX1AhPj diff --git a/clear_capped/img/cursors/wand.png b/clear_capped/img/cursors/wand.png deleted file mode 100644 index 44ccbf812879c42cb1f9587d865bcfc337ce6361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)hUn2-Navsqo?5A8 zh}}V^=%7@_%C;=H{tGpIj5CMu*>5J=i;m^t2QTySd)}9aAppozC}++wDz`eOViU-dbRRoz=JsVlZk>N%^azhi%=xTCt9`LQjtqNFW~e|R=r9= z`@I3J^#z@aD5yBuq2DLQO#|4uFW6R5kzPZ+h&6Af&5}POarL&lA~3t5R1i7uh*ffDw@qEs=HBW ze?CI~MkvG6H-MF7r{Yv4kw_q&PNP^XqFgTHXlH@RpLO}3aV{T{Ez=8lo;PHV$Ads1 zfOtF(s5%5V>3qE|&{lueV1Y1j%GF zXt&#NI-LlGLPN>_18TJzN~Mxf*f6pY5Dteo^|P&3>(H{!KTr&_wGRQWb^rhX07*qo IM6N<$g7V1&P5=M^ diff --git a/clear_capped/img/favicon.png b/clear_capped/img/favicon.png deleted file mode 100644 index f85de46de273c6d0058ee69464c5bad1641e8ae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr}70DGLM)n!cRA^7ns# z&bi5IZf+M_oHdfxi{CK(w7YC!N9~>1V-_(y3shtdCLZ|Iz^YpCPvcKwO5E8VrElh6 z^p%5!g}ZL--&H@sL57VjK&B(!R5F06{kIkK<2u$5!{h8cJ+_ZlB&q64Dl}T~0F4n~ YJSEp6=*p+T3v>g6r>mdKI;Vst0Kqpr-~a#s diff --git a/clear_capped/img/icons.png b/clear_capped/img/icons.png deleted file mode 100644 index c6e3bef2ed319ae53eee8f83d098f8a2eaf4938e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11499 zcma)ic|4Tg`!`v$8-uY6V-J&UvL^eI-I$PNCS^C%f+BtFW(=}RqAX?4$WE3qOHrbb zEX7R9N5T}Dke>1RE#Kew_x$lZ|I9tFbME_nz0Y;dx!%`(og3roY|GCh$-~0J!f$V9 z<<7#w%Fg`1&&|pF#r3USVPR23+FMz8#<8vsAMc;ON`M~j?k-eE@8`w83-(;pqH%|?xm5U#rwE^{EEsFC;i_e-|v;kWd)(SroO)2cX^{0Q}_u=J@ z1>fC@_}4wV3ke@KRdbLQLhR;tyvYxitlVl0Na%GgHD*hAExUzKQxSmOq7~*K#6Ij3 zY9TZgPv0#xG{sgu3qAp6xa@N$^INKX%%U;$y$bW=&$Ws>6I{#FQzqa+;aQV$))HmlcM8GAmo-n~K9>`tB-Jk(8R7hHlpTW`?b|wu?&S>dD zG3&_>Gm6cZjHt@%8gAG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T;|0#z(6oRc4;wsnVmB?H-;jx5`>iK6uAz$fQ5L?~ZC6;hK|o?_a@i?1MkgGSnE} ze%0}>m!jO%5|d#EQWZ8r{Bh?^#ar36mo3V_5!cDh@Wy@tgg^z6zckr_6tgV1Ra56# zDaLPfUM1>e#qc?Js<6WkG1(!@5Cc>bIm{EmW0oGEm=Qp$Q`Ewp@xB;&j{o;{@9bv1F69a?=Y5wsHe@jAd4-hLs3gyG>~+Vyo&d z*Z{5F`f#e)su&43p!K)5@Ba46ykb>iqI=#NGme^u26{^N3fQXepw3TawFMma=n%fQ zf6{}bKffQ`wsn;I-m8ioRnUNE2Ek9zVvq#c-+xbEEHu~+$_YHdH0miPF*Q2Yy;$06 zds|B6=kx9h4KSc}aDjDNKO`u(-w$xDP5|@&abe!*40`vbW_8^7u6ch4m(yEr+qAXP8FD1G)j8!4coi=Hly zAs(G?uWj@_93asC@xJ9rk%hWwfg!` zs};xWruAjr@qB$^t+|fKI=1OQwZ1m#6=@&zWxL^87bmkY?9c1e^n@a(<;v3CEBkWl zf+V%C*iL?Z;Yo|$!hfCn+kb73ajI2Q`+i$I<3M1p{OO4)ul`-}$xGIma+6Ec%#CNo4FVJ%gp00i_>zopr0JZOiV*mgE diff --git a/clear_capped/img/icons/common/common-keyboard-gold@2x.png b/clear_capped/img/icons/common/common-keyboard-gold@2x.png deleted file mode 100644 index c647658deb76b7f78bc445357551116b89a9df80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmeAS@N?(olHy`uVBq!ia0vp^9zd+c!3HD+F3O4lDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?+dW+z zLoyoQ&a%y73KVGAUujr-;8>K4S;BKhouH*31fr^#6fGOnJtX-j9B(Is9FAb?i=Z zd|!0FEq%cx|0%7Beha)~-9IR2Xg_D&amsSXq77;nmaS91$eH?p_r7K3Gl#`3mz;%) zu4yo@lMH$+{7rvlu}h0&XjqBBuQz^ytV_d{E+oY_8a)V;FYYi=4_Wz<(Z)znKKYN2)pKO_6 zd9t(6kxlQ!0anQ!3e7#~cBQ}LrB+@)S3aSU+o-^iO>$;Qms9$_{|0)k?-iKEQyw(& z#DJte_*nI(U)p~dtnL5#CI6+)FX?UtYXKYf<9cz^;q}iy#MW&~cKf=-P_*;Qt=3eA zW1YuD=L)xl=))2kKNyLZ&rX?|zHLDmp!vprRu_X?jmC=0x7auAPrE*sbwA^bw< zWzz36*GpX%oV|8ysqz1n1+9OrGCw$d>T&v{FBZ2mjcta7J20LZJYD@<);T3K0RRMR B=Dq*` diff --git a/clear_capped/img/icons/common/common-swapcolors-arrow-grey.png b/clear_capped/img/icons/common/common-swapcolors-arrow-grey.png deleted file mode 100644 index e80406a694e03977741bc1ef8a1dca64f4d4a550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)Oj6hRcne=~D)>d|gq(~u3R8a6NgahGr9(N#qvCKXT_l`}t$Zr1dVBY`D z{CIC*232JiX_{_`$a2}M8b(zC5Rp|?-2uMD7+1U9?hk6n0!*jVldAe0I0l?`&ONCE znS-({8vv(E{>?N^*Xw}Hcs#yijCs7E_AAfx3!P5qT@_FR*tXVQj4@sZE&*6;pBZDe zVvOIbcGU3RzXcGH^Qw9qKvmmGlI&K6KygQfUYFL(bs+mdlgVTc$cl7jG#VX05~$bf z{QN(&_QTpVZyV`2C zK2!o7fSys+kHFIyuUH#=s47K@(dj5)DksH!!_+>;HeY5>0N^j23_ZLL-d!vvD-*5SRsRYZQy$u3!I z=ZCp?p8oS4YPZ{e<^@H>mJI_rKr=Hl0a(lWs=75mfQrcZ9Di2`VRkEkNYnIep0BF+ zmWxvWWQ_SD&li#V%Eiff%iz*B(rUFDKqXW9J5AF))6>(9vVd~$(D?Xx44lp>U1^Lt zSr$wo5P*ohTu?gZz28?7PccvwMV|rR=ajAh78{MmRsAlKB*|QoBv)?=2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o$h^b<}1kq(ck$QWzMkdb_O7cc?bFAG*8M`O`?p_Z_@K)(?~(Vi zU+W)mHdxfSW}mj=I5204dHMNMu_64ytHdW|tL+V2t1{oxZF_pnuCV37t4w724jejV zBF+5dO2WZ=X)of==uIt{%5?otXZizj%F1+q%ckcUQzopr06C?B6951J diff --git a/clear_capped/img/icons/frame/frame-dragndrop-white@2x.png b/clear_capped/img/icons/frame/frame-dragndrop-white@2x.png deleted file mode 100644 index c1011816c69f85ba04f296cb9828b6944a0c3d38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4JCOfpuKeW$?tgAG z9(F3ud#tFm=2?pLaVd7~_T_u-a@`kPQj^wF;j$RWA20NAUIQXN=MC-^ z#{Rh{|ID(lGU(ZKMLBn>>D4bEPaHHzt8giBU*EFi&vLFcGIb0)_U))+eeK=Qbky1J zvvxQ8c^T&0QF@=d5A5%;M}N;tzn%|_ OMg~t;KbLh*2~7aSjymg=bFoy|KI!2Hmu;V(1+(!OYZFX zX`uZp=jgZDkN;V)F27tXlD6Z#eZu|Qv){kixAo<6p5_vnT}+l6nU)D3dEe(8te_rt zprmR3o(E=yFF8+iiW=0;`MTCTLdn5zO~Xs3S&5wtAhp~XZK_O9j&RM;TOc`&V}h`D z!mfri3`G?=9OsrT&(VIcQPE=dyiIExj<-E{^Wf#qKkfRD!`p9vV(^p-OUQh9auU$@ N44$rjF6*2UngE!ZpI-m~ diff --git a/clear_capped/img/icons/frame/frame-duplicate-white@2x.png b/clear_capped/img/icons/frame/frame-duplicate-white@2x.png deleted file mode 100644 index d6c28c6e9ef509c8646c292ebece155690fc0baf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85pG3fiPoFZ1E4Epj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9i zsh**M!Iz?i3=B-{o-U3d8P0F71^Ve2^0)+wot3(IZO^J_St%yAg~!+HE}5Vl*;Eqh z^Y2H6ja+?}AAk6~r*GNU=h;`3{yw<+Hhb5ss-eK{%$v-%z`}68A z?0X(uerf*rbLzSyn!%MoEkC{-`S_tuX}X2na-XM}A^m#xa((>|UV!YHdFt{CyWM}P z9%Q^_mv(3G(_1*H$OJ69uf)=>V2aW_D0g1j&yoij9T}%CTBK_EFaEXd^mAtSd_iwZ zDX^J$|NgS8bUiY2`~Nu-8>cKTJQXs}?WqnXH-~Xzi-zopr0AI5yQvd(} diff --git a/clear_capped/img/icons/frame/frame-plus-white.png b/clear_capped/img/icons/frame/frame-plus-white.png deleted file mode 100644 index 5227e9cfd8fd7274377d3a8a7642f9d89290ce82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$AY=VKT^vI^ zI+OqW|8LK1%OD(^Be}Ih=z!CrsxMOxd#pM3P`qTZ*hJofrB+F&RbyTm1U>%1y^FD5 xImWVXONzwSjv|MwT9*gZZ&m>{5qh~44$rjF6*2UngAI|Lq`Ar diff --git a/clear_capped/img/icons/frame/frame-plus-white@2x.png b/clear_capped/img/icons/frame/frame-plus-white@2x.png deleted file mode 100644 index 090f9a6a1023d7a032b15ffe2ddcdff0064fca55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkg1|*MGNWTVBEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4mdKI;Vst09iF%L;wH) diff --git a/clear_capped/img/icons/frame/frame-recyclebin-white.png b/clear_capped/img/icons/frame/frame-recyclebin-white.png deleted file mode 100644 index 98a6e4ea60d7f9089be1617d33c3585cdce60d93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0v}JY5_^ zJUZV_HRL;Fz~dS(AT&22v9-~;fZ6Zn;stRH&ISi=t&2UIq|ei-92MlE6S?t`yuE7R z90jE*8$t!MSpTzD%w1^9DE`%W!}XtXI~c>i?p{5sV@Zv&(%K(uubN)mC08(=(e!mt z>ETP#CpbDTAJ;s%H~9IrXHC)y88Y`CrSW}O@Yrn8#ybKRQ<`(dySAP=`rl79=HPzjI>yQM3?Xv0$7TWj!QkoY K=d#Wzp$Pz|*?E@$ diff --git a/clear_capped/img/icons/frame/frame-recyclebin-white@2x.png b/clear_capped/img/icons/frame/frame-recyclebin-white@2x.png deleted file mode 100644 index 1ed1955f5d2c83deee2916b2f92a78456ce32d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4ZMV|lm0nGxYoNZ?+81)*tA9$`@XQ;@s zcB7z^1Y2!e>Nc;rQL=Vy=Nd(OH*nT4r5~7T;^F*5UZVDlX1H#BNM) zJ99#|K!MZaXQ=Jp9T-vME zZM585Q+SVmzgFy;Q7?CF?uAzyUdi2UZ9U>2tebeXe^QLK%=(9GtYyTPZ~b^8>c;XC zZ>!4>-?VP^=YRZ2Y-SCU#as6uTV6+&TO6%ldv47`9ph^CH|gG>VA`>vH0FktUXCm{ b^q#XfdTJ&pAE`PAj7SDgS3j3^P6!lvI6;>1s;*b3=C|qL736UaGn=XP^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs% zRL{`B;7id$psG2ZE{-7<{%a>jbF~`qxNP=}-@TK&$Ud^i$!ANF)bfsxbut;tCNnQp zQL1NblT4TaBi<=q_MfP>F}`7;-j>uA>kkyPXYTWi>z<*Ox|U_VtIy&lRkt_duNpD~ z79Dx^dgi|OJKDCTXnjA|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0TsRRba4!c zXnlKaFYh4(0f&drIXWkqZemnbO%`0{)H8weghW7)tZU1mc#HTq7J7fOynjB4d1E1{ zxO~-8#`&TX!Wc85#5J$ji#ypYeCnKZ&uxmizc5PbfyKn+bML3By8JvJpfn|Sh46x9 zHL2+(8sEY&ddL6N6qE~1BvtcMu5|S4Vm@3S6;ACsI zp2UlGD`}n|cT-OqENGsT^uS)jlI@sdcLIYP-@iEC1rvfmLCWCi>gTe~DWM4f1lEL? diff --git a/clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white.png b/clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white.png deleted file mode 100644 index 4afa0e5d8bbf29d3b1c28e3fce647ffec67ef402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|mSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsNk`>*-%l@ftLXG(>jm*H7rISl6^=FnarMNs(JjGwzwx}b((zc;Y z&^qgQ6Uz-Z2gVb7C#+Xkuee-c=Zv2mksc5JHE3;->d@!f$foNMB#=H;XN9!o!t6_i kn>jTXmYm6PW4OuqJ7D%@AG>8wfz~s4y85}Sb4q9e0Q~<@p#T5? diff --git a/clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png b/clear_capped/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png deleted file mode 100644 index 6ffe2bf1127f2d2fa76e4934bb2c8cbf451c1c9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0Tn&+ba4!c zXnlLlR;bB9pzWc!w0FOA=F6=gLi*f4m_#D;_DUDF(rCAF?#4a#sZ1^-OC9?TXzlefb1 zo$*xeSB=&MIth%Q9OBQcoWQ!Fc~!yzwpDG7CK~LUPr1c2Jx!Q*KypW$tMTUr(@mtF zpZT$~F3+!(J(=Y*zbMn%#+i%mEHE|PuOYsI<=ED;)`>3anP)6+i9ZmuyTx5PNoW7e wP=kcuB_W3$q(VfQPcL{SF@rs~iLrutW5<(_td|RPfxcz%boFyt=akR{0HvLVy8r+H diff --git a/clear_capped/img/icons/settings/settings-export-white.png b/clear_capped/img/icons/settings/settings-export-white.png deleted file mode 100644 index 45d76e67541af98c32b39533dd8b50fd76297978..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcmV-T0 z1)1Ot#)FWI2N(hr0Re(g+{6x|EiB`6hFz?QVO%oSxIaHAI9evb1OcTWayL zsm05t7B8F1iZ5%-S=1e>k@w@j&Ui|020Ws5hAW%#THJsT7y?nU46TkLB1I!bXKv95 zMNMcLuc7fgo=zxg&Ni?H+~mv|0y~QBcfhVmJfGqNU=P>=-ZJJyz^Y>VClHv#^Ht*; zKo@8MS2^?U4Yz0Gsm3p6YPL7;8uuX{h{(r`$g7C7a^#015+%z}%;I?yKUF7D1{%k< zzKXdvXA^iJu5lFye><9*}WoL#b|A#T*x)cSrh+;Kd0w;5%kDw#k;o|6%{mWqpb zTSGdfCnEi+_5LEo2L|HrA~Km;pNL4uMclSI*MUdk=Cox5Yy)GBc)zf1&J*0E0XBhi z+nsGP9sp1LJX^RhCeHdOC!P|Uj344h8ej#u#^SZmRJ;isn+7SM100#|WLhdc;>TCt zM8q}!!kkLw%tA_s0Jt>S!RL#FFSO#Bd{_BX|G8B5^Mp>u%PJ8gDx2|IyliUmvZ=+( brn2H+%ZY1lxC17*00000NkvXXu0mjfQ4{=F diff --git a/clear_capped/img/icons/settings/settings-export-white@2x.png b/clear_capped/img/icons/settings/settings-export-white@2x.png deleted file mode 100644 index 5c9f5d941a2967dc3068a88df3e3a131c3f07fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfdb&7< zRLprh$1q#OQKD_W#754T^yJ5h;w&3ETUr{zuCbkq@=z2C@L2v|VK3vsW4Hb=Su4&E z$vmRg8>75rBli-|iJND{TIg-xzInIt`*V5w*!yDg($n9|+3lNKoFOT2kvmvxSmi`>#pxq6N1tX|w#qg(Zd z>wkXdubA^Ut5O-}q@E9N?4I@c`?5o)oBH%!8#Cl9CfI&smQm-(4g0~F z_gA*bIcDkeoJUPQ|KikktiN4%ZN_f#*B`VTk5AvT^$v60!&@gz(hmebSoLVn-VDuD z!+m^}**_2X-b`6v+f#7IYfIom=Q}4iy}EU~{r!RBn5pL-mXTAOW;!m!6cbS_E z`Wn-Gx4q@oy%)J)-3K*Cb(Q?a^YfCeV;}l9`FVU&T`aToLu!n*XCvc>mA%Z`t?gV^ z3o}%|X;)XASRmY0d@8wKz50jM%ad(lN&CGjdVpf)JG>c%M08U<_5eAq8}}FMs-|7w zJgW6>l0!*Scm>em?Tc>QU&-aK`r?N|=U>CtG9SuD7DX-~oT*(JT)G5+@F z>)!i#dsb@h=vc9F|J&OtyByNB?#yuR+3&J1_doM$p)gQ_ln~ZabK!q~dzFe7jDM^J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p0st*M( z;GbIj!=+cw&ca;Dd0pwH;}^28O!w`n)ZO?-MDcmz_oC?q>s_zBc*yT*ZEn;h_n|aX ziMK>^_Ht*7oRBRmLvJ0{57d)(dVg`5n>2Sz^*!UIhq7}o-Cr$od{J+=>QwL6^P<<} z7wn$1?)I^n&y;otYwcO_F?Ua%-lqIp5~~Z;CkH(|zbZwr?C+M9SKTh!PUotRil}#Z zb*bKdi(%Nq)2(0GV^)BSTJ&>r@K2X{!vu?7Qw9~q*O$XED=55~pSG)B4lIcljLbBc+;-{?cn|6BT-*$Df9ZCTC7=%OlT@|osUvdna?49rrg9L0gvbk_8*f!S#A)u zJ+#xw^yRGNA3O!~zny5C@VeINomR%z56LY@+rAaWcIzbyhW%w(8^%9>`QA;6PwdtU zMtJ|=T)Jc0iaX8wLrmvf+Z*z=Z%^=gfw;GqmCV0!dA+}%{q4Z~hVahRc!6nG!&h3X zM)w*%Pm^0-q?`6?&`N-mkviQqw^|P4&B=7gL%asV?6G6@U cxQYb+dofE|EEZ>30?Rc9Pgg&ebxsLQ0P>`18UO$Q diff --git a/clear_capped/img/icons/settings/settings-open-folder-white.png b/clear_capped/img/icons/settings/settings-open-folder-white.png deleted file mode 100644 index fd68fbf4aeacc965d7e60a846237e96eeaf85e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)< zXqv`aWZl0OsHGS0nqItXdhxF5#k-~#@0y7C4KyR#0?tg#ZW#uFL)I*IEi*oc-FP=9 zrx4@VDqC=V4D+OjtoS@OPU!j#uHs}i7!iMiZ52`(w&QIk5ZNl_>+6}FT# zY{&*$KH@OmSLRnt?ag`7P{$x)(cJ?o0;F|&CB1mp^x|F9i+4>g-Zg7h Z{1;aL1`c3Bh9v+1002ovPDHLkV1j5l0?+^e diff --git a/clear_capped/img/icons/settings/settings-open-folder-white@2x.png b/clear_capped/img/icons/settings/settings-open-folder-white@2x.png deleted file mode 100644 index 0a1fb21d2b647eb8b36fd53e4ca9f36b4ad0f33b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1008 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Radb&7< zRLprhdv~@-ph)}v-momi8!9V)upeTMLGaDmKf)p*U-$z=j=0w(D20j5 zx)E_iyzPgAtJJ|C4hNMC*-Rq4ZyqQzZoO&y+}!%+=YtyxrrAFK^!BcCar(QkRadnd z`}!8KU&w1IFjS23;Sd)-bd+RfPwNNY1KJC29WZ2_V=tG9|##C4SL$kw#?(xd#R|(vUm}8>e z7|NEc*<^n}_W_T=I*km)KkOThCFr;sal8o>*_5FRl!)ob^Id7?MAyzCkyw@bU7ti zXRKb-3b%ZLp=QGSx+bEYXw>UQ2=N9J=?)S{kCPm!zn?H}gzzMcjSuXlu!XKi(~y{=xFo^iPx6x3FjGB2{}0~>^UkSnQ+{@~ey=~XL2TZ+o~Z}w z9!uSuq4zXcr{({ey?u=9Cx5?Hr#U}K@lW8}Qcazw_aE%hK9dxGDm8)o=CN;8yBhAY z{hYc3=(>#pcFzAw%Ot0N+P=5D;-2oEhcj+B|F+P18f??LzvN7=uc*aZjVGFalp>=m z-$fj5dVj#vWp|bCzYtNKrm$c0)1n2)NVxFy{+~feaqHZ$E4BK-+{xhS>gTe~DWM4f Dtwy;* diff --git a/clear_capped/img/icons/settings/settings-resize-white.png b/clear_capped/img/icons/settings/settings-resize-white.png deleted file mode 100644 index f85cae210bed031acf4d27d3c58de6fe1c6bd5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsz5uAFIl=c zM=_{N|E1Uc2Hg*wbMHKzEnKqc^i){J@Wj( z+SMh{OHn(9VSP+cE90Myk8i@9$px~$o|6$Z`W66E_5at guLDbK>75midTQ~u;rn8FV5l*8y85}Sb4q9e0C)$SkN^Mx diff --git a/clear_capped/img/icons/settings/settings-resize-white@2x.png b/clear_capped/img/icons/settings/settings-resize-white@2x.png deleted file mode 100644 index 2db490a83afeae7ae146523de79d4930daf46dea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Rkdb&7< zRLpsM=b)c(pp4tc;G~XEetA9-lCctH8rC;HtJpLYY73bQ$RFJCHP>W9z-cC_lPb%^ zXIhrOd-_{7Ho)ui^Cx9$bK@e`glQkz99rG5T~+`Vl7Osy z=J>|xTiI_eX@BtgMt(Mb(4wyoe2=zmYo2~=-c_@{Fd!Yr)PCkg%B`di?MLph+cBV*;%{0-fYKz^ABu0 zE~xKXzWsss1LhA;@#49WMX? diff --git a/clear_capped/img/icons/settings/settings-save-white.png b/clear_capped/img/icons/settings/settings-save-white.png deleted file mode 100644 index bf131536531bda7c7f0470e4c065893ed22ce2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs`KDmFpr(Y2NxriyuI)sA>po(X$&%O_*PeQk~wwDW95NAzaPkJ1go_tx*8 zR>)Q$E-4WBHlir;&iCw?&0AN$n>=q0JHvUWHEmB1mau%#IC6@cyyNVS=t94hGx86Z-bu4LvX-+j+v$$f_DA|n XUyr@l_YPPH3lpinR(g8$%zH2dih1^v)|cBF)%Q3db&7< zRLpsMd$;f51PQl?<`1oySfdRXr8h9?9NX4gG(pmt5ktYj-vOVXm_4 zV7<27-3O<;+{}Mu9bF_{vsdY&I_tW5cfT^W+wlGGUUz%@Bw@bQ4}CVTj#KY{)B<+Y znzq^>EB>84!Pzb;lU6X}U?LlgVLIo>ANR>mY)?<$toqq}yV!J{n*PP=e@st?PMW-i zZ_{g|vo#rflVsE^y^8MWxxYQnckBMm?CF`+_b;nl_q^9-_n7qyyMVZ-+^@KY_OWU^ z?-o?Aujftqa9rhi?fNzBlU4jZ&zar1CtWnXh<{zSxbGzEtkfsn&rVOf?Y%#HM`qA` z?)AU9Eg#-);^*Y{dv`edKabGOJpY;mko&?eulzf~T~k6G$Z82UY+P#j5FE6tGv(g} zcKr%R5mf&EaPcm_8d-IO|H2+=q>7~X#6qfiW694Azf1(BHwI5vKbLh*2~7aI C$`oY) diff --git a/clear_capped/img/icons/tools/tool-circle.png b/clear_capped/img/icons/tools/tool-circle.png deleted file mode 100644 index 52a148117d2e6d3539e188964f673be54c2cad73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs_t0F1Mkez$nzE1{%lA4nP7(L z40a6qccCU1m{i+{4ik<~p z2lGyy7}@FXDVDV-<72n(lt7Km;U76qZk4ioX%|wnh)3(P_UY|6r%Fv#xh!@mZ^@}e zo20M*%5%8BYaPRsga0}9PdT+J&0Hzu&&|zw;(FR$@+SKpWyfyjla0An^?Z$ekKZ3Q zhgXr&?yJ^hl^Gw~#MsDu_tRa8CyJ+g=TzHV>-*%o$cpXztFZQyr;Fqtsr5WtQ)GY? e5@!>R)-$a8khok-LqZrBISihzelF{r5}E*ATFI~g diff --git a/clear_capped/img/icons/tools/tool-circle@2x.png b/clear_capped/img/icons/tools/tool-circle@2x.png deleted file mode 100644 index 524de8b17324dd51c8778868d8a68051f73656c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1079 zcmeAS@N?(olHy`uVBq!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TjQT Snl&(!GkCiCxvX58kTe=sUpejzX#xYECKJ-=K>fqspA^GLi6mI z)Uv(CXC*Bw-jbY?RE%BOVs~eNuRu2oF}gk$x4upIVhFVxf&Tz{I{_|WEri@_aQ?zy0R5c+52BxF-2S!$_yzy_M(?nVegH~95x5WGw*q+M;R0QoE7O=w zAeT106}lHV@aNt__;Q-?xab!jTH9?l((HH?`Y?bV56qR4qW=RPg|0L~w>@m3`)s1y zfk&aMHqq_C_gkQkY@?IH2Z2xEoBFNH89FI^-p8GW(8sROknA8a?clHu^<~L3{T^l(tzSw`1G!poHC-0QLF6ri<`WYG1>xsOisyyti zyd~ib8%&apcSO4OCM$!xP6l_K4DLD^+;zGZ{sYvY(VX#aLHYmy002ovPDHLkV1nQz B_+$V8 diff --git a/clear_capped/img/icons/tools/tool-colorpicker@2x.png b/clear_capped/img/icons/tools/tool-colorpicker@2x.png deleted file mode 100644 index bebff88b40f870c967a8334b60dddcc1d484f070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Ry_jGX# zshIQj_T6sYLWu((-@m&Rs&mop)ak05F#_V%&r?8V`>50_?aY?B#AU%)!j|)y=LYK?k0J$Ei$nYj*Ex={%`o0|_n8X&3Xz-!%>xr>9RIX@Pjmla+1|qK6I*gV@$3_-V76iU)lhc+_wNR0!T;YZ z66&5zWStWJLGFQ8{lx2x%tyNSSv;z1d@8s{bjO+h|IPK)Z5}IhEr>j&H)wEkz>8N!7F0mNC8%$Zs)+dhV$~G$0{b_M4=5B!l;69pZ~rB8$N#!X`plP|_g?nM zziB3`Wc0*%?UYZm<3grw5qx|^PgmIWNpjf5%WXZ40=6{t3?DikxU3<>R z!2P&ky0X$-rB7=P)up>E@zt7N{Ze>h*xC2f&DOD%oqk~k^!%zfd+P)xSO1m0%+|+T zJ&pg{O`|uTmb$xK>;5!xuIY!W4fER$_|xB7|JA?y2 z+q~9ixZN<{u+Lvt_e1KA*PToEJwEql@28t~9M#qzl%IWExwN#ZZ13~0tXv(uRS%?X z*7yI+dEQ<-k?jE6T+LLych61)=@(q?{NB8~AUtaq(6~p>-rPxUJ}0>E(C1zA>o9@n5ppFah4}n zuRXt|p3#rFI>RByqt0ulSLqwYJHZ*X2TC7gA4>Mxy5yj?>{8_ews-g!GTzy2vUAts zE%PSL3%b>)>mdDscSnEqx}fiI6L_X>zdf}$KJ5LTtQ(}{B_y?V%sb+L^YBNU3j>xH N44$rjF6*2UngC*-9Krwq diff --git a/clear_capped/img/icons/tools/tool-colorswap.png b/clear_capped/img/icons/tools/tool-colorswap.png deleted file mode 100644 index 778a53d32d1e5959ad47f769c1cd9aa5bc0c31b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 zcmV-11Ou7$aV8j1ez4#)y|2r;LKl ziIOgqbg`r=NxhQxN$QmJcc}&`74cgn-6SJhr_3|iC+QKVy^i4kVb*^*wA zG}rG3CGC>*gUrhlBqb%)d*6V=l2%A+lQdM+$UrgeEZ`Mj5JMlZ2B^*P%sD_a@G&WD z2WA(;p%~KBfZu)KUSJh)c7Zmo2Yz)M{{Xj*Ht|Wo*FNCxA_zy@6rjy*9S5!%E#e7a zy$`exsL9Z02Cxix9$OOM0q+1yfeBgcu5z14fril_9tP+F&X4IP1Fb+m*>M_<*;!Eu-5w?0~W{hvw#6?)@GD~_)IM99VLAlCj&d2$a?o$KK54l%nSgF zV!E(o-YNz0W;eDrCJ$@=Glp-x3M@Wn+Q0%@{Mm1@O&{ddz#%LzjF@er_w)kr#5(%q6;Bps48HPW|T(h*6Q%W9dzkjLBgxo4s^ zMU%^(i^wXl^nCdcH#bPwT zHqx`|RNxCN<8A>S2d>3x`Kawc{vhxya2rNRlaRDpcXg9-4TVZSY8Q=oob?mT_%wcbQ?0yO9XfGAG|f>dP~FvRc!%YUtqFImSVEs?Za(&@5qB=a-$tCW}(~m~vAp~cw%Zni{ENZO8>XLvSY~!s4ZU=rj z0r_mCgKj^tq141ftHKV+dr3z>cGk>BJ{RfGJ|Vq`D=G14s{`%;?!pceOR-~LARp?H zX-*2@ksS8gu!J<~#Iv3r&62cL(hEuzU`3%^ n#7mBo_8*Bc;^oE|@p9u|oq8rcI!Uu!00000NkvXXu0mjfnPX^{ diff --git a/clear_capped/img/icons/tools/tool-colorswap@2x.png b/clear_capped/img/icons/tools/tool-colorswap@2x.png deleted file mode 100644 index 91a9586018d4fe879de54bc2aa89641ca3a60aa1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2844 zcmaKuc{me}AIB%x<_zDQiD4v*qWI=W=GxIlQm$yqlyk8)$I8`0xi?XW)M})RC0{ok zaz-|VgehUjk$Yl4zu)uw^Y{Ed&-4DgpU?4p{`@?zJI)wKX$e&c001D3fZMt3`h|ZB zD7Kq_EU?{oO@shLxB_?M2GB2gw+3Bp42cJ~)_>C_2tm@kG(2=(q^2ziNyM#N%m#Fhji4){QdEFh+cJsuG!8UH4v z+SjGfP<)FGoy&3&eWfvD;!9bu71= zb8DKAk+Ikq7{f`i ztV}H;sJ_?i$TmO^p0H)xkJf&s>LQ~X?(kWC&o2H3%q~?02lT1W2-hP)RA;lrH` z(KMHGeCEo1x}%l{gaDGFR+Z5~)V18IDCDM@j=COiZNEh#yzU&k?IA&M?-+(1bOM(G zo?s@0ba-1LcfLd^VR4-!n?_uV7Lw?~r_z>(`qx7MhKHPc*ZLO{r;@%O)ET;bR6t2- zNPCYNoS1l`@VD^v0R8Zm(7JBFq^aE0JwX_(76guzKy36{32SJR->RfEatfR`vMDLSyl=Bw#C5$V>i9MVbbG`5lNTIbd+X~j3Lk0N;Vj) z#f^Br)^lYvjjQ~VJvWYZQU6>W6G{Sh&}>Wew$a$xRAbwcBCqn`&pFQOo^vWBQetQ< z_k@!mEN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Gs2GJk@~{#+OTpAWqm(_)LMHN+w{hkv)H;|^AnNnx&d$c4eR$N;OU zxR5DktM2Dx5iNFsW{zOE5t0ODMAa3ARDCoCWh_u<<$)1>w{cZI2~o0bm&*!29${oN zhoQVQ>fzw!pXE)Mz^V}zDC6f zx>1`?oTt+EP1Tg&Qh}K(zJvA4yEjZR1?$H-&4s#V6rHRXiPyt|j==%wB_eJ6yIanU zqtAbQTQ?X-&~MqVDY;lX64_rFIS!YG{L!0)XufS0IINT|Ng(EQj6NnmYpoXR4DVL^ z@XW5p?_&J@m;C-8SNxdF?sFvb>%*0$a)u8SW=yEn$?0yLE~C-*j%N06$;bH;W9-Ud*o1!ph5399 diff --git a/clear_capped/img/icons/tools/tool-dithering.png b/clear_capped/img/icons/tools/tool-dithering.png deleted file mode 100644 index 00180e693e4c9362df6826b1449a2cd341b77434..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs@(YFp9fMD-I|7=qQ0*>Q?k81TD1?Px9u{|^1c6l WbEhxvJaQLkJAlpinR(g8$%zH2dih1^v)|cBF)%Q)dAc}; zRLpsM>mui210IKi%ToSNy(=o!5y!Jr`oN6#eJy=kueG21{*r%B?*qew$xX*u`Z?u< zZPY4!KFq)=Ft<5B-j?0Mth&C16T5P=o!&Qd%{Lu=ceDk&iN(`}j2~jR@XpdZ-~Yw? uV0XdBld-2lFPAI73%cil$AxHqsA~-1K5X9fb_p=p7(8A5T-G@yGywp!hnklF diff --git a/clear_capped/img/icons/tools/tool-eraser.png b/clear_capped/img/icons/tools/tool-eraser.png deleted file mode 100644 index 263a9c0435d1f8000dc4bfbde45615b7dda3ead0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs*TI%VyeH8!ywdpnl4Zr_mbn3ZGox}>M972#p zETW=u+`=(RDaP$S0?(QoCmjCcU)Ls}#`s0v_>##1GeJ2k1hP|Ex#Y<6meRw)p0=Lf zC#_RiTQys9MfQ>dg7ud_8rElQF|Ubz@mOe!cujCd`kwqRos73Q@0;9`de3~f$R+w= z?E?SJhxFw>WGg;sei5C(cB81}K7;4n4`Kz=L|-#+X1=~n_CfxEir5cEC3a;x58Fd! z&0c(7b3)c2yeR*?KrQ2z*A4w*7e0&5ySbJ*m&^V{mklE~+xfRY-DV#+{^ReR+*x9p z2cs7@p8Egz{iJ!DA8$K)|MRXTe-G{S_UxV{r~Aw}N^9;K@A(J1T&FMl5t-&U*DO}+ z=Zmyf`-W8KFI)Au@b2k|&tl@$U|jw88Bo=;w3S3+2x( zds{ItGxWA*#e^@ff>ua`S0r~@M=lh8h(MotZ{9Tajmc0<2gV$Or>mdKI;Vst01V69 A5dZ)H diff --git a/clear_capped/img/icons/tools/tool-eraser@2x.png b/clear_capped/img/icons/tools/tool-eraser@2x.png deleted file mode 100644 index 1fc023341ed3cc554ecaa7a417b5bc381bd12325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%PYc)B=- zRLpsMdvBIVphWw}^xl|hWVfAEMYCZ?gAyP%L!PmiGBoiHYO_GJyR_qZjmgfZOby~AF|nBO3OK>I<* z^F_B_mHu&C;Q2tZV8O$U_6IBT-VFm zn3tX6-JA9y=!T~Fm#Bl@$;+R-Fl}1BAvoyEtpitYXi8T3K8U-a$yufQ;NFduk6xHI zTyL7I)%A||UfbVmiMs!%U+8~6?}qRm-rr&c96L1QFTOe!v2W58)AibRxi_{qN*-vC zE2w>%eqOD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tool-lasso-select@2x.png b/clear_capped/img/icons/tools/tool-lasso-select@2x.png deleted file mode 100644 index 17e7162fa6fe4ad97d1b255a1c25a6b40cdb848d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmb7FX;>177Def~<-VnoWeS1gmbql9S>^_!W@2fj;UE|;;RJ<-1-Xzo&r}3OP2QAP z-=yJ^Td76Pq)p<6QkqMernzFNxZBYG`7!T)-?`^I_ugOk$2pAC{@!XTMk)XRKn?EW zaYn`$e?Un=*2g8H5E<vzgXMQ%sOP{vppy+z$?;vg z#<KJ zvI2Yu^xeA(B{%4X|EEcPhzpbKcF}G>60u|6cIL%P-H`dp0ApJwLJh;bSQ;GNbpXB_ zB7WE>F~b+|CPTJy@LXf*@8P0s*0&Vqd58o2Mu5oRPFx<6FF(vO-Bg5MoBBHJ1*dw* z?RZhuc8w#HGu%!6GC0DI49fC2(=ZHZ7%iZp(qW4`F`E1Ro9kG<0w}H&sZ5 zsAY%?Sf(!Fnmlr0}kxzO#jm~H5AsNMtx$@LTpImUU z)qy}J|E`#N2)pTh?4@fhLIgbg$LL%+wJ45e0nW_pvr6gAWFKAbbtqnp6B5xOHbybJnWQ42vk9w#^(mhxa9@OWx_L;F2Saf%Sm9M?-90&Y>EPPVc1w9l%cy4sTb_r#* z=zy!Jc%^z28)1jnrv(ZKq~!QqW`)lXH6I!J$k9-Ki`{ccAf*I`e+FM44v37e4AQbsdq~cC$bc&s4A!r z?&>fM=J;+uhEes2J?Hf6Fl%z7WgbnTdA3V*T2NJzgZ{`xWZ|s#I^;xgN<-p(x|A69 zS{hGts4*U&q3NlAnoLvppmIgNuw8A^eN7IX_#oCA=RU83L{7Y{QJ$P}Nzz-ySbjIH zd>=T6u!H7&#Onyzi@k!9o+&+ny!S6lf=IL$?w1+-Xj~DRZ!-_=-gz*39_>`wfjy=7 z8(>H&38Mp^l|43MN6yTa^4D8S5E1EG*>$bETvFOZe^%13mY_~_dY8B5bvz`aAmyQR z*1fS@$=B${n)`184!3ty$2Jb3AWt9E`#j|tS`WV2P(-pr-{-U*g9C{s&p3474g1pn zQ4urKkBiIiu&e|f9MBrP6@6t_aACM0h;!T@8S6|>EWh3o8pD-x&%?{a*PBP18OJgY z&kAp@{GLF{%nsepov1`q^jlf1ACCor=d)`Zu!H93n=LN3zz`cS-jC9=h(f2wRzNV<4;^W zh;vR+VzT`KO)>ol7z#5TIo+vDc!eBUh0N55q<&v&rv}bheEX)keoDx_ZoH^Ed3R`_ zUpmj&*!~V38TGgow7d#i)Q@*NlrF7s!uf|w7ft;*_4#`+T#)0>{$gg?RcDJNjBX4R zmsMeqX!wV7J51Pf2w-5qHqI#Bo*+#Rr~R~*46(tid7k?J4E7%^d0k^4k?1lIb~#Iy OF#x!yzX#tPo%}b3cQ?TR diff --git a/clear_capped/img/icons/tools/tool-lighten.png b/clear_capped/img/icons/tools/tool-lighten.png deleted file mode 100644 index 74a2ef427ed521a84a52f2645d927d245c6a7c54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{siP)5i}z$^mT*Ua@83_Jr0V9^4))WY@3`UcN{qXvje;2rP^cnVB`+rUHMTi_2I z#lpve7Y)Y8z*a*|4x9$SalLy1KcKoiE`Vo&y4MD1TyOK5w?a>-zK9pV-9X(-BXp@5 z#;=VP{IJF(^rY_rzaznMUY&sFRKL^5hPpQi&^WKW3-CR!@g>bKVi~)M(53c5T$Wj7 z-^)Krng?p0r0wI4o)uZZcf9=6%W<)+ZA0G}&x$PIQ!hU=)U*ZnJuAu}c*_4NX>%#R zqrcN$Q(-3QO47}m-|JM@=StG8RZxA+<3D=p`%f0|b1yH~U#9<`;&T3_rVkBa@vNu~ z_$t+b$EXu<|7G0ua{tLo(q}{87|)6<;3r=GSkhLY=B=dfhTc}ssth}4>X!c^ao6l@ z%TFD$Hh`}Q;GGRwB7LlV0Q`!8?tH8j=?97DM(AD+5@i$(rmK!_0zMePix`$z@Yuuh z4d6cTJ^XGGOT z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EUh{J?17BMJY&Y}9#+vJs_m-dT6RtTqW%jC$z|+ztFGh!km%ot`UyQB X6>&bg(P_P$x*#X2E9JJW-Pge*YBig>tI?d%a|5u&ry9RH(febncd9{G$Hoy5LFY6XQ4_B`{?ks%N`Lg+=r&c&qdO`WmWn8*8V-Kr`3 zJ*0f={s%pO^JELlvBO_F>zDN%Z@l~D$KeN3uiGq(4Mp!Sj;#}nV4P)_;IZ){-;R4h_VcC zOmF`oecK`Yqj|#2Z~tz!MBhGQS2fi;;kME`&N&h3U$?xLn{vfKuZ!la_FMzPCKYKS`|S$;Yjc=aM;Qur6z;exNsV?-x_oE^)8>ZyKuF eG~{MMQ2ykF`%H`%Y6Jo!l)=;0&t;ucLK6V$U*J{% diff --git a/clear_capped/img/icons/tools/tool-move@2x.png b/clear_capped/img/icons/tools/tool-move@2x.png deleted file mode 100644 index 78fcc514a784ab07e6fc1522c39063c83b9beb18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1015 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfc)B=- zRLprh%Q_>(QKW6Zugio8R&H18tsYAg6vdkQoh~}DDr@W$5Ru*}$P*ED<3{Gnri8_U z@~s++S~cvr<2y9Enp%HwboqN+**b$aC(L~E*>``w-`V@TdBWYDvn?n08*hGo?oQCo zm}3_&PW;Ny)y6IU_|VZE1%`StJwz}kt3Q-=kpHmj(`EO4$M_vI-P31fH~yQoE$%@H zTe75i<*5m|6Su{jX|PHCp}%1BvbW|23qM(j8y^T_J7TmYtSmP=hi%4zptj>iTkbh{ zPrbiUGJ(lk@?K8cv9tzGozw~)=VVE_-FZNuUVfd?Pb!p`M`0PT63Ri@w3_+Geh6A3m=;`WyAY656wSLPpZrdmb|Lo@jc{t>*=;JdG}1+` z;)y=Ol6)ToZm9QFa&FAoFd673hjmQdtQ$`quz9dg;Tp%96bly4=nFQ(+_jm V9miVMSq99c44$rjF6*2UngHyjyLSKp diff --git a/clear_capped/img/icons/tools/tool-paint-bucket.png b/clear_capped/img/icons/tools/tool-paint-bucket.png deleted file mode 100644 index c3dbd17a85eeda98d139e7e2e75eadf6f0298c94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 741 zcmV+~t7pMW9mEbwx+!Ty(osq4l4_Ec zC4H9kQc|@;zSaVKYy?;#U0c9;&;0*1-@qpZ_YfEY_5p{1F&@EiDLz;4?V zunnvNi+RHP1RXG-uPM-{fikd=7rakU1gry_Kz|G9x^HgqzJbpT<`Xaq30t4exc=k2S5r=B8RKY=Q6 z7r0;}Ki}lD1zZRE+U?&LdK6eAuIZD&5#SPV8+Z-W5+39@P)dM@cv+3|2HydEvkot( z_ze)({4{XU8PyUnmjHhwZ}3U$=$S`s-F5>%n!wk9!K^uaHd$xvc+YE6Nfk+Rk_Hm) zPiIZy10LCN%p>|@_0yq>Bybgbd_yeP^ z8gR8s`TsKC-C-*YOFAZLRnjX-8{JIqs@vef)U*Fp3h>Y>z(cD553K?`vRIqV XFPhTFkFG;n00000NkvXXu0mjfazj4v diff --git a/clear_capped/img/icons/tools/tool-paint-bucket@2x.png b/clear_capped/img/icons/tools/tool-paint-bucket@2x.png deleted file mode 100644 index aafd114ab3fe4cb3250af545ac3d9f2826bc622f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1582 zcmbW1dpOez7{}+@Mrbb0?YK->EG(C_6S-_`%V8-phZ(u%GHh6mTah*?xvxm6xgC+q z>6{Yv%RNz|NOM`o{c+h`7NQ*eeg5lx-tYT;zVGw>`@7k=Af$I|HX*z(w7@*~R^{n(6L#4EmYruiQg$#yVo^7hqS$*h}SS_f~;A zmkbF5HC-}H9nJ?dfk&m2%7P;TrARP)n7jXW^hdpVWrnP>xDjq^3{No@DA#eLybOY+ z`Qp~%Lqnvuc#6&%v8h}jS||O)VrGrRL-va!am0z{yxNNc3GC>RlcI8>Fp)l>mG@1G z7swOgVR@05#8WAyOthM6pT>7{+SMFwo)Pb^!NkJ8@qI>_TM1+#y+(t~Nf=Ek_~ifA zGoS#ZDK`8bdRNu6b^GCZ1TWWMf|b*vIR_!PAv<=u%$n&(J{Nk-FS+$}y&4CpgCg|F z@zf>Xz^np+yP=g^X_)TFi+%G^2B&<^(Ksp(ba$wREqdi%@*}#0feq5u5@4a~*2D}} zA3Iuzhms=l=V950t4FP&B=@pqS?Gx2bmq104}=%SE2SUWOC380(4y^;kZar>wcx})Zs(` zoFAZjJmkAXg7^tYLLuUU(pHW5#?IG2TkUV9>cCbd?5F0}5yF3Y)aA znhMd-Y`%%aW*uqIN}nB;}p_OiTPXl?7mGQRjS=#9q&zVV4rcBZ`q z;@Julb40lUPQq=I!emcQ_H&hwx3LF2P5ZXDTr7asb3KxcY80KB$Fb#Pv=eJyg#@aI)^WUsD z7^cJL{Zpf8|18*;rExd39ub30owB1xasey04E}T>N4Hpdm`(cP(7PyU78nC}Rm|3L z=PJOX&r~`&nha+84a7L9o{Yc5EUruHW;5yLDT@Q|;BaaOjvA{{*m?7)M03crcRDF! zsi(3J{;sY24se6HI-BCidOi|WKiI7p&!{ToXUti>U~ZR`lm~IUW|+$7o@Tn7vV=F- zVH}PYkh8)t{-t?x$)Voy{iDBIrjwL*UiR?Y`vk6s#!TcpR47^b!|p*|wEiSfzq~LG ztjZ^rW$*sg<2nkP)1{+dTLz2LSDTU26ua@B=!m>%H91N6syf;usq++56VskEYwso` z_+*iGV-KtG=yTs-G4B=d<1Y1Xxf;S?f(QdlgH`C{@$D>nm8`vjyr&W5gYIaw?$?|s zPt4yL-4{^YA<6czx>;?6X1_CA!JC%w|3MF$7-LDjKo{A~oTZNzXB)@z(q8a0% ze{<|sb;i`%Q7-=n D%c#WT diff --git a/clear_capped/img/icons/tools/tool-pen.png b/clear_capped/img/icons/tools/tool-pen.png deleted file mode 100644 index 68e3b7e7d2153530ad2750137f1eb9ccc9be8e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 670 zcmV;P0%84$P)$d$JuZRgU-3M#{b3m)(odv!DFMy^-DwR{f8n6HycD!@ISKu|U&o_2V=%c`A zU0Zzi60BP1Ndm+&N$vM@Dq3i90+|ztV}Oh=<|*@idk7+5>Os7!8?H^ zOkMXn-c5|20?kFARVMTaOieEXrycLEg}#sH>Jc0KB=7}Tv{|q9ZdvH@5|dO4csH;L zRDmOoH)f$H%7iWhya!XyRp5~0jR4!gJ)qJ^;Jv^)=8Vzdcvms2$HN%VMZo(pTlE^y z<#?AcC&0&)^dgoC{seRW=yS%eTj*!No>@~07*qoM6N<$ Eg8nNh@&Et; diff --git a/clear_capped/img/icons/tools/tool-pen@2x.png b/clear_capped/img/icons/tools/tool-pen@2x.png deleted file mode 100644 index 5a8c1569f06a935e560213ed7d57011fedb34a3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1488 zcmbtU`#aMM82|3LZJ5haE*WwQ6^&D_QKIcj*2r~IvP~AdSeV3dNvMc6cZ<@F;t`JP zbiyi<%H@$u9HXT~W~n&D!I^*IocH;B-p})Xp3n2V&-4E9UdLh4aCt3x007`1#>Gpb zXSNBImGtSagZ>hczT^ygLnRdtC1yxw7#$OENs=GkCdApKBvxW-M!EV&ou-9GG0!td z0F%iyCsV^O5zf;|<}}8I60w680LXZNF2}rMISZV?2sIz=^bY6b5R0(mxKw?phAKg= zQ{B_M9ER!)OGP7K7AFi)#Tqo!S_mN|-m+MQ;1%zA+5(1mbrB<$AoF<$(;Ft%J1w}T zGQT-;0+=y_F%^wJ%H~8rS!~hRkq%K}dueH@;K*NEV5~@k9Ss>yQ>SMB51gco$PhaX zgHemhbqY3w<<8;5&$}U~0CWwQC`e5I_=Pe?qc^|)4H_W1_zMSnU`wg$54cE7N^R(Lasl1p0oFtYfQ zKg=td(&>2v=(s)72VE)dh8vG8oxtMJejbX|T*b;F5Bm%mkyPt6!=P*F$tB5BQkfm_ z)nA9Uc7$Q?*Xf&^`hAEoFd9SCo#j|?szB+7k9;(wYscg-5z@wT8w8uNAXMw8+neqN zXGXWw$Y7CTM0YPeiOomcwKBHet6_zj?NF-5-al&6r$__rOkRth_Kw?(O-H7<*LUdk zBIUbO93io~JjdBGi0?1d26lq6HrM-ROc2Sw~xevtW=~<)R zt>xL6kc(Y=0~B^s10T5QfH{=~jkdYAX5<>5Z4(=w^^)q5(~29sg`44W!w<~&;m3bA zqYdiMx#tv_Ra)iR?jhfcUI@5pU)Fqr`pEoS=>*=z2bi>A3nUw{zN0x!{Ckbv-aQ2@<1S);)pvMx0t;XNGSKMI z%=0(0(5|I%UGlr~Qivr!*>h0;92(E@SXz+&ma#1!K446~(hJ#^AErq{i(8 z{Gb5FU_Si5^CR_BSlJyvVHPXq8h6z!q`->Ip#8%Z+h*;SVk zJJyiwkxSBjfi%^Lu7B#g+LoJb2s9!RR}*%Lt7GPt=20AxShcnf>Mm4pZfSv>>dq{? z&K4k+wg9T!-&wJwG=KRi-NynL2T2quazw9FHox+UkW7}@ioblB%HuZqFzw)pD2}M; z*p>}_U!8T+E5$#?e;*Qtt}YEE1n~sjtpf?x0L`;>3>|5;9(YyDqpnyOUYQH0%g|ML z4zo^~_R9XOjooww85aDo)stN|sq5pDN42FYQrFTWU%%YkOwT^MKXmnuqWNw!lJ2uR z^X8n0I@NaLnQ!d_3p9Ft;>lW01b7A1ROXa#eO=N8N~I^IDV?kkqo1bNSHypZk zf{_EV93}C((I-2`)h^xM3z4;!iF|O=Zei~mE7vuz;fHsjQ{OawVudgMGyah?=D#gW TIjyBB`Mv+OuJ5!! diff --git a/clear_capped/img/icons/tools/tool-rectangle-select.png b/clear_capped/img/icons/tools/tool-rectangle-select.png deleted file mode 100644 index a613bd9bc720b3e27d148c8304e99e68242bb045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNso-U3d z8I5nRALMFK5OE3Y{r7)*ytcWkiAT)r8Jl^;4=>?=8+uhHcQx}FuY#zi%R+OeJ=nss z{OzM%pIetX-_O5kcJJuzhY??HupHf1SlS=#d%FJGwnEd2t*=kUp8|_K+5F}AG2_sC zlU6#N4q2GG>Vi>d#^&JEo6*G^a${-usZbNYG1&1Tl*mWc}r@~Z_pj=|H_&t;uc GLK6U5^lHig diff --git a/clear_capped/img/icons/tools/tool-rectangle-select@2x.png b/clear_capped/img/icons/tools/tool-rectangle-select@2x.png deleted file mode 100644 index cc2e56502fb578776a10e0d4ef09cc1478d7afd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%QydAc}; zRLpsM`yf|SfPllro`3(R=jwY1o{#oKMZ z9!zdJ&eG2*CyZA>j(h#rSFF=>Z@jlpIt12{%Y9$hCNAUTO!Hn&u=Z`AENgDftUYOa zvIT75?xN{NZ++qqL3q)XZT`h4ZBIaWo4qa5ryDhbY%kL^6b4& zXS4TA2axl2PniKRKI~mk-COI^Pj;VChN#bZT0U#fL5O+y9gpn2jp`ShB#*tk&Y}bi ORt8U3KbLh*2~7aeSEu^` diff --git a/clear_capped/img/icons/tools/tool-rectangle.png b/clear_capped/img/icons/tools/tool-rectangle.png deleted file mode 100644 index a2d43856afc6ab716ae5be254920620bc8f6ed80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsmdKI;Vst0CFf-6951J diff --git a/clear_capped/img/icons/tools/tool-rectangle@2x.png b/clear_capped/img/icons/tools/tool-rectangle@2x.png deleted file mode 100644 index b1897a133ad96ed421918d0f9318283767062b8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q4c)B=- zRLpsM+mNr>K!D+(z{mgkv+Y!^*c{8`5*A*4neirf?bpuFdw(8a?*Y!C())5vS;_F-t)Kb=gzy- q0(P43yAR9vpH`Vg&~<3$S~JwLv+cDLT4WClI0jEwKbLh*2~7aEM3)u- diff --git a/clear_capped/img/icons/tools/tool-shape-select.png b/clear_capped/img/icons/tools/tool-shape-select.png deleted file mode 100644 index 55d6400f94999c5a2d4ed8ca48bf3d990af38736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsZF#?Utatoy@AtjxccSN*+lwt^?7lxdJ^k>*Z6SKfwWZu5s-4Hx z5UBj1P{H~&8^V@sKV|X3a?O1P?gO6sjT^P<)X%JMY(F6Pf!BiVS{F-L^~KDlm9c50q-7G zy9rxQ@+UAzFtar-yz^2ttj6Q-%Dh#JU#%0L8SwmYm34mI)JH4yuik(4(EieVr`ubu z&fQ>sdrBB%1p7W_W!dWLl^S2v8>swFBx7J>%{kr#;%ifDq z!d_0#Z3(t)k?m(UI(l??U&Oy^K4OJylODZg+{`$BAkl;)3yp)i1AVt-W;a=dIW5ZH@g0 z^b`1gOfp_9@~JDo?Waft>%M8LFWYXc^Pl4PYqIEU6*&ajzi=t%+Zj(EfRY7+r>mdK II;Vst00wgYcmMzZ diff --git a/clear_capped/img/icons/tools/tool-shape-select@2x.png b/clear_capped/img/icons/tools/tool-shape-select@2x.png deleted file mode 100644 index fed2da90297664784cdc45401ac097e352cc16f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1288 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0S#*Pba4!+ znDcgaWQUBa#PNFRa^*Bb&g>5?fntk1LR<`mT!jT#MNL?0Pj&krv{kmNc;b3c-1S36 zfQySj%_p}b!n`ZEwNgYquQ-H=6iXLWuV1~JxxPO3 za`4??Qw7fBeXOqP7ffPy80y`T5YOx3Hb2%X{rFIC;lpD)3X%y6FY7zh-njL^N>}wu zy;fZHk`;_U*mg{wB>ULm?6IYD7;EkZZkLSUugRb5WA0V@t@yzwz0%c<{*AA5f?xXG zZCT&(==|azEDuB<@IHurV4NWSLHc1zOxo0hyLy`M8L~J1aCyM>z%${a;J4X~dcHHR z@4w>tL+gRolm>{XO`Jru}~2^o;_YWVr2T3TTQEHeD`uiwS8Cp3B~pMRxJ9kd4_(q z{6m#90#VbeH++@zge^F2Rfy9G09Xrca@!T|Rl~e#zya=W$2H_&(TtNEOp(e0Snerqk(nNBiEC+85Za zl{;nhKr*QQwfBXn{%v<8ww|+Bxm(>bP1ke3chr@ScG6bcZcZ_JziL}S!}ErlI&mC1 zuaf8AZe+gr$>@Q_gY_%k<=tBUerHhXL!~c%zxIai6RnVtU|6Sg=gS+FFEMS4-m*1% zfAZcu7wGupX~HZ{6#`pjE%u)-ljhvSxQ;FE^~ZVnO!-fzCa8ys*|~Z@(pk9syY2_h zx0jM{GF*52DD%PUgW|)o`nD_Pj;cRCTF){P{d*#JqRFJI^YvajYTJkd$TiwjwC9IR&7MIG4POQK9>0kEDH^JZL&pMyy8NK+adY46;*4H4l zM)yq>(>_#uRZn24klvvXZO*$!*`}@6vh$n!j@y$`Z*>c8xn&dmEo94iCePQZwO5yJ z^}ck}RmS_GQt-*X(*bJ#nlo;nox~RVoWkZ#HqQU;D<0OMd<4H=8)$hktY7ELywggWCzc?hnUK=rw1`tS*1y@fsP&5Dj?-o$`xf%wWS^}R9dyak zuK7TJ%fV^Zjh{J~pFjSu!0N-$zsze<&XPaEm7 z*PE`-=G=Um?_{0M!{^h5Rxiv;zbtk4R>aK-W%Hf|9g5ihc=4{kEsBTxm;bu3X>wK4 zo1jB~Bsq-v(+uVu2yuI5BD_;5By&ZyZUK=Q7$dvSsAtHmR}^`ozi0ul)MD^-^>bP0 Hl+XkK9)wk< diff --git a/clear_capped/img/icons/tools/tool-stroke.png b/clear_capped/img/icons/tools/tool-stroke.png deleted file mode 100644 index 5ae9bf3c8e4d915ad0578e1fb472fe69a3401675..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks?IP)noV=By2_^eFYF`c`dCc`a(EdL~cqMnX5M7u1jH;*>WjfWX=-ChIqLjDX(9J>xpwxzte>KpZ(1wM#HfiE>^dn&#}eP?K&p^b!AbM1h}#qnh#wjMYS z+yK@B-8u4RQl8h^_Bieaz5o+|{lHaVHSj4%&QZWjU{<_l1M~a(Le?G7Jm6+8@oT_J z;KM)UXo+A+$f-ar`dz?%U_oC=vQ~Uf;{GevA_4!TtUZ2&pOE)~_k|Pvqsly2DOAsa?en|EDZ^0IJ{l(TdHf&1L=^L)Oa=llJBp3je;Z{C?;e{C%jEdT(Z zjSBDyQS*hrum`N}Gs|+Uns(8=QJ6jIV(y8~RnMB#fb%r9e)ul{y=}@<)Jx+;Uu+^e zJ|>YKnSck->2x@e5=)DUq~hW6354>cpG^P&@P3q!7bc}*v7DTX`MXi?jhdS9^0>!D ze9UJyCtPT|{zDOr!|OPY8@%=4fyLq5w{!m!wRT8#;$QsEHE*!~*(-=&!=uTFYQN{k zq-@iwjPkPf&f2Ok%Uv`+(pg9&B+gbc2pijzVt2QVch{EU|5-s>dQLEb>Zy8jpF)f% zyQV5NCGL=HhSi>ppzoGA7NgEyZG=qf!2dWnk7l0+Q$SLFv6!mop}7gzG{b_{0H*0e zrnUUXeU%CXaQtCnO`3MfzMmE>IlsZTDYyf_V`pEuh@0NOHC9}FeO;`4kKg$vZ*13^ zA(!Ds6_wUPwR@VpLqsb~#6R9#`>KUfV)`iN&#N4)@>Vbfedk~shh`b<{E7iSfIa3T!y`s0lpwu+Hn%H6V?1X@r+f1f#M{oE7>J1ckLfJH9t+$fTV*YU&X2%GE#2%Yo(Q7>7I<6%H zv0w!c0y|n&p_3<8nnb`7^riKg_xNQnY*k_%sF=!ivzWW*j# zmJtRidWBb23aP}AW@KyabMPFTp2aIALWy zSf{7^2ryQlyL%z)d^TBH8_s;D;=k(mxI@P07P_0H7FVX&%J&?>ghg)3? zxuY=-6UFm%mBKMj5Gm~wj47lYJl1S3<1k6SPCbRYspTWpK4>2@rT7$|jQ4_k(58sXlXdf~JQeY11E zYzZCN`xP6}sV}_Puomm0-&U4!QG$FH2uTNFPf-6&>7lffPRg@p_to}qvNjKRr8^ss zm|f7S2%V{Df7LovF}h?T@<+*2rr)O5#TvFM_Qq~|T*n?x5@x|`UHE?T=AyTPxe_Hw z+2^@kcYt9uGQ1?-nhGl5smS6Wl8||ZWT8ZNZ3GlSg+-(tL2HK08b!A)X3rm=g-l4C zk-vV1qNb9Z)wIYx*TqWRnWK;C{olc=j^bHQE?au2)KPa({X_sL-(a75Z(Qb|5_l)E diff --git a/clear_capped/img/icons/tools/tool-vertical-mirror-pen.png b/clear_capped/img/icons/tools/tool-vertical-mirror-pen.png deleted file mode 100644 index 618bd5a6f7b55f1962a5437aa8100f9344e93fe4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmVP)l4#WAWIz%T1OBBBQcK@czA42T z@p^u$tG;=>S~>zW9aWlYfUFAOz7@cID}eh}0Qao`?pw70_j36O8TYLKUZ5H!byVwA zZ{R(WMkEbO>X+0~u_sV;BjbC$z&LOWIB&)|QmKEvfcFBwfE|{19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ypn!tDbz0txd zTY0)a-{O9L^Bb0WlN-$1Rm1!7sxI@K3Nlnn&p4cN4R&iS7++kO3@|af=bVWO;$bT zGh-N!{ciOexBG8e+`mycS22DxwZ8R6&ef80lXShc_xi8ly3_E@38p1rvC7IMYV zcIWv9U{~2ef@qKhAxfuJ0rQad!-{VU@##=ImKJ~y1MXW+)hwa<0_}4GxKxaYGEwH$ zHk=MO>t)mkSAqdM%jKYAPavWhcyFA}d9DfjUiS(meyqcUeapO2vM#4O4L3Ab86IHO^T%rhTa0{nun{>(Jk zM$B3!!Fz9^VmIp`(+@ZldI#kX4o+{J)57`45{O@>L)-9nZhPl_0F8;nP~m52&<#51dW*%v^H(FWi!yPUH=M|nBYPhR`5CVao0V m*>pu=9b2Jk$7)XPeazubDqe5a+0O;Kn8DN4&t;ucLK6V3*lrI1 diff --git a/clear_capped/img/icons/transform/tool-center@2x.png b/clear_capped/img/icons/transform/tool-center@2x.png deleted file mode 100644 index 64ff4e92c54e43837e2c881f2d791fbdf629bbd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q?dAc}; zRLpsM=XTa12N8$B;9vju&)K(KWuw6NGcTh0;|y~64Be0B-v7=%cl|~751B0eoN~f8 zY85^oW;`%FnA~(6tH5u$S_bvH`kT9C@6?z4zWBM#=pk5fnq7PR%vX2*=m^6N**LZN zegFRGr(eSO_Njmj%$a2fk$ofj{KL(4z3;8&Mc*^_smOWyz|42u-bXTazkXGGc|9L! zmBo&j+@SeY+~4K@ho6Np71Z$6tI4s{Cw?=r4=taxA(m;NMRurqkN`njxg HN@xNA$;ZK$ diff --git a/clear_capped/img/icons/transform/tool-clone.png b/clear_capped/img/icons/transform/tool-clone.png deleted file mode 100644 index 0323455896c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d^UlZL9kEO| z{Z?dey}n*>`k!^e*A+hJEOxoc&>|3&>wV~LNvpuK@5ak*TRymPB$jg|W~Tk0AaLlA zz#(JBmX9<49?tF$F5Y_I^GD?GJxlYR*_^KD7P-%CeDQ4Mae?{?uM!nE`tA$~y3aT< zcG4@CiblpibF2R@-%#cp#C`so#5~^^?eo4>=ch$E{Wv`HdAiW`Q^sBQjORJ(*T{T) z*Cu!6(C6^I^_{P;t1kUe)4#3C<0RL9mpNI}{JPry$ep|RTmANA&g`qo+Ixf!b55xb v4n6(Q{8(4v!=#uU65@KtTD!?)?qucmIe+e5rtvFa8N=Y|>gTe~DWM4fvsD)G diff --git a/clear_capped/img/icons/transform/tool-flip.png b/clear_capped/img/icons/transform/tool-flip.png deleted file mode 100644 index 8369b2b45723265eae138a282ac24baf2cb565ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 708 zcmV;#0z3VQP)*9Jn>8PBcGcy4vZbE`9+Td9pN*PiRga(zBnsf`~-&WlwfysIn$eW0+! zDBvaVCAL{g;!>JPsHY;n0Gy&}yND}b5jcx!n2PuT&4!z(6ed1ODTvPj=RmKlS(#G} z&j3T<1#lVKGzIZ}9!%HOwrqMPFIcg}XMihUv|7^=UpD&;yaJvB-$NS565r#oX{p|r zyuHxIF~p~V0WeXoSsAyj@dEe?%mcH)jc@Z9;=BB9+DC6q{%%NeDDf%a8!*{a(~?&u z-UBXxr@%Adr;mY9;yW~(_R$b{XX8W=-U|1C8ULVSyM z({;J1+yU=Ry)7RTzQiZcJIS=IW@T*KRZ2ZUe}i}E9p+YI#FzLccGGp)mQAT&zz0)z zQ(V}C_$d06oN?8(%ry}QZTcGcfj&+DxXkzv-@t7;R5!p!Q-4E}ASK>I-vH+%H7jGu z8ZR}A-q#1{o8!>dL`r-enduk}fFsjq-4!e$UZDToEC>yRtnpHd=sV1r8Mm5~5MM)X zI##E^C)01u8mW|Wefr8zwpx;y*CwWKi*qfN72w#Dn&ihR)hck(G~rq*$z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#1_Y2gZQSFv{dK)Qn46~_X8w|rDbICi{4=9N2vSKhqp&etSWu0GQ(5& zY#%1}Hw!cnzJKGe^-^ega3nUX-eLXHH|E!xT4(&@EvwOsqFv4_XMkqqE?oV^kursK zgn0Qo+r+y$V;2T%Z7w5lHj=j=JF72-I%CRpnl)6r>NK3c+=Nv=Z*{KB?tX`TxLahC zejm{8iVHvhB=6r*tXWNY>-EC>S6*SE6x+pXst1Bp{ZA|}Bmh>Zv3(Zj_}l+on3D&H z+jr>j-_eH}BG`pcK<)Q*cU)hJ+c4I7zbdaN&11J zy#J0?zD?7Je^LpU^q!3>?#n`DWX*w*gq=>uIU;ZhwN7=>jWagSBmlH8MPRz3weJ0I zm{%sYT?v3Fk-xkET`{jBcNh7mO-T+0 zt9JSiRH%h-;n(WtDi00f?S3shaI0%Ru$vXV6XV*?T0CeW%^IKsXZfYKLEftBa{gZ18SlW_I08|GmYOM UGM@l{+rV`ha>cU#C-2n%0?Ip#YybcN diff --git a/clear_capped/img/unused/circle-dark.png b/clear_capped/img/unused/circle-dark.png deleted file mode 100644 index dec10e5ece9cfa9e5280fab2ce1dbf69906df266..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3356 zcma);c{J4h_rNt-XOLtmyKka0o>HObAu^05`!WnAhU|qfV{D_5;faP)mMoFIY@@-@ zGz>lEn{Bc`XhO0tLt||WzmMnlJLh-K_pk5gocHH_-uK?mec$sr_ukiiWNU3I0+s>u z@bHM3n;F~l@En02EA;${aZ%Da|LHHS5z+_$AXm zYWY>1;j15SUFY2k9nKmi%}Q|j2t&8h`_m1Sk`yci{U6cIMG4Qdufwe*{h=5ym!;)* zN$<|oG5^ZMM9lWY=s&Sgxz@$v;wB=4RTv5XME2jkLck&p^ef?1W{QP{MQd<_Yb$oc ztGI7Izs+N<656$zeU4WO&ObDC#mXRdj4?4Wae&M8rgY1JQkoYwqlnh!mw#UvnTve6 z!Ql${r29V223dcU(x##JX)H(~Fi3HxX1S6%`p7x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CyaA76Q)pmV{!1zIA8j1T++e<_eGY;1UjRAGljXpj<~1H<7I0&rpvO3C3x zKE|IZ1iGUL>15D5$XPsr2crC(JtD*VoDO?(&F*RI)$`fBQhH$(hwKEP_+l?oEjHjN z2=dZT;b7-f%Xv+{yum6M9EnQ$*!_I!2<~rGo5N@JdzZ5Nq!01Ij$2u_N~B3m&G)kq oJYO2Wv&02^zW;8F{|~D-vlDyl&QMmar0=1|9Byq~1M`UgA5BtP)Bpeg diff --git a/clear_capped/img/unused/eraser-dark.png b/clear_capped/img/unused/eraser-dark.png deleted file mode 100644 index 05b49d61a6d49d97f00e8b3ac4e0560c2dd5ffc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmV;819JR{P)wTu@VpI24MnfgOO75 z>-cQnIksd~LM1pKaTMSAh|lM96qf`c*t0&Eg(u5V78N{QQ}>kd_cZF&79CnMFj= z-a)20vK0#(xmq#NQ?0QF#DATUhD3s>g&7cmFkK_22oWb?x7GgmhaS+pJ&;lr`jjjDk%*sm8!c)XZ2AG>s_As3%_oANW zHGwE%iKXX=4NMb=Rm%q+J;qEyA$t(TxAx-smHA`?afvv}19nxKM9iYQJvY2v7E%Y%TTB;-9%3G$5Vsn)h`k4p8i2Sx#1$bI_cE zEUeA1v(Y&sam;K~(83lXQOs;qguDY$+z-|kBI+e2#8yaoB72?Gq`_q;O2h_a&(yMp zh#WH=OnzZPM2g7<)3F#4kzuk?8w5HwGZn58?=VsC|A{Wq-GRi;jQ3D7h4D46#tIvv z1I$W!TVKmok`408SY`n+nJ}(qB8NbkF~fv-*|H)JP~R{RQ`qhx%Sb)}4|$5N1)l{- zosBFOLf`laizVz11L6(x`|hqzU%>Bv8r%>@n}Qs;RK8Xe?lY zJ}dVn?tR7tUvLZ!qQv@et`QhEvT7UijTQtke{3SE#3RXI$^gd+BJZwM`9&EMa`OU6 zEh0rsmxx2juP)3yAS%|`^k8NIQL$i227W7ym_3Nh`dD;#;=d-vXZ{4qVd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s1A z`Rb(G@tagO;IHl99lrmjjhmhsf*-X*DUI8ouECGHPq&2d$DQ_3borEsEY$Ps!!4n2 z#^0=Yms0A5l(52E(goOQ0e_ldOryuJmJq&YyzfXi$``}|vKqk-{M|rz0FS42)iGPr z<8~+|)z{D1@hPotwX6;UKF|0>!YJCA>O%JlNj}EmC^Kqch(~r^yVWZEL)0p cSBCQaA1Q@JkH9H^xc~qF07*qoM6N<$g2!{3W&i*H diff --git a/clear_capped/img/unused/gallery.png b/clear_capped/img/unused/gallery.png deleted file mode 100644 index 23db3a94b3d666c3081543da07b8fe186c204b4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^CO~Y=!3HF6)M^IFdgVmyM5$#nALzx)xAKEi)vd#5q4VH#M&W$Yo$~E=o-- zNlj5G&n(GMaQE~LP{_|yNL27mOrH8AJ{qW?$J50zB;(%O>xNv14Fp&Yl+Jrr^LXBJ z_Z^=5mX*9@67yi3z4O~P$ukeHUaLO;YUQdw*>XE?GBARH@0{EXzxGUeV_)`O<^1NG ztA3?LXD{EpdH)5w4bf9eogEw;UOOB=kQZ9^s{VxV9p068tNNvxn3#fUL*x~%x_>PM jsaVzjikSrjO5Xlt_}k-|y^ZHl1<2)|u6{1-oD!MZe#GSKi42?3h zD3pr&;DQzEgB7I~TZ)Q^z9=HJ6?&mBA_!ipE#AODC?eJeL)gqrlBYg|*wEUhH%m5& z+GIEL`H+jb>`rEP&z@-@zo*^(&iT%N{&UXk%sF$2nW2+dEY|3{?#BQg0q_@qV*oy| zEGwl|$Sfr~8;eGx^~{_Aux|FJTL8QVpccRjIteJTYB zmC1maGe<;}C0y-M_5QgJsZ{C!fY_3F4Ksgjnx@i|rYza)_&yAv!!V4rl(I_*u{)7S zTwG8r<ApFFG909C9R5VU}xSu-GL0YS57K+pn$X3c=01q98S0YM808XX2S0YD@Y zxfe5&rP*i(fKVv(um(-@=vWvrq?D(H5O=`a@NH7c1_1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iCH002ovPDHLkV1i)k1+V}B diff --git a/clear_capped/img/unused/magicwand-dark.png b/clear_capped/img/unused/magicwand-dark.png deleted file mode 100644 index 433aef2a67149cc53cd03731656db6ccb6e29861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7703 zcmZX3XH-*LwDk$0mk_#A3=oPmsiL7vN2E!Y9+09S9U(vxkP?bWQNTt35rHcTh$u=E zL%E1jq@#eLBPF0hgh1ZmzVF93#`~2svgTfUuDRFRd!4g0Y^}|>*oD~v0N}DPH@*x2 z5bzNKurh-`?h#e~03bGFVSK?Mc534>ca`&KVb2~iFfc53=t)_bN+z?kD(3XXvZ&Sk zSd08K7Wq<{MaFXcCU$p8r?ZVMGRw{LrQ-6WOw`nN7B1#V>3Zr||EG>n+phkaH6)>V}#ASLR={|_5UURB>}wX^0}d~206+ZXPX zqdr@LiZ8o1Jq3EI7UiJ}qc$Q^DQ1zbIfoJJd;wwg*W9L=K@%s>QEdcfKtPx7M?2l) ziSpz%qxg+^UylyHJLHTF_Ak255pHD$wbL#$_vFOx7AMw z2J@SRJzYBpQi}peqTv8_9jEod#>d+G_4%YHj;zDvkcsBu0k3UO_((W zbRt1+x3He=4R=l>wl8G9OhP)&1{9P+#r+A;38`n!YF9+R*|KX)#s!s~{L zDywW*)!MSH+40}oTowW$P9#X_GOq2K zwrTh`0n4;m#}M<;K}c@!$n!nKXYPn#0a*$rjeOYATEsjK#Z1ZVx zgawD{DfgU2S&v>t=fm)RPbxwG*3E`@dyNLCi&MTasvhw7;VFx^9F-l1A-RepEqgEd z?pa$OKTE9~4yhA!=Nk|HygFb*ZPxD3sNp-F>V-1|)GA+MF~~=fd(NM*!#$Wm_(mFU zi=9}06Yy`)L(x0ViNp+)Y)^3W7D7?^A_(LgI+$0F#onKcYwi|BwaWKE9cM!gb7#F@ zE;6kG=9eWgbfWwA$pm={X5cOQmYv9waGhG%o2z~5T0s6?!VK=Ura{lLV8W-@zAkmW zY9H9d01H#&EqYSRZ%a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ear_capped/img/unused/paintbucket-dark.png deleted file mode 100644 index b6bd648bcc9985b0c1996c04d403a075aa8f5c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4104 zcmZ8kc{mhY)Soe98QI40+KnuOtYZr?S;iJ4iIR0hDzaqHHg*$}B}ru|Q5Z|}rm-_4 z2EByHC=61T$d)W2^G)CL{q^1FId^~Vx%WBe_dDm_b+EVM{L%8bd;?uY>^rX!*YaG`Zg6#F`Wfw{Qu+80;4w%Gl|ajPr? zLanEjMoY<(B5Zt!5&4l^JBB?x6_FM$ZYE&@+oSYWHc=E$jEAGYKA<+tF|)T^ag-A+Eqr(0CUe4YwPH!XHWVdW+J+U4X zBTl~%tp(fH=>epqq*&=^hjrkOF3sOlwDMyUEaen{B75Udg#&>Bx3_@yz=T_b?}57} zPi(G2vC+}{%b_iCCqmq1d0$#tStX-oO;AsnUqf5k3wB{}LnFbSY{2ih<1pD!53{e2 zZN;L+KdH-3IY+eNZ)p?`w1u`z?-2b3f7HmynW}=mZU1gSe}iwm^vs`Am@{?mfPd0A zFlh0aY7D$M&Q3taQyJ8i)PvfWU+n}wvyM$D!N>9U)0S}@pPmu-46?&0*ucO#Re)JD*9x0#X5e`vFN%w~X z3(}l3(q)u7>cQ65)>LEgEK2N+BhOY8un;f-ur;TzalukMx%(GFMFc#LCK9)8UySCG zcc+vyareo)PdA5t^_kN*@HHt8Q0&gic!nJYV+@fLY6j(TO7f&tcvcgCt?3>2dlb3HRya-#Mxr0hrC}cq1m}pqG?l?RLcd z7{VrwrDY1+ay|Ty9I#5SV~Y3z-V0L9DvM-tfibbMIAv=C=p7@wrOy4mQTZ*E9-S_a zwOh$197=@)3o;At6TC(>P722%BZjEEnO-N;A@<->4I%DAK0ZF_yl;<2Wk!rla5!dy zZJ|1E=%2Q3*VvC{X|9+f|Eq(r2T8^Fqcb6E_Z4gtNZ#G)k9#;DX(lNq6Oe5#`Z-=6 z6CR!$d{2>n$}{lhg`QUe-C*@#%kfI5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;ps)F_ZJksm1pZ!d8P&_W`&gnFj+wUi0SLcnEo6_JXGmT)Dw z1Y8%f+-+(x5DXU19|rYV+@N^SDjk%jUl1$l`_Zq+k;-U0MSJmpwSrEpH_Vbs&Mv$e~2!)*)bM4kz%bW_oI62n#1>l({0u&0VM2oVoqlTz(Gj{)KPQwk>3 zd;r#i;M-St=0WZ5tDuPpcvX9lGRR~MqsdqNnyZI1n6vPAbbM%Ns9r$T!v8*48*4}l zdJ3fXFfz%`tYG#*93EIZ<3Lp41z_tsfG#IKGJeXRlm-&WkveIej^5$n;iR&}vk(F3%@2IJ%S$(;3+I8};VXklL)f~&sy#p6@ zifp*y>dAWV%`yH}EBs6CI|Y~`y|uc8as@nIf`I@vAF2TyuFK z>JvnByW(r><>kf7gL$>bpEeZ$iCd=|52~2k647q&hdflj@V0-$wd>G^5y?64>3W_I=9^m@KWonUpv6Y!X903hE4t- DQ}>`* diff --git a/clear_capped/img/unused/pen-dark.png b/clear_capped/img/unused/pen-dark.png deleted file mode 100644 index beacd0d1e8af0d5be9ebf9b5bdb667372c942fb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1679 zcmb7^drVVz6vxl)EiI3fTP7+KMlVAx**fqsUlVK{AmEfbM;6@NiaKAJ+B(QktnEc- zs>9hjwi&Ff4vD%%R3aHZ##&Kl@i~bRd|)fqR~)eva8&x(`Bk0%;~%@py}#e@Jih01 z&M&!}X65IIB8No+fG96FYc>FdTMEJjxXk@(?;>0T^FPSR!WAEH<}p1k5t`gN#Q;%* z$VIWBq^oO2u@A-=uHw*bMdxW zT+ZY~x>P5=aYV6TAJaLsSQgl_9@y0b#wUGqqk^fJYDjigaIC)H@g)tfH=AEjPs4)l zAt+@P;R_%JTUQ$1Kv?MH8j65C?0eUw2(TL+i2CSUONr~{%r^0D?)EDX~^qlahwkg9#$`h+E zHq5#P2`d`)1tG_Rx2<5Z_^@|Rr8PCQM=Z{VT%mOBG@e4|F)SWVv{vCE@Qv>z33h1t z7&Spc)Nl91fN%%t$3|hrz(Y^P)CA3;mNRNvV>7pOcEY(Ve6hg{~)w5NQb!7JlLHxFf%1s+61-pebh*e5~^%55oaVE|Eqz zhOFe{Z(G%}JmZGSC7*Q3C2g7x35v@6l6T*-2+#qMQVFyx`&?r%VRp8#g zJ|FRpQqRdw?^bfb3^&rHQ+DPu&#CV_;;&x`H_BWF5xd4lgnB9^O;8wYVd52@odaJ> zTB#IAfVj)rpSe3AwoQ-VHHMp|lUcZ;Yn1bMmc)NA;fXW)@xluSFfgSqh}*-+*|mD+ z;4f;#cuJSqV<*`eC70b<7dX03;wguOGWvk8xFay}ZiM@XoyzH%x^}2B177#fw96p1 z6(l_}wVY?D_WRRx+X_m9@pj`T?G>Rr>vy|x!2~YiQMV=Xaj#8^em_1ksuZBF;rPng1RzJt_Ze+#3cp*soKDe2U{;7NlBY7HQkxcMpj zg0%*bZ8;MT4=5$K>x#aWJ}%<=6*8z5-gNWZm-?j{;_Hyh@M(qCc~@#{=(F@HmeFj6 zI0_z=pHhP57p5IHh6E@!gT*{P*UNz^(H_S2KL5j$)mEmXob`Xk?TdRuO3r!N`C0ql HFIx96u@K5o diff --git a/clear_capped/img/unused/rectangle-dark.png b/clear_capped/img/unused/rectangle-dark.png deleted file mode 100644 index 37487c8e62b4daefb1b41441b5c54f780af75665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-;BmO< za%XjEQR$`|tSoy)YvsKZkGogpxVgxu^V?=dOYGs6Fh~gAdhg8nRj=yXPM%4QIonn_ z=|BS`vswazWb*;Bp(M`?5F1KL7=YMdGUwO3f8N{9=-8M6`3d)52_-P7wzB^;P4WH< PbQOcAtDnm{r-UW|K}=45 diff --git a/clear_capped/img/unused/rectangle_selection-dark.png b/clear_capped/img/unused/rectangle_selection-dark.png deleted file mode 100644 index 3b5b827d6c4f6d5b0a8b4bcc60e25d202de38dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-_|>L79WRYi3(CNx#tOTO|F0t?vQbSJqVtYcm$ae~qcQpf;i3S>t5$vME8bS4G0^ zn)v<-QI2`P^PP%kV1sB{*Mn@mz}w$`&N-MDxV$Vu(lq(Yr0AOOef`r{{pC2-&&b9j zVUTbxF(@?D&TEa;;n$fyI*$@B&)jkBoOQzM`-ze{*Co%hM<%?RbfAHenau}CJkzt> z_r&hs9^-G - - - - - Piskel - - - - - -
                                - Loading Piskel ... -
                                - - -
                                - - - - - -
                                -
                                -
                                -
                                -
                                -
                                -
                                -
                                -
                                -
                                -
                                  - -
                                -
                                -
                                - -
                                -
                                - -
                                -
                                -
                                -
                                -
                                - - - - - -
                                - - -
                                -
                                -
                                -
                                -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  1x
                                  -
                                  -
                                  Full
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  Layers -
                                  -

                                  -
                                  - - - - - - - - - - - - -
                                  - -
                                    - - -
                                    - -
                                    -

                                    Transform

                                    -
                                      -
                                      -
                                      -

                                      Palettes

                                      -
                                      - - - -
                                      -
                                      - - - - -
                                      - - - -
                                      -
                                      -
                                      - -
                                      -
                                      -
                                      -
                                      -
                                      - -
                                      -
                                      - -
                                      -
                                      - -
                                      -
                                      - -
                                      -
                                      - -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      - -
                                      -
                                      -
                                      -
                                      - -
                                      - - - - - - - - - - -
                                      -
                                      - -
                                      - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clear_capped/js/lib/gif/gif.ie.worker.js b/clear_capped/js/lib/gif/gif.ie.worker.js deleted file mode 100644 index b6150c93..00000000 --- a/clear_capped/js/lib/gif/gif.ie.worker.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1< to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
                                       
                                      a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
                                      t
                                      "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
                                      "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
                                      "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

                                      "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
                                      ", "
                                      " ], - thead: [ 1, "", "
                                      " ], - tr: [ 2, "", "
                                      " ], - td: [ 3, "", "
                                      " ], - col: [ 2, "", "
                                      " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
                                      ", "
                                      " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
                                      " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
                                      ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
                                      - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
                                      ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
                                      ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
                                      ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
                                      "; - } - } - - return [ - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - gradientFix, - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "
                                      ", - "", - "
                                      ", - "
                                      ", - "
                                      ", - "", - "", - "
                                      ", - "
                                      ", - "
                                      " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
                                      " + html.join('') + "
                                      "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
                                      -
                                      -
                                      -
                                      -
                                        -
                                        -
                                        -
                                        -
                                        -
                                        - -
                                        -
                                        -
                                        -
                                        -
                                        - -
                                        -
                                        -
                                        -
                                        -
                                        -
                                        -
                                        1x
                                        -
                                        -
                                        Full
                                        -
                                        -
                                        -
                                        - -
                                        -
                                        -
                                        -
                                        -
                                        -
                                        - - -
                                        -
                                        -
                                        -
                                        -
                                        -

                                        Layers -
                                        -

                                        -
                                        - - - - - - - - - - - - -
                                        - -
                                          - - -
                                          - -
                                          -

                                          Transform

                                          -
                                            -
                                            -
                                            -

                                            Palettes

                                            -
                                            - - - -
                                            -
                                            - - - - -
                                            - - - -
                                            -
                                            -
                                            - -
                                            -
                                            -
                                            -
                                            -
                                            - -
                                            -
                                            - -
                                            -
                                            - -
                                            -
                                            - -
                                            -
                                            - -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            - - -
                                            -
                                            -
                                            -
                                            - -
                                            - - - - - - - - - - -
                                            -
                                            - -
                                            - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file diff --git a/clear_capped_v2/css/fonts/icomoon.eot b/clear_capped_v2/css/fonts/icomoon.eot deleted file mode 100644 index f5314adf7b63f3e372c57b1dc2c12280cfbba943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4416 zcmb7IU2Ggz6+UNX?%es?pIPthdi|H#tnGDNaBZ*G+Y;KY8Z|$vqeRd^6;#zGO_Nk{ zylR4!B2=v?Dnjam)z>0q@qk1nO2i8i;$ffQg-R8D=^M+B`h*}4sRRPneD}`U-d#cj zcV}nLJ@?%6ch5cd%rrxy?`Mga3>t1syR0x97l-kRHfirpow__aMwF%-bcJ?k8~+`; z1%fnviLTN$`Uc&kEqWc80(}LT*XcHB6-`Vlv_#9Ac62t7N}x||GHLn3mmgnsj{o!5 z!2A;b%`4kmt%*y&xelT!^f#_;-EQHjECP<4Yd7C`b@s3J9Qwcqo$FV(Ug019^zYD0 ziCe!8g!u=ffxe=jy}o_t?p%{UkN!L8zj$-!%GScWv+tw-C-j%Lx9+xRhQCLY$)g|N z+SjVX@uh2jhk zT?JdFdGM-4tLu%YdGM;PEOB+@T2n+TRk=J5rqKw~nIVn|_lNKWhx*$5DCZ0p@=@L% z(KR|$w0NN0=tQu>RV_A(k*q3XM@@qwBV23I@lpAWl>`2VE=ZJIX&hs4)m|KQ*dfbf zeBh(H_Rit_2D)qObv|3-3{P5?tpeg)oHSd474q52fu}La@PX7;J{6EHn7ILZoCSZJ8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+7`smrl4-`Im_PvjHL`sHLoRE6gLIQ3Q8qmNDHROS#rUuniqe&b3dC)(4#=tlK z%b3C+j3shByt~cNv&J{gMf0Zlf!Q&CYd)~PZM|>(%KDq|#FV%$ekShQn-HL86!^Qy z;i@SSqb*Gz^z~ - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/clear_capped_v2/css/fonts/icomoon.ttf b/clear_capped_v2/css/fonts/icomoon.ttf deleted file mode 100644 index 5ae72b63d94aa0e3ec7d7054ec589def6ca9f394..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4252 zcmb7HO^hQ)6@IU~tE>O~)3)0l&u@D@GoGEmWM(`bCoD;!$b!$txD9=@vf%y>*# zLAhQ1>eZ|7y?Ryk>NPPD`P3nkRxf_}(RJssPm5;UE6=??mZU^lx4V!~BEML|e(vU*EZNccI0f zNBeEGU%0t@WqawJ`S;NN6WS{~+jrYE%ikx;6wr=uZSP$DYWYWhL3;x_o^9{mz5_c^ zvfozyWE#YKB+z%BUj^sP@ck*3>AOm9q%h1rURp$-gxuf9kNZFa%!q($6B+m`jRn-I zw?Gy>hPOu!`kTG)lq)cJpzq@<{K)dFb8m zLurp}$`LIztBq<@Ey{is;;6$8A?NtOM-A@ClHox8WvbhDqze34s+ac7%rDRJte3V!h^>}`g5k` zr)}F;o|74w%G$OkMZv}52^SgwX<2F|ipmnpbTEA>0%>DVVB2XY6-t?Q1n87Zmz^|= zwBzPnw;*KzC6)|h^mYyex<(JTY^;j=s$SZNo#z=<4*ky6NlC9pcqEAJ27q!eO(2#h-vvkrP9dd8kNe0Lpy0V!2)MBjq-V3)N*GqM z+1d0cpRvu<<}QS}m8q$fTv$-MMDgCh4h}uFN1Y>zJEbT(H9vnUib_Y+Wu+tXeeAnX zx@m!9YKgQv%Ee~EzQKXhIJ zRi>%+Qt4#)T<>gZE({k7OQ$C%XI$H)t4IF^E_`_3t@4c*~!V%OU0#J zK2ELXmdg{HG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$STof*S^#wDdv9htu|?{)ox`G=W%1GnYC7Xh~#

                                            1`bt&V6alM zoycW^dZoso7l)oj5lOOU1{zm{6x8CD<7qn#6=V4v=Zs6+RZ44LszMYwb{qy4my)9v z=Q4~FSNfjAxy30Dj20T?oD)jX17(C!CY39NQ%XW3wot%1rBaD5hL96^I;cx27Z$E< z5ZQ6!Sj;$~wobJ_G*mg54s$UbKMoG2Lr6Sk=b>N-7y}ZK-qzISju%&@|-jd6;~1yb{vDj&Pk(C zEcB%)F-0M)JjF1L5D!Vp5#+tuRiVEF?cRij3xizT`LNHa$qf$^n<*(jP_SQ_7>?s-XEkg^abp03po7Yc{# zHN7XxwzFByWTaWCG)IzbY0W2dPx%GMDfp^4lKZ9c6QiRi#!J0%8O^4yo1z0-+m?mh zp2Tc7%XM90tQzYA8Oulq_FFa9&Dq~Q@BjSm^p9@`C!c|v*9YJI^xlw}&d2UakC$I| z3w8C(eFeZ54U7HW&0z$1apptbn@NMDr(klo0&#FXYH*8gnadLak~}asD7IZl#^s%c zFScWDa?5#6N)#x>og9e4pt7`#onjS^!sr*oS*o!iXm z+-6SaHgj5_?(wc}ZnM9*`S&8I4|8p0V|`=e=7E~3znawNXx-8rO`(ETh@*g{y`?~-D diff --git a/clear_capped_v2/css/fonts/piskel.svg b/clear_capped_v2/css/fonts/piskel.svg deleted file mode 100644 index e7d9704a..00000000 --- a/clear_capped_v2/css/fonts/piskel.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - \ No newline at end of file diff --git a/clear_capped_v2/css/fonts/piskel.ttf b/clear_capped_v2/css/fonts/piskel.ttf deleted file mode 100644 index a6836b3585712666a034e53dd39253e7d4e39cad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2424 zcma)7&1+m$6hHUl-Fx5HeQ(~!Or|rLOp`Rxq)aktlCiXek_sizV6CL;MmtT@rnYH9 z8=*xgUAVBg@ek0A-Kn^8A>yXsQqYwPK?n#%#Epx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`Hu-UQ5| zk_M5>5b<_^dPJJ7$A5D>&NX;j$?##I;el-a@A-L*0df#IGynSv8Bu^YdM-icD0t_S+9c(3lJb%=| .settings-title { - /* Override the default 10px margin bottom for this panel */ - margin-bottom: 15px; -} - -.settings-section-application .button-primary { - margin-top: 10px; -} - -/*******************************/ -/* Gif/Png Export Setting panel*/ -/*******************************/ -.gif-download-button, -.gif-render-button { - margin-top : 10px; - margin-right : 10px; -} - -.gif-export-preview, -.png-export-preview { - position:relative; - margin-top:10px; - max-height:32px; -} - -.gif-export-preview { - max-width:32px; -} - -.png-export-preview img { - max-height:32px; - float: left; -} - -.png-export-preview .light-picker-background { - max-width:240px; -} - -.gif-upload-status { - width: 180px; - margin-left: 5px; - margin-top: 10px; -} - -.gif-upload, -.png-export-preview { - overflow: hidden; -} - -.gif-upload-status, -.gif-export-preview { - float : left; -} - -.preview-upload-ongoing:before{ - content: "Upload ongoing ..."; - position: absolute; - display: block; - height: 100%; - width: 100%; - text-align: center; - padding-top: 45%; - box-sizing:border-box; - -moz-box-sizing:border-box; - background: rgba(0,0,0,0.5); - color: white; -} - -.export-scale { - margin-bottom: 10px; -} - -.export-scale .scale-input { - margin: 5px; - vertical-align: middle; - width: 150px; -} - -.export-scale .scale-text { - height: 31px; - display: inline-block; - line-height: 30px; - width: 40px; - border: 1px solid grey; - box-sizing: border-box; - border-radius: 3px; - text-align: center; -} - -.export-resize { - margin: 10px 0; - overflow: hidden; -} - -.export-resize > * { - float: left; -} - -.export-resize > *:not(:last-child) { - margin-right: 10px; -} - -.export-resize > .resize-field { - width: 70px; -} - -.export-resize > .resize-label { - height: 23px; - line-height: 23px; -} - -.export-tabs { - overflow: hidden; - position: relative; -} - -.export-tabs:after { - content: ""; - display: block; - position: absolute; - bottom: 0; - width: 100%; - height: 1px; - z-index: 0; - background-color: gold; -} - -.export-tab { - float: left; - cursor: pointer; - padding: 5px; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; - /* Make sure the tab and its border are positioned above the :after element; */ - position: relative; - z-index: 1; -} - -.export-tab.selected, -.export-tab:hover { - color: gold; -} - -.export-tab.selected { - border-color: gold; - border-bottom-color: #444; - border-style: solid; - border-width: 1px; -} - -.export-panel-header { - padding: 10px 5px 0px; -} - -.export-info { - font-style: italic; - text-shadow: none; - font-weight: normal; -} - -.export-panel-section { - padding: 5px; - margin-top: 10px; - border: 1px solid #5d5d5d; - border-radius: 2px; -} - -.export-panel-row { - display: flex; - align-items: center; - overflow: hidden; -} - -.export-panel-gif .button { - margin-right: 5px; - width: 75px; - flex-shrink: 0; -} - -.export-panel-png .textfield { - width: 50px; -} - -.png-export-dimension-info, -.png-export-datauri-info { - margin-left: 5px; -} - -#png-export-columns, -#png-export-rows { - /* Override default textfield padding-right to keep the number spinners - aligned to the right. */ - padding-right: 0; -} - -/************************************************************************************************/ -/* Import panel */ -/************************************************************************************************/ - -.import-section, -.resize-section { - margin: 10px 0; -} - -.file-input-button { - margin-right: 8px; - border-radius: 2px; -} - -.import-highlight { - font-weight: bold; - color: white; -} -.resize-section-title { - vertical-align: top; - display: inline-block; - padding-top: 5px; - width: 25%; -} - -/*****************/ -/* ANCHOR WIDGET */ -/*****************/ - -.resize-origin-container { - overflow: hidden; - position: relative; - width: 70px; - margin-top: 5px; - display: inline-block; -} - -.transition .resize-origin-option, -.transition .resize-origin-option:before { - transition: background-color 0.2s, border-color 0.2s; -} - -.resize-origin-option { - float: left; - position: relative; - - box-sizing: border-box; - margin: 0 1px 1px 0; - width: 20px; - height: 20px; - - background : #888; - - font-size: 8px; - text-align: center; - cursor: pointer; -} - -.disabled .resize-origin-option { - cursor: default; - background : #555; - border-color: #555 !important; -} - -.resize-origin-option:hover { - border : 3px solid white; -} - -.resize-origin-option.selected { - border : 3px solid gold; -} - -.resize-origin-option:before { - content: ''; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin: -2px; -} - -.resize-origin-option.selected:before { - content: ''; - width: 4px; - height: 4px; - background: gold; -} - -.disabled .resize-origin-option.selected:before { - background: #555; -} - -.disabled .resize-origin-option[data-neighbor]:before { - border-color: #555 !important; -} - -.resize-origin-option[data-neighbor]:before { - width: 0; - height: 0; - border-width: 4px; - border-style: solid; - border-color: transparent; -} - -.resize-origin-option[data-neighbor="bottom"]:before { - border-top-color: gold; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="left"]:before { - border-right-color: gold; - margin-top: -4px; - margin-left: -6px; -} - -.resize-origin-option[data-neighbor="top"]:before { - border-bottom-color: gold; - margin-top: -6px; - margin-left: -4px; -} - -.resize-origin-option[data-neighbor="right"]:before { - border-left-color: gold; - margin-top: -4px; -} -.save-field { - width: 100%; -} - -.save-status { - margin-top: 10px; - margin-bottom: -10px; - vertical-align: middle; - font-weight: normal; - text-shadow: none; - font-style: italic; -} - -.save-file-name { - white-space: nowrap; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-desktop-file-name { - word-wrap: break-word; - font-weight: bold; - color: white; - font-style: normal; -} - -.save-status-warning-icon { - float: left; - margin-top: 5px; -} - -.save-status-warning-icon { - overflow: hidden; - padding-left: 10px; -} - -.tool-icon { - position : relative; - cursor : pointer; - width: 46px; - height: 46px; - margin: 1px; - background-color: #3a3a3a; -} - -.tool-icon.selected { - cursor: default; - background-color: #444; -} - -.tool-icon.selected:before { - content:""; - position : absolute; - height : 100%; - width : 100%; - border: 3px solid gold; - box-sizing: border-box; -} - -.tool-icon:hover { - background-color: #444; -} - -/* - * Tool cursors: - */ - -.tool-paint-bucket .drawing-canvas-container:hover, -.tool-colorswap .drawing-canvas-container:hover { - cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; -} - -.tool-vertical-mirror-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; -} - -.tool-pen .drawing-canvas-container:hover { - cursor: url(../img/cursors/pen.png) 1 14, pointer; -} - -.tool-dithering .drawing-canvas-container:hover { - cursor: url(../img/cursors/dither.png) 1 14, pointer; -} - -.tool-lighten .drawing-canvas-container:hover { - cursor: url(../img/cursors/lighten.png) 1 15, pointer; -} - -.tool-eraser .drawing-canvas-container:hover { - cursor: url(../img/cursors/eraser.png) 3 14, pointer; -} - -.tool-stroke .drawing-canvas-container:hover { - cursor: url(../img/cursors/stroke.png) 1 14, pointer; -} - -.tool-rectangle .drawing-canvas-container:hover { - cursor: url(../img/cursors/rectangle.png) 5 15, pointer; -} - -.tool-circle .drawing-canvas-container:hover { - cursor: url(../img/cursors/circle.png) 5 15, pointer; -} - -.tool-move .drawing-canvas-container:hover { - cursor: url(../img/cursors/hand.png) 7 7, pointer; -} - -.tool-rectangle-select .drawing-canvas-container:hover, -.tool-lasso-select .drawing-canvas-container:hover { - cursor: crosshair; -} - -.tool-shape-select .drawing-canvas-container:hover { - cursor: url(../img/cursors/wand.png) 10 5, pointer; -} - -.tool-colorpicker .drawing-canvas-container:hover { - cursor: url(../img/cursors/dropper.png) 2 15, pointer; -} - -.swap-colors-button { - position: relative; - top: 50px; - left: 6px; - height: 18px; - width: 18px; - - opacity : 0.3; - - cursor : pointer; -} - -.swap-colors-button:hover { - opacity : 1; -} - -.tool-color-picker { - position:relative; -} - -.tool-color-picker:nth-child(1) { - z-index : 100; -} - -.tool-color-picker:nth-child(2) { - z-index : 90; - margin-top: 25px; - margin-left:-20px; -} - -.tool-color-picker input { - width: 16px; - height: 16px; - text-indent: -10000px; - border: 1px solid black; - background: white; - cursor: pointer; - position : relative; - top: 10px; - margin-left: 2px; -} - -.tool-color-picker .secondary-color-picker { - top : 18px; - margin-left: 0; -} - -.palette-wrapper { - margin-top: 10px; - margin-left: 10px; -} - -.palette-color[data-color=TRANSPARENT] { - position: relative; - top: 10px; - left: 10px; - background-color: white; - height : 16px; - width : 16px; - border: 2px solid #000; - background-size: 16px 16px; - background-position: 0 0; - background-image: -webkit-gradient( - linear, - left top, - right bottom, - color-stop(0, #fff), - color-stop(0.45, #fff), - color-stop(0.5, #ff0000), - color-stop(0.55, #fff), - color-stop(1, #fff) - ); - background-image: -moz-linear-gradient( - left top, - #fff 0%, - #fff 45%, - #f00 50%, - #fff 55%, - #fff 100% - ); -} - - -.pen-size-container { - overflow: hidden; - padding: 5px 5px; -} - -.pen-size-option { - float: left; - box-sizing: border-box; - width: 20px; - height: 20px; - margin-right: 2px; - border-style: solid; - border-width: 2px; - border-color: #444; - cursor: pointer; -} - -.pen-size-option[data-size='1'] { - padding: 5px; -} -.pen-size-option[data-size='2'] { - padding: 4px; -} -.pen-size-option[data-size='3'] { - padding: 3px; -} -.pen-size-option[data-size='4'] { - padding: 2px; -} - -.pen-size-option:before { - content: ''; - width: 100%; - height: 100%; - background-color: white; - display: block; - text-align: center; - line-height: 12px; - font-size: 90%; -} - -.pen-size-option:hover { - border-color: #888; -} - -.pen-size-option.selected:before { - background-color: gold; -} - -.pen-size-option.selected { - border-color: gold; -} - -.pen-size-option.labeled:before { - content: attr(real-pen-size); - color: black; -} - -/* -Icon classes can be used entirely standalone. They are named after their original file names. - -Example usage in HTML: - -`display: block` sprite: -

                                            - -To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: - -// CSS -.icon { - display: inline-block; -} - -// HTML - -*/ -.icon-common-keyboard-gold { - background-image: url(../img/icons.png); - background-position: 0px -230px; - width: 36px; - height: 21px; -} -.icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons.png); - background-position: -230px -107px; - width: 18px; - height: 18px; -} -.icon-common-warning-red { - background-image: url(../img/icons.png); - background-position: -230px -86px; - width: 21px; - height: 21px; -} -.icon-frame-dragndrop-white { - background-image: url(../img/icons.png); - background-position: -230px -30px; - width: 30px; - height: 30px; -} -.icon-frame-duplicate-white { - background-image: url(../img/icons.png); - background-position: -230px 0px; - width: 30px; - height: 30px; -} -.icon-frame-plus-white { - background-image: url(../img/icons.png); - background-position: -230px -60px; - width: 26px; - height: 26px; -} -.icon-frame-recyclebin-white { - background-image: url(../img/icons.png); - background-position: -184px -184px; - width: 30px; - height: 30px; -} -.icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons.png); - background-position: -230px -143px; - width: 18px; - height: 18px; -} -.icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons.png); - background-position: -230px -125px; - width: 18px; - height: 18px; -} -.icon-settings-export-white { - background-image: url(../img/icons.png); - background-position: -138px 0px; - width: 46px; - height: 46px; -} -.icon-settings-gear-white { - background-image: url(../img/icons.png); - background-position: -138px -46px; - width: 46px; - height: 46px; -} -.icon-settings-open-folder-white { - background-image: url(../img/icons.png); - background-position: -138px -92px; - width: 46px; - height: 46px; -} -.icon-settings-resize-white { - background-image: url(../img/icons.png); - background-position: 0px -138px; - width: 46px; - height: 46px; -} -.icon-settings-save-white { - background-image: url(../img/icons.png); - background-position: -46px -138px; - width: 46px; - height: 46px; -} -.icon-tool-circle { - background-image: url(../img/icons.png); - background-position: -92px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorpicker { - background-image: url(../img/icons.png); - background-position: -138px -138px; - width: 46px; - height: 46px; -} -.icon-tool-colorswap { - background-image: url(../img/icons.png); - background-position: 0px 0px; - width: 46px; - height: 46px; -} -.icon-tool-dithering { - background-image: url(../img/icons.png); - background-position: -184px -46px; - width: 46px; - height: 46px; -} -.icon-tool-eraser { - background-image: url(../img/icons.png); - background-position: -184px -92px; - width: 46px; - height: 46px; -} -.icon-tool-lasso-select { - background-image: url(../img/icons.png); - background-position: -184px -138px; - width: 46px; - height: 46px; -} -.icon-tool-lighten { - background-image: url(../img/icons.png); - background-position: 0px -184px; - width: 46px; - height: 46px; -} -.icon-tool-move { - background-image: url(../img/icons.png); - background-position: -46px -184px; - width: 46px; - height: 46px; -} -.icon-tool-paint-bucket { - background-image: url(../img/icons.png); - background-position: -92px -184px; - width: 46px; - height: 46px; -} -.icon-tool-pen { - background-image: url(../img/icons.png); - background-position: -138px -184px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle-select { - background-image: url(../img/icons.png); - background-position: -184px 0px; - width: 46px; - height: 46px; -} -.icon-tool-rectangle { - background-image: url(../img/icons.png); - background-position: -92px -92px; - width: 46px; - height: 46px; -} -.icon-tool-shape-select { - background-image: url(../img/icons.png); - background-position: -46px -92px; - width: 46px; - height: 46px; -} -.icon-tool-stroke { - background-image: url(../img/icons.png); - background-position: 0px -92px; - width: 46px; - height: 46px; -} -.icon-tool-vertical-mirror-pen { - background-image: url(../img/icons.png); - background-position: -92px -46px; - width: 46px; - height: 46px; -} -.icon-tool-center { - background-image: url(../img/icons.png); - background-position: -92px 0px; - width: 46px; - height: 46px; -} -.icon-tool-clone { - background-image: url(../img/icons.png); - background-position: -46px -46px; - width: 46px; - height: 46px; -} -.icon-tool-flip { - background-image: url(../img/icons.png); - background-position: 0px -46px; - width: 46px; - height: 46px; -} -.icon-tool-rotate { - background-image: url(../img/icons.png); - background-position: -46px 0px; - width: 46px; - height: 46px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - .icon-common-keyboard-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-swapcolors-arrow-grey { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-common-warning-red { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-dragndrop-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-duplicate-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-plus-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-frame-recyclebin-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-gold { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-minimap-popup-preview-arrow-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-export-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-gear-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-open-folder-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-resize-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-settings-save-white { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-circle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorpicker { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-colorswap { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-dithering { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-eraser { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lasso-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-lighten { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-move { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-paint-bucket { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rectangle { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-shape-select { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-stroke { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-vertical-mirror-pen { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-center { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-clone { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-flip { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } - .icon-tool-rotate { - background-image: url(../img/icons@2x.png); - background-size: 260px 251px; - } -} - -.color-picker-slider * { - box-sizing: border-box; -} - -.color-picker-slider input[type="range"] { - -webkit-appearance: none; - -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - width: 100%; - border: none; - padding: 1px 2px; - border-radius: 3px; - background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); - box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; - outline: none; /* no focus outline */ -} - -/* thumb */ - -.color-picker-slider input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - cursor:pointer; - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ - background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} -.color-picker-slider input[type="range"]::-moz-range-thumb { - width: 7px; - height: 18px; - border: none; - border-radius: 2px; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -.color-picker-slider input[type="range"]::-ms-thumb { - width: 7px; - height: 18px; - border-radius: 2px; - border: 0; - background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ -} - -/*CROSS BROWSER RESET*/ - - -.color-picker-slider input[type="range"]::-moz-range-track { - border: inherit; - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-track { - border: inherit; - color: transparent; /* don't drawn vertical reference line */ - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-fill-lower, -.color-picker-slider input[type="range"]::-ms-fill-upper { - background: transparent; -} - -.color-picker-slider input[type="range"]::-ms-tooltip { - display: none; -} - -.color-picker-slider, -.color-picker-input { - padding: 0 10px; - height : 25px; - overflow: hidden; -} - -.color-picker-slider span{ - line-height : 25px; - width : 10px; - float:left; -} - -.color-picker-slider input[type="range"]{ - float:left; - height : 10px; - width : 100px; - margin: 7px 1px 7px 8px; -} - -.color-picker-slider input[type="text"]{ - float:left; - width : 47px; - margin-left: 5px; -} - -.color-picker-input { - margin-bottom: 10px; -} - -.color-picker-input .textfield{ - width:100%; -} - -.color-picker-slider input[type="range"][data-dimension="h"] { - background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} -#dialog-container-wrapper { - position: absolute; - z-index: 20000; - - top: 0; - right: 0; - bottom: 0; - left: 0; - - padding: 50px 150px; - overflow: hidden; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - background-color: rgba(0,0,0,0.8); - opacity: 0; - pointer-events: none; - - color: white; -} - -#dialog-container-wrapper.animated { - transition: opacity 0.2s; -} - -#dialog-container-wrapper.show { - opacity: 1; - pointer-events: auto; -} - -#dialog-container { - width: 100%; - height: 100%; - - margin-top: -1500px; - - box-sizing: border-box; - -moz-box-sizing : border-box; - - border-radius: 3px; - border : 3px solid gold; - background: #444; - overflow: auto; -} - -.show #dialog-container { - margin-top: 0; -} - -#dialog-container.browse-local { - width: 700px; - height: 500px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -350px; -} - -.show #dialog-container.browse-local { - margin-top: -250px; -} - -.dialog-wrapper { - height: 100%; - position : relative; -} - -.dialog-content { - position: absolute; - top: 45px; - bottom: 0; - width: 100%; - box-sizing: border-box; -} - -.dialog-head { - width: 100%; - background: gold; - margin: 0; - padding: 10px; - color: black; - font-size: 1.8em; - height: 45px; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -.dialog-close { - position: absolute; - top: 0; - right: 0; - line-height: 45px; - margin-right: 10px; - font-size: 1.3em; - cursor: pointer; -} - -/************************************************************************************************/ -/* Browse local piskels panel */ -/************************************************************************************************/ - -.local-piskel-list { - width: 100%; -} - -.local-piskel-item { - height: 3em; -} - -.local-piskel-name { - width: 40%; -} - -.local-piskel-save-date { - font-weight : normal; -} - -.local-piskel-list a { - text-decoration: none; -} - -.local-piskel-list a:hover { - text-decoration: underline; -} - -.local-piskel-list-head { - font-weight: bold; - color: gold; -} - -.local-piskel-load-button, -.local-piskel-delete-button { - width : 75px; -} -.cheatsheet-link { - position: fixed; - bottom: 10px; - left: 10px; - - color : gold; - font-weight: bold; - font-size : 1.25em; - line-height: 20px; - - cursor: pointer; - - opacity: 0.5; - z-index: 11000; - transition : opacity 0.3s; -} - -.cheatsheet-link:hover { - opacity: 1; -} - -.cheatsheet-container { - box-sizing: border-box; - display: block; - - bottom: 46px; - padding: 20px 3%; - border-radius: 3px; - background-color: rgba(0,0,0,0.9); - overflow: auto; -} - -.cheatsheet-container .cheatsheet-title { - font-size:24px; - margin-top: 30px; -} - -.cheatsheet-container .cheatsheet-title:nth-of-type(1) { - margin-top: 0; -} - -.cheatsheet-section { - box-sizing: border-box; - float: left; - - vertical-align: top; - padding : 0 20px 20px 20px; - min-width: 300px; -} - -.cheatsheet-boxes { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - float: left; -} - -@media (min-width: 1300px) { - .cheatsheet-container > div { - width: 33%; - } - .cheatsheet-boxes { - flex-direction: column; - } -} - -.cheatsheet-shortcut { - overflow: hidden; - margin: 10px 0; -} - -.cheatsheet-icon.tool-icon { - float: left; - - height: 30px; - width: 30px; - margin: 0 10px 0 0; - background-size: 30px 30px; -} - -.cheatsheet-description { - color: white; - font-size : 14px; - margin-left: 10px; - line-height : 30px; -} - -.cheatsheet-key { - box-sizing: border-box; - display : inline-block; - height: 30px; - line-height: 26px; - padding: 0 10px; - - border : 2px solid white; - border-radius: 2px; - - text-align: center; - font-family: monospace; - font-weight: bold; - font-size : 18px; - color: white; -} - -.cheatsheet-shorcut-conflict .cheatsheet-key { - border-color: red; - color: red; -} - -.cheatsheet-shortcut-editable { - cursor : pointer; -} - -.cheatsheet-shortcut-editable .cheatsheet-key { - border-color: gold; - color: gold; -} - -.cheatsheet-shortcut-editing .cheatsheet-key { - animation: fade .5s infinite; -} - -.cheatsheet-shortcut-undefined .cheatsheet-key { - border-color: red; - color: red; -} - -/*Cheatsheet actions*/ - -.cheatsheet-actions { - position: absolute; - box-sizing: border-box; - - bottom : 0; - left : 0; - right : 0; - height : 46px; - - padding : 10px; - overflow: hidden; - - background-color : gold; -} - -.cheatsheet-helptext { - font-size: 14px; - height : 26px; - line-height : 26px; - color: black; -} - -.cheatsheet-helptext-tooltip { - text-align: left; -} - -.cheatsheet-helptext-tooltip-item { - line-height: 0.9em; - margin: 10px 0; -} - -.cheatsheet-button { - position: absolute; - bottom: 10px; - right: 10px; -} - - -.cheatsheet-icon-tool-circle { - background-image: url(../img/icons/tools/tool-circle.png); -} - -.cheatsheet-icon-tool-colorpicker { - background-image: url(../img/icons/tools/tool-colorpicker.png); -} - -.cheatsheet-icon-tool-colorswap { - background-image: url(../img/icons/tools/tool-colorswap.png); -} - -.cheatsheet-icon-tool-dithering { - background-image: url(../img/icons/tools/tool-dithering.png); -} - -.cheatsheet-icon-tool-eraser { - background-image: url(../img/icons/tools/tool-eraser.png); -} - -.cheatsheet-icon-tool-lasso-select { - background-image: url(../img/icons/tools/tool-lasso-select.png); -} - -.cheatsheet-icon-tool-lighten { - background-image: url(../img/icons/tools/tool-lighten.png); -} - -.cheatsheet-icon-tool-move { - background-image: url(../img/icons/tools/tool-move.png); -} - -.cheatsheet-icon-tool-paint-bucket { - background-image: url(../img/icons/tools/tool-paint-bucket.png); -} - -.cheatsheet-icon-tool-pen { - background-image: url(../img/icons/tools/tool-pen.png); -} - -.cheatsheet-icon-tool-rectangle-select { - background-image: url(../img/icons/tools/tool-rectangle-select.png); -} - -.cheatsheet-icon-tool-rectangle { - background-image: url(../img/icons/tools/tool-rectangle.png); -} - -.cheatsheet-icon-tool-shape-select { - background-image: url(../img/icons/tools/tool-shape-select.png); -} - -.cheatsheet-icon-tool-stroke { - background-image: url(../img/icons/tools/tool-stroke.png); -} - -.cheatsheet-icon-tool-vertical-mirror-pen { - background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); -} - -#dialog-container.create-palette { - width: 500px; - height: 600px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.create-palette { - margin-top: -300px; -} - -.create-palette-section { - position: absolute; - left: 10px; - top: 50px; -} - -.create-palette-import-section { - display : inline-block; -} - -.colors-container { - position: absolute; - - left: 10px; - right: 10px; - top: 85px; - - height: 460px; - - border: 1px solid black; - background: #333; -} - -.color-picker-container { - position:absolute; - left : 280px; - top:0; - bottom:0; - right:0; - background: #222; -} - -.create-palette-actions { - position: absolute; - box-sizing: border-box; - - width:100%; - height: 45px; - - left: 0; - right: 0; - bottom: 0; - - padding:10px; - text-align:right; -} - -.color-preview { - width: 170px; - height: 70px; - margin: 11px; -} - -.colors-list { - overflow: auto; - width: 280px; - box-sizing: border-box; - height: 100%; - padding-bottom: 10px; -} - -.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - position:relative; - float : left; - - width : 44px; - height : 44px; - margin : 10px 0 0 10px; - - box-sizing : border-box; - - cursor : pointer; -} - -@-moz-document url-prefix() { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ - margin : 7px 0 0 7px; - } -} - - -.create-palette-color { - border:1px solid #2c2c2c; - transition : border-color 0.2s; -} -.create-palette-color:hover { - border:1px solid gold; -} - -.colors-list-drop-proxy { - border:2px dotted #eee; -} - -.create-palette-new-color { - border:2px dotted gold; - - border-radius: 2px; - line-height: 40px; - text-align: center; - font-size: 20px; - color: gold; -} - -.create-palette-color.selected { - border:2px solid gold; -} - -.create-palette-remove-color { - position: absolute; - top: 0; - right: 0; - padding: 2px 4px 0 0; - opacity : 0.2; - - font-weight: bold; - color: rgb(255,255,255); - text-shadow : 0 0 1px rgb(0,0,0); - - transition : opacity 0.3s, color 0.1s; -} - -.light-color .create-palette-remove-color { - color: rgb(0,0,0); - text-shadow : 0 0 1px rgb(255,255,255); -} - -.selected .create-palette-remove-color { - top: -1px; - right: -1px; -} - -.create-palette-color:hover .create-palette-remove-color { - opacity: 0.6; -} - -.create-palette-color .create-palette-remove-color:hover { - opacity: 1; - color: rgb(240,80,80); - text-shadow : 0 0 1px rgb(0,0,0); -} - -/*SPECTRUM OVERRIDES*/ - -.create-palette .sp-container{ - background-color: transparent; - border: none; - box-shadow : none; - border-radius:0; - padding:5px; -} -/************************************************************************************************/ -/* Import dialog */ -/************************************************************************************************/ - -#dialog-container.import-image { - width: 550px; - height: 360px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; -} - -.show #dialog-container.import-image { - margin-top: -150px; -} - -.import-subsection { - margin-left: 25px; -} - -.import-section:not(.import-subsection) > .dialog-section-title { - width: 50px; -} - -.import-section-preview-title { - position: absolute; - margin-left: 50%; - margin-top: -28px; -} - -.import-section-preview { - position: absolute; - display: inline-block; - border: 1px dashed #999; - border-radius: 3px; - margin-left: 50%; -} - -.import-section-preview img { - max-width: 220px; - max-height: 220px; - display: block; -} - -.import-section-preview.no-border { - border-color: transparent; -} - -.import-section-preview canvas { - position: absolute; - left: 0; - top: 0; -} - -.dialog-section-title { - display : inline-block; - width: 80px; -} - -.dialog-section-radio { - margin-top: 15px; - vertical-align: sub; -} - -.import-size-field:nth-of-type(2) { - margin-left: 5px; -} - -.import-image-file-name { - display: inline-block; - overflow: hidden; - - width: 200px; - vertical-align: middle; - - word-break : break-all; - white-space: nowrap; - text-overflow: ellipsis; - - font-style: italic; - font-weight: normal; - text-shadow: none; - color: gold; -} - -[name=smooth-resize-checkbox] { - margin : 0 8px; -} - -.dialog-import-body { - padding: 10px 20px; - font-size:1.3em -} - -.import-button { - font-size: 1em; - height: 28px; - padding: 0px 10px; - margin-top: 15px; -} -.performance-link { - display: none; - position: fixed; - bottom: 10px; - right: 10px; - z-index: 11000; - cursor: pointer; - opacity: 0; - transition : opacity 0.3s; -} - -.performance-link.visible { - display: block; - opacity: 0.66; - animation: glow 2s infinite; -} - -.performance-link.visible:hover { - opacity: 1; - animation: none; -} - -#dialog-container.performance-info { - width: 500px; - height: 525px; - top : 50%; - left : 50%; - position : absolute; - margin-left: -250px; - margin-top: -260px; - -} - -.dialog-performance-info-body { - font-size: 13px; - letter-spacing: 1px; - padding: 10px 20px; -} - -.dialog-performance-info-body ul { - border: 1px solid #666; - padding: 5px; - border-radius: 3px; -} - -.dialog-performance-info-body li { - list-style-type: initial; - margin: 0 20px; -} - -.dialog-performance-info-body sup { - color: gold; - cursor: pointer; -} - -.show #dialog-container.performance-info { - margin-top: -300px; -} - -.dialog-performance-info-body .warning-icon { - float: left; - margin-top: 10px; -} - -.dialog-performance-info-body .warning-icon-info { - overflow: hidden; - margin-left: 30px; -} - -/************************************************************************************************/ -/* Unsupported browser dialog */ -/************************************************************************************************/ - -#dialog-container.unsupported-browser { - width: 600px; - height: 260px; - top : 50%; - left : 50%; - position : absolute; - margin-top: -130px; - margin-left: -300px; -} - -.unsupported-browser .dialog-content { - font-size:1.2em; - letter-spacing: 1px; - padding:10px 20px; - overflow: auto; -} - -.unsupported-browser .supported-browser-list { - padding: 5px 20px; -} - -.unsupported-browser .supported-browser-list li { - list-style-type: square; -} - -#current-user-agent { - color: gold; -} - -.user-message { - position: absolute; - right: 0; - bottom: 0; - padding: 10px 47px; - max-width: 300px; - - border-top-left-radius: 7px; - border: #e1a325 2px solid; - border-right: 0; - border-bottom: 0; - - color: #222; - background-color: gold; - - font-weight: bold; - font-size: 13px; - - z-index: 30000; -} - -.user-message .close { - position: absolute; - top: 6px; - right: 17px; - - font-size: 18px; - font-weight: bold; - - cursor: pointer; -} - -.user-message .close:hover { - color: black; -} - -.progress-bar-container { - position: absolute; - left: 0; - bottom: 0; - padding: 10px; - width: 360px; - border-top-right-radius: 2px; - border: gold 2px solid; - border-left: 0; - border-bottom: 0; - background-color: #444; - font-size: 14px; - z-index: 30000; - color: #eee; -} - -.progress-bar-item { - float: left; - height:20px; -} - -.progress-bar-status { - line-height: 20px; - width : 40px; - overflow : hidden; - margin: 0 0 0 10px; -} - -.progress-bar { - border : 1px solid grey; - margin-top: 8px; - height : 4px; - width : 300px; - background : linear-gradient(to left, gold, gold) no-repeat -300px 0; - background-color : black; -} -.toolbox-container { - border: 2px solid #888; - font-size: medium; - color: white; - text-align: left; - border-radius: 2px; - margin-top: 5px; - overflow: hidden; -} - -.toolbox-title { - padding: 8px; - margin: 0; - font-size: 15px; - /* reset for firefox */ - height: 16px; - background: #222; -} - -.toolbox-buttons { - flex-shrink: 0; - overflow: hidden; - border-top: 1px solid #666; - border-bottom: 1px solid #222; -} - -.toolbox-buttons .button { - /* Override border propery on .button elements from form.css */ - border-style: solid; - border-color: #333; - border-width: 0 1px 0 0; - border-radius: 0; - - background-color: #3f3f3f; -} - -.toolbox-buttons .button[disabled], -.toolbox-buttons .button[disabled]:hover { - background-color: #aaa; -} - -.toolbox-buttons button:last-child { - border-right-width: 0; -} - - -/** - * Layers container - */ -.layers-list-container { - min-height: 85px; - display: flex; - flex-direction: column; -} - -/** - * Layers title and toggle preview - */ - -.layers-title { - position: relative; - flex-shrink: 0; -} - -.layers-toggle-preview { - position: absolute; - top: 0.3em; - right: 0.5em; - - color: #999; - font-size: 1.3em; - cursor: pointer; - - transition: 0.2s linear; -} - -.layers-toggle-preview:hover { - color: white; -} - -.layers-toggle-preview-enabled, -.layers-toggle-preview-enabled:hover { - color : gold; -} - -/** - * Layers buttons - */ - -.layers-button { - margin: 0; - width: 16.66667%; - float : left; -} - -/** - * Layers list - */ - -.layers-list { - font-size : 12px; - overflow: auto; -} - -.layer-item { - position: relative; - display: flex; - height:24px; - line-height: 24px; - border-top: 1px solid #444; - cursor: pointer; -} - -.layer-item .layer-name { - padding: 0 0 0 10px; - flex: 1 auto; - white-space: nowrap; -} - -.layer-item .layer-name.overflowing-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.layer-item:hover { - background : #222; -} - -.layer-item-opacity { - padding-right: 8px; -} - -.current-layer-item, -.current-layer-item:hover { - background : #333; - color: gold; -} -.palettes-list-container { - min-height: 100px; - display: flex; - flex-direction: column; -} - -.palettes-title { - flex-shrink: 0; - background-size: 22px; - background-repeat: no-repeat; - background-position: 97%; -} - -/** - * Palettes action buttons - */ - -.palettes-list-container .toolbox-buttons { - background-color: #3f3f3f; - height: 24px; - padding: 0; -} - -.palettes-list-button, -.palettes-list-select { - margin: 0; - float: left; -} - -.palettes-list-button { - width: 16.66667%; -} - -.palettes-list-select { - width: 66.66667%; - height: 100%; - padding: 0 5px 0 5px; - - color: #aaa; - font-size : 0.75em; - - text-align:left; - font-weight: normal; - - transition : background-color 0.3s, color 0.3s; - cursor:pointer; -} - -.palettes-list-select:hover, -.palettes-list-select:focus { - background-color: #484848; - color: white; -} - -.palettes-list-select:focus { - outline: none; -} - -/* - * Palette colors list - */ - -.palettes-list-colors { - height: 100%; - max-height: 160px; - overflow: auto; - padding-top: 5px; -} - -.palettes-list-color { - cursor: pointer; - float: left; - margin: 0 0 5px 5px; - width: calc((100% - 30px) / 5); - height: 32px; - position: relative; -} - -.palettes-list-color div { - height: 100%; -} - -/* - * Placeholder when no color is available in the current palette - */ - -.palettes-list-no-colors { - height: 35px; - line-height: 35px; - width: 100%; - color: gray; - font-size: 0.7em; - font-style: italic; - text-align: center -} - -/* - * Primary and secondary color markers - */ - -.palettes-list-primary-color:before, .palettes-list-secondary-color:before { - content: ""; - position: absolute; - bottom: 1px; - display: inline-block; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); - width: 14px; - height: 14px; -} - -.palettes-list-primary-color:before { - left: 1px; -} - -.palettes-list-secondary-color:before { - right: 1px; - background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); -} - -/* - * Color index for the 9 first colors - */ - -.palettes-list-color:nth-child(-n+10):after { - position: absolute; - top: 0; - right: 0; - - background-color: black; - color: gold; - - font-family: Tahoma; - font-size: 0.5em; - font-weight: bold; - - padding: 2px 3px 2px 3px; - border-radius: 0 0 0 2px; -} - -.palettes-list-color:nth-child(1):after { - content: "1"; -} - -.palettes-list-color:nth-child(2):after { - content: "2"; -} - -.palettes-list-color:nth-child(3):after { - content: "3"; -} - -.palettes-list-color:nth-child(4):after { - content: "4"; -} - -.palettes-list-color:nth-child(5):after { - content: "5"; -} - -.palettes-list-color:nth-child(6):after { - content: "6"; -} - -.palettes-list-color:nth-child(7):after { - content: "7"; -} - -.palettes-list-color:nth-child(8):after { - content: "8"; -} - -.palettes-list-color:nth-child(9):after { - content: "9"; -} - -/** - * Animated preview styles. - */ - -.preview-container { - flex-shrink: 0; - - border : 0 Solid black; - border-radius:5px 0 0 5px; - box-shadow : 0 0 2px rgba(0,0,0,0.2); - font-size: 0; -} - -.preview-container .canvas-container { - overflow : hidden; -} - -.preview-container canvas { - border : 0 Solid transparent; -} - -.canvas-container .animated-preview-canvas-background { - position : relative; - height: 100%; -} - -#animated-preview-container { - background: #333; - border-radius : 0 0 2px 2px; - overflow : hidden; -} - -.canvas-container-wrapper { - height :200px; - width : 200px; - overflow:hidden; -} - -.preview-container .background-image-frame-container { - height: 100%; - width: 100%; - position: relative; - background-position: center; -} - -.display-fps { - float: left; - color: #aaa; - font-size: 12px; - min-width: 55px; - vertical-align: bottom; - line-height: 26px; -} - -.range-fps { - overflow: hidden; - width: 100px; - height : 26px; - margin : 0; - box-sizing: border-box; -} - -.preview-toggle-onion-skin { - font-size: 2rem; - color: #aaa; - float: left; - line-height: 26px; - height: 100%; - padding-left: 5px; - padding-right: 5px; - border-right: 1px solid #222; - transition: 0.2s linear; - cursor:pointer; -} - -.preview-toggle-onion-skin:hover { - color : white; -} - -.preview-toggle-onion-skin-enabled, -.preview-toggle-onion-skin-enabled:hover { - color : gold; -} - -.preview-contextual-actions { - position : absolute; - z-index: 500; - right : 10px; - top : 10px; - - cursor : pointer; - - opacity: 0; - transition: 0.3s opacity, 0.3s border-color; -} - -.minimap-container:hover .preview-contextual-actions { - opacity: 1; -} - -.preview-contextual-action { - float: left; - - width : 18px; - height: 18px; - line-height: 18px; - margin: 0 5px; - - border: 2px solid white; - background-color: rgba(0, 0, 0, 0.3); - color: white; - - font-size: 10px; - font-weight: bold; - font-family: Tahoma; -} - -.preview-contextual-action-hidden { - display: none; -} - -.preview-contextual-action:hover { - color: gold; - border-color: gold; -} - -/** - * Drop-down in preview size selection - */ -.preview-drop-down { - float: left; - position: relative; - width : 22px; - min-height: 22px; - margin: 0 5px; -} - -.preview-drop-down.preview-drop-down-disabled { - opacity: 0.5; -} - -.preview-disable-overlay{ - position: absolute; - width: 100%; - height: 100%; - display: none; -} - -.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { - display: block; - z-index: 10; -} - -.preview-drop-down .preview-contextual-action { - position: relative; - margin: 0 0 -100% 0; - opacity: 0; - transition: opacity linear .2s, - margin linear .2s; - transition-delay: 0s, .2s; - z-index: 1; -} - -.preview-drop-down:hover .preview-contextual-action { - margin: 0 0 5px 0; - opacity: 1; - transition-delay: 0s, 0s; -} - -.preview-drop-down .size-button-selected { - opacity: 1; - color: gold; - border-color: gold; - z-index: 5; -} - - -.open-popup-preview-button { - border : 2px solid white; - background-color : rgba(0,0,0,0.3); -} - -.open-popup-preview-button:hover { - border-color: gold; -} - -/** - * The regular image is provided by the sprite icons.png+icons.css - */ -.icon-minimap-popup-preview-arrow-white:hover { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); - background-position: 0 0; - background-size: 18px 18px; -} - -@media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 192dpi) { - background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); - -} - -.transformations-container { - flex-shrink: 0; -} - -.transformations-container .tool-icon { - float:left; -} - -/*** -Spectrum Colorpicker v1.1.2 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue -{ - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top -{ - margin-bottom: 3px; -} -.sp-color, .sp-hue -{ - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error -{ - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container -{ - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container -{ - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container -{ - border-right: solid 1px #ccc; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el -{ - position:relative; -} - -/* Initial */ -.sp-initial -{ - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -/* Buttons */ -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview -{ - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette -{ - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el -{ - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container -{ - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel -{ - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover -{ - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active -{ - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el -{ - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner -{ - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner -{ - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner -{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -/** - * Piskel specific CSS for spectrum widgets - */ - -/* Widget's main container */ -.sp-container { - border-radius: 4px; - background-color: #2B2B2B; - border: solid 4px #888; - padding: 5px 5px 0 5px; - box-shadow : 0 0 5px 0 black; -} - -.sp-container[data-y-position=bottom] { - border-top-left-radius: 0; -} - -.sp-container[data-y-position=top] { - border-bottom-left-radius: 0; -} - -/* Color square container */ -.sp-color, .sp-hue { - border : 1px solid #222; -} - -/* Remove the padding on the input container */ -.sp-replacer { - padding: 4px; - height: 100%; - border-width: 0; - box-sizing: border-box; - -moz-box-sizing:border-box; - background-color: #444; -} - -.sp-replacer:hover { - background-color: #888; -} - -/* Hide the triangle */ -.sp-dd { - display: none; -} - -/* */ -.sp-preview { - margin-right: 0; - height: 100%; - width: 39px; - border-width: 0; -} - -.sp-palette-row-selection { - max-width: 62px; -} - -.sp-palette .sp-thumb-el { - margin : 0 5px 5px 0; - width: 24px; - height: 24px; - border-color: #444; - -} - -.sp-picker-container, .sp-palette-container { - padding-top: 5px; - padding-right: 5px; - padding-left: 5px; - border-left-width: 0; - border-right-width: 0; -} - -.sp-picker-container { - padding: 5px; - padding-bottom: 300px; - margin-bottom: -295px; -} - -.sp-slider { - height: 5px; - left: -2px; - right: -2px; - border: 2px solid white; - background: rgba(255,255,255,0); - opacity: 1; - border-radius: 2px; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-dragger { - border-radius: 8px; - height: 12px; - width: 12px; - border: 2px solid white; - background: none; - box-sizing:border-box; - -moz-box-sizing:border-box; - box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); -} - -.sp-palette .sp-thumb-el.sp-thumb-active { - border-color: gold; - box-shadow: 0 0 0px 1px gold; -} - -.sp-input { - border: 1px solid #666; - margin: 0; - background: #111; - border-radius: 2px; - color: #D3D3D3; - font-family: monospace!important; -} - -.sp-input.sp-validation-error { - background: #330000; -} -/*! - * Bootstrap v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.tooltip { - position: absolute; - z-index: 30000; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; -} -.tooltip.right { - margin-left: 3px; -} -.tooltip.bottom { - margin-top: 3px; -} -.tooltip.left { - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} - -.tooltip { - line-height: 20px; -} - -.tooltip.in { - opacity: 0.95; - filter: alpha(opacity=95); -} - -.tooltip { - line-height: 20px; -} -.preview-list-wrapper { - position: relative; - height: 100%; - overflow: hidden; -} - -.preview-list-scroller { - overflow-y: scroll; - overflow-x: hidden; - height: 100%; -} - -.top-overflow, -.bottom-overflow { - height: 20px; - position: absolute; - left: 0; - right: 12px; - - -webkit-transition: all 500ms ease-out; - -moz-transition: all 500ms ease-out; - -ms-transition: all 500ms ease-out; - -o-transition: all 500ms ease-out; - transition: all 500ms ease-out; - - background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), - linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); - background-size: 30px 40px; - background-repeat: repeat-x; - background-position: 3px 0; - z-index: 10; -} - -.top-overflow { - top: -20px; -} - -.bottom-overflow { - bottom: -20px; - background-position: 3px -20px; -} - -.top-overflow-visible .top-overflow { - top: 0; -} - -.bottom-overflow-visible .bottom-overflow { - bottom: 0; -} - -.preview-list { - list-style-type: none; - padding-right: 9px; -} - -.add-frame-action { - margin-top: 8px; - padding: 6px 0; - overflow: hidden; - width: 96px; - - border: #888 solid 3px; - border-radius: 4px; - - color: #888; - background-color: #222; - font-size: 13px; - cursor: pointer; -} - -.add-frame-action-icon { - margin: 3px; - float: left; -} - -.add-frame-action .label { - overflow: hidden; - text-align: left; -} - -.add-frame-action:hover { - border-color: gold; -} - -.preview-tile { - position: relative; - border: #444 3px solid; - border-radius: 3px; - margin: 5px 0; - width: 96px; - height: 96px; -} - -.preview-tile:first-child { - margin-top: 0; -} - -.preview-tile:hover { - border: #999 3px solid; -} - -.tile-view { - position : relative; -} - -.preview-tile .tile-overlay { - z-index: 10; - position: absolute; - background-color: rgba(100, 100, 100, 0.6); - opacity: 0; - height: 30px; - width: 30px; - border: none; -} - -.preview-tile:hover .tile-overlay { - opacity: 1.0; -} - -.preview-tile .tile-overlay.tile-count { - display: block; - opacity: 1.0; - border-bottom-right-radius: 3px; - top: 0; - left: 0; - font-size: 14px; - line-height: 30px; - color: white; - font-weight: bold; - text-align: center; - cursor: default; -} - -.preview-tile .tile-overlay.delete-frame-action { - top: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.duplicate-frame-action { - bottom: 0; - right: 0; - border-bottom-left-radius: 3px; - cursor: pointer; -} - -.preview-tile .tile-overlay.dnd-action { - bottom: 0; - left: 0; - border-top-right-radius: 3px; - cursor: move; -} - -.preview-tile.selected { - border-color: gold; -} - -.preview-tile.selected:after { - content: ""; - position: absolute; - top: 38px; - right: -9px; - border: transparent 4px solid; - border-left-color: gold; - border-width: 6px 0 6px 6px; - border-style: solid; -} - - -/** - * Drag n drop styles. - */ - -.preview-tile-drop-proxy { - border: 3px dashed gold; - background-color: rgba(255, 215,0, 0.2); -} - -.minimap-crop-frame { - position: absolute; - border: 2px solid gold; - z-index: 100; - box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; -} \ No newline at end of file diff --git a/clear_capped_v2/img/canvas-backgrounds/canvas-background-light.png b/clear_capped_v2/img/canvas-backgrounds/canvas-background-light.png deleted file mode 100644 index d11f6acd9d9f3a9d245446e703d27d6063a2cbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^xl_H+M9WCij$3p^r= z85p<)K$vl@^4?OQpj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9ish**M!Iz?iKvhwm zE{-7{-fzz?3$6Wp)I~Ph(G$b5}H3_P)u~3up_2r>mdK II;Vst0P*=nD*ylh diff --git a/clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png b/clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png deleted file mode 100644 index 9f8f188e275a3b66aeb10d56b1c42e333c060334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?4#uWfniGRt5@5mAFQf1m~xf zlqVLYG6W=M=9TFAxrQi|8S9zq85$UTDOw0r747Nb7~FVdQ&MBb@0CHMUUH||9 diff --git a/clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png b/clear_capped_v2/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png deleted file mode 100644 index acd57cdee51965cb440415dbf46b08f446772866..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d+4#6QOkP~xHV-HyRpJ^^5}cn_ zQl40p$`Fv4nOCCc=Nh6=W~^tbXJ}yXrD!2gRkWvzV~B_M+p`OK84P%s55C(UA2?03 za^@bc!!;@oM1P(+{#SuJ(n=uZrNe~O`UdSkoRKFkH7a3LyE@pAMX1UdpX7UE=rtdq8U#JYD@<);T3K0RT{TQ#Swr diff --git a/clear_capped_v2/img/canvas-backgrounds/canvas-background-medium.png b/clear_capped_v2/img/canvas-backgrounds/canvas-background-medium.png deleted file mode 100644 index a90cd46c1ed87d8dea055869cd26a9decc69287b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={W7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h7I;J!Gca%qfiUBxyLEqng6t)pzOL+d*?2{Hm<{;9GXjOAN?apKg7ec# z$`gxH83GbB^GfvmTtgJfjP*?Q3=Isv6fFd*it==E4Ds-Odv+l&g8>io!FTpS)3Q&V zeiAD2Oqp^0iFCVn?2#ufH7aJqUu{{!Y-t86P95j5@FXp3`C`iyo^k94_~8&v(DeJs19Scz#c` zbi^xxCRMh%M(T`F#NdcXrx9&Cvu{c4pMaK*cq0%A*dB^(3(Er{N;aoVq+G@(T#RV= z+=1%$KL9Nq@kXyjq^#JB?XeKmd>HbxDCvx0U^GKEr{UIcP5U&Upxs|y;>BxOh$y0< zk}u2$s48x1oY-)RkoMGXueki)R}g3l*cQG*u_~w$L@BKExw7nQ)?_b1MJ<`+n^(i1 z%~2nK2-}Km52mnLgnSg#MU{D`i%mfXf7KpJD_1a;aB#XWU+@7KkvhxcMHR&4PZRy2 z4Q1vvTdEyOX0Ipq;t>JcB2XN}UtDe%06#Q!T3a-K=OP(m>w+7URvjWYaGg0Jo8Bk4 z!6?bG!9^B;78bBn5fp@0Vn`y8=r7Vr3F#NH};Z^ zl^+P!HIN;=3X&k3Ttwp0b8h<2^L}bE#%S9#;OzcT%oPa_e#?*>ddVttjdX4<}t;jhJi{f&D! wmuu~UAnWQX@RxYsP7aJT>~4J*|JQf^4$M)BwJZJuO#lD@07*qoM6N<$g4Fa{y#N3J diff --git a/clear_capped_v2/img/cursors/color-palette.png b/clear_capped_v2/img/cursors/color-palette.png deleted file mode 100644 index 6e6e85212b85b7ba0918570c2ebede3047596237..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5iLZjC;k_h{kHThqfC`(hFmxSO zSd?`bB$R({-*5T0gITA{|Fu6pn0eqpx>}JTL$UWimE@yNe}L98c)I$ztaD0e0sx43 BPNV<; diff --git a/clear_capped_v2/img/cursors/dither.png b/clear_capped_v2/img/cursors/dither.png deleted file mode 100644 index bbbe6e9d472136d68a86c783ad494315ceaf60c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmV;v0zv(WP)tN#a-ClgdGb6so4$%A$aJJ1f4o}=-@Hvs&wcm zdFvMR2fAn=>@J}h%s7h~>?A0JVah_L?Bbh2e;rmgwW3?!%j5GNAAaBW9vsAR96OiG zNiLTY+qT8FZ83AEm`6BgHqIT#u@Aj4!2JBYoyla(NF)LXnM@WmL67Jlkj-Wg(TJSV zLDNX5)8>cb3)Q(c)}sNWQYnc>qm)WTM8LB0Xqr$c7STk*%3np$C>4qbf|buxuhn>Z zr}cFhAP55dz-L$a0QkOYtjY%jb+E6LLNxG|A_xK^vE;A@Fg-mb*^7PTEeiw+r2-m_ zCIH1k5dbT10Yb4*V)5f59m|uu;l{)OUn!J2I+-S`!$!W3h@gCh@B3W3|FRW;L?U4u zh9O?X6VLO+FbpvaLp-k{UZwJjE1q~>gA<8_-TZ}Wwb~zx$8ERlngI2B9TCBG%K+4B zbe@K#D^p}mh4^de-8ZSux$G>j zkbE%vo7`*=ME6$*MxJq6Z)NF?!@|}cMtYE)xfyoXHyL{MyXXXa`=Pt9kwSj1R|CF0=Fk*Fx-qOOAWINqw kBIup*SJy{pZ}C6!6a7#o3cllY1poj507*qoM6N<$f?LBr$p8QV diff --git a/clear_capped_v2/img/cursors/dropper.png b/clear_capped_v2/img/cursors/dropper.png deleted file mode 100644 index 2a161faeb79a247dbd80ad204e01108ea328ecc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmV+)0^t3LP)A3!~jw>Ki$8d;SW1I!v_WiHn30@PX?`T+jM%F?tO8AtA>5R;@Y>jE&9zku-w<6S~u(nw@fs zs|pPj1T0Q2xwQWHnl)!b!@^8~HV6HOc#q*fvJ0?j-gEiY9U&gJm)kp|U%wC#nDBko zssf;r8mtKk1pfT_qx|X9C&z-aTDaz-Xy=navHgGl{=EaVaS6_pc=_^W26lFK+m61e zMKH}-!PZBBm179+>8M4}$~m-n}~nwD~SkdEwTrTh^;K zY|r-d^PP72?C}r4us90LANO%-;sZuE2eJV`+ullx^7R0j2S83nP7laH7$~j)q}hS^ hBUFr$((DWnU;xEL=rr*FUHkw5002ovPDHLkV1mZ;^XLEo diff --git a/clear_capped_v2/img/cursors/eraser.png b/clear_capped_v2/img/cursors/eraser.png deleted file mode 100644 index e0d4b0201b9fc3f6f6da0c9b888822eafaac8414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)1RCwB?lh2D1VHn4scXm_|RPb*o z2t2F@!9+q64R!|)wREXlm!UK;JjfC*NEabIL{LnZWuc;5?7HNoAE&4}dY4uA7Bo7F zznz)4=Y4a;*7ejgygcu`?|k0x_kG@X2q6UQh{xlQN~OTzaKP2V8xU}e%?d!m6d(ye z3FglRz)uq>7}!JxMj{c2#bV%cx!{txZUIg1etP?iiB)&*+w1;dlVT>5*#z>nEr66% zJt}oI4Xp@}uDvUL+_|^KjRAZYU~@3|*6#6Pse>@3Xx_4*)9JwN+WP|&K*DcskZd-~ z9XOrNWfnzo+p?_ilWP%0?{>K|vriUTKR*Y*-w(Bi`_I=LpwjkqIt}M?ImJkYfTAi> zW)4_iYc~J(DKFxda1owNCgFTOugqpMFijKOcazISelK93&j%-u_Fv%Wsjv!<$K!CJ zP*BhThwbLNa}$1@o#7f5hpUgDzQkiZK_B0QRpnx_s9^pFX03_J)?R|cr@4bySiob% zzVc(VmCNO_G8&E6j-uUeV+{rHdcCms;kEpL&?ceei#;zg?JO>firZMi qS0)6!_zO_`=C*PVMkCl5`N9Qfv&d*`0-eD}<~0i_h~T|9uK{Sh1iG{f~V95!&s7MKs|n60}C zkzn&HrC{iR*Lc_X(N1o~Q9{P^)rrCDkFPQFm~b3@LTf9wAr;d5u1t=3K0-=LFt^4d zwDcAs-6P=mfUo{R4@Tk%wS15xkMH2}yZ%^*p!kkKv?qH_1hLBwjSXDRw(e3yW`y{hXv0)gfQS~Uxm{K`_{tBKt0531)Juuzx~o6D;hygrL@*680jFiiV;OfsoG@FMMQ8>mkf^5Q99;jl@vr! zoZJ<35QJc%Ewt*Ep;Qcl)_|2(#DrGO_q{alIwVB;M=c26=??dtd+xah{;||<2R}YP z=GLn5a%ENZ1dYIobe2Cvo$!dgTY~Rj5B-qF07oxoP?p8Q(}{R>xpKFyAdyITK@eoO z0w*W)NK2>!1YvM*lmWNK!m~Sp4KOq`?74177J=!R8B*yqN(50bI(iy~0@VZ~3WZQ! ze2EpZeH*|Soz*%_vo{#6TMj9VF*~00W_g`Uv}7}M$@HI_naO*)+h z*=)Jzc>ve|zV9=VOd<+qr)No}Q_zy@`#yz20cjB^5d_8j{M;{sjmAb!8LHQ7J}%r^{A1ih0A10LHyo+Zd*nR9fm3|0t|F@OS8&^dD`Pzp swk*yZ?xMfbA>12#a_;7f%lwb}34-#&=1IIcK>z>%07*qoM6N<$f^?<_O#lD@ diff --git a/clear_capped_v2/img/cursors/mirror-pen.png b/clear_capped_v2/img/cursors/mirror-pen.png deleted file mode 100644 index f51489460073ccd61817ab46e6f96fd5b22cfebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmV+|0@D47P)Llf6q@Q5c7xb91>@gRz2|N(4=YMnrVF2udl^ z4x%6q4(cZO2S__eCuh+iD2m-WI7o*I0ZSF6Lm{byS3wCVe#4Dg8=BDIXUsir!C>~kdT`hLf`_q+&ay zVmkmR4)rdtK?c?n+(y4)U+El}7r4qj#7_5V9SMq@23hd=S7dr0y}lmzOO<kqx>Y`N5G#KZuk(+dT&<1^7t!h^v@Ly0|+T4pN73& zpIu^ywlOnjQ8G=` z6$k%*1~6*N*xiU={`!K`?WSiklDB0lKsa*A+vO>IMiTpUo3WxhWm0sk9Q!R`<)*Es7cZe`iGfa00000NkvXXu0mjfwg>H5 diff --git a/clear_capped_v2/img/cursors/paint-bucket.png b/clear_capped_v2/img/cursors/paint-bucket.png deleted file mode 100644 index f82a8865a7bc0326fd56f27a869326be4a7d688b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 707 zcmV;!0zCbRP)d6{}iR@dma4U zGwNI63={10?wsg6GrMIz9=9gZKjA|+f3>GAK+D|GJH82pDTdw`PIL|}-E9ldO1tCE zh!Y}h7`H{Mc=~qbQ(FLcAgsD6T*IKskM2jy_-qNlZnsM>1c*c;%G7om9HAYZ4@|gr ze-YdHGL{@3SlraFMS}W1yBeCDwgj)70ffV0WjdWkyAqr__<>5Lf>Nmjzuyn#`-SF| zCD@#CrZM!vJ3OHFTxO9ZIYyfsjRp#Z0 zMwk*D4u?7#jpFF&2#1GEG`Byu|C}hU^-i!wvCE+^rj9RT$?eTa}EEYkR zMK{!HwbGGEfk1HjC$2x=82slTsZ=WU`uaN4eVfe&i9|y3`F!?;Cy|z1E>{~228hLC plE>q<_Zv^tYSsXk%l)sJ)*onV;!t9*YM1~3002ovPDHLkV1n&hO1S_4 diff --git a/clear_capped_v2/img/cursors/pen.png b/clear_capped_v2/img/cursors/pen.png deleted file mode 100644 index 0bfecd50ee9f5bc5828f0c0745aa3e0effcbe250..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 450 zcmV;z0X_bSP)Rq1}l<=psl5*5Xz9i;M}s*NP=ugs7Q#8Z;Dyx|}!`#}xw_C3!B-yaPC&0j)XcpuX@rNfq|q}N(wJOjA& z>u+z?dfJEuLePrqzy!)73pvLjxk4d6XNZt?hm_iYES{i}J5y3l?}PPNYDBR7oPc~6 zL^d)Bi4Q2L3pnp!nFxN9c2E+=@XAl&+;2m6a~kZj1r3Mz3C=hmUG<{+vWR@t4q?fJ zhFc(ozZD#Mx`^Q~g1v=K6!QnfuqyD4>U4EjF0eamL}Jx| z%&`kR-H+3GBYr*Qx}frLU4`%n9(`uSomzw)t%%NagXkA*R5Mbv9VLDp1wMo$cOMa~ s3Wm%r7^bwK$2$}-<~D8p`#1iScU4^XCLAA~0ssI207*qoM6N<$g3sK(Qvd(} diff --git a/clear_capped_v2/img/cursors/rectangle.png b/clear_capped_v2/img/cursors/rectangle.png deleted file mode 100644 index d28dc6b1a4420e67d2ad201e77fa6ffdff47b0f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 660 zcmV;F0&D$=P)-HHgciWXH=58>$m+)aUP_=fNurq~c9Jfr+{g4OA6VysNJCVr!>1 zyO(ukr-@eVVQOd_eeEr`d;&*7#Zd36d)>ub=%lXvJGs$=On&Pn97vP9zKEPnrBRKfD#EKdHd|_ZeufOm#a)m@NAF&m3;5bVE$Q(zLZS1JKPk-x02D-XgTe_RX z#5m7GmzbE!!E}bj^$Yyl#_Q*HW-gz-5F#kVUOZxW=<7_hAg}KDjh>#B%CwB&uQ)_iwz;@6pmo1X^%*Tz443SFZSDVxCn00004Tx04R}-Ro!pfR1`mnZ(O7nKcKOW4i$^9Ra0BJ8yc;~21%2p=|UR0&DbiW z$#rfTQ`a`O(`{9s_5yDV_yd5l2Of}kLK+Oj_Ok5(v`JGz71bo9J#^YYXp{DWs&KBa zQ@dTpxRI}aIp=pi@6k0t$5)!;m`NF6-tt{FpOKHBn3g+MAqmexC-gw4rh87hTrL7G z#)U`L!(So6-Zux@>;H3gR;i~0B%VTSS3P|m@o9jRsXML@Al^p#@G0Lx-0?i(9WEw_ zSYddU<1E8793KxjQ|c&UmW!mTC>k>?{om1c9S zUx<6_jj_!T&^M{wWM#>IBbOSf*xP<^F{$j$aOQ5Y{cT zROCL1M7^NKKL z&(yA}mSw#iM0^;IB{ZO5!wl{^Sg-*ysE~&Yz8!E;Qv(A`lu*=Clo*MpVGd>OdF6n^ zam1Jntk;<}MrqIC5$=Q>n{*R}?8oOIDUw5En2dl--Xw34!z7E+5pr-OgyQ-soSab)C%saskMla`aQLVzg0+MZf20tJU&K{hZoBrUc+U4e9&3o zw|KmGEe4#xz17wBu{f`SS_4i66?j31EjY7n{zGfhONK~c+td!TS#B}JoR}5UAd7p& z5phTyXSkK0xCeD3xaYP^o&J~#Xp9xFb0C;HHml5fA<%h1eR|qw7wxF+oNL9T1Aits?sKNIwvGaN)^WO$I^cUV)HzL_| z1K?{9p!>B*)`xfEv!4N6IG{J&h49W#Bz^(#YWw%`e_a{8n{G9m5AeR~_yl0%<7V@p zoFLbbGsXyTy}N+`03Sfte6l%hAuO~kXPr`U@ZPxe%b zqMn2tlpaKkDW$bwL5w1Hg=mGSZ4*pfO+q&{wN1Lsjt3!^R9JA%?|Z}h-wg1dhq)~* z%nf+9s-e8~lXW>whikrk&Z{bemc7j zFs=dsoccO4(~}N&gZJsTL4Jnf;v?9VEbK}a0Kf%pGgnxxqEVcNv#Da)D8c6spz{4I zj$e7oge&~xG2~7T>VacmRtfdo2Mk<&&i=WDHoRSc(sKrt^n294tRQmjRm-(y@M0q3 z8n-o=z11i6^LJh2)(H15g+k#zW%bC&ILwt9MD@n5_{PJ0FA*Ch!6SlLDt<1wKmcHC z&gzL+0(%q>J|-7oRGaASKZ#m;9(A*XC&8)ISb~3&QXc9MT=Q!J8x2PXu+VymDi`?m zasqnLi_gXqjMr1py1QWk8jV3{op=>oYa}DSa+!VwuBKD4m-EU6$iFm*1_LKbqA8zPB9^elD00000NkvXXu0mjf Dw^|VR diff --git a/clear_capped_v2/img/cursors/vertical-mirror-pen.png b/clear_capped_v2/img/cursors/vertical-mirror-pen.png deleted file mode 100644 index cf2157d808d6e2257a792a2dd3ad1e9ddefb5c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)jk3mRNaU93L|Nr(jY_l2UJ2)^m2h&zGb`XMg zDG%YGIu%`lP6k02aaJTkr<6_=i5PSVBzH!ryt+X@B3p!g#Ey)Ei#$Rp3GGR`)+Vx0=LtWG3FRvd~t;w1x~2bX{xDD zIyb1s54n$O0|^-U1#m;@CB_&k^FMyd_vlEt9k%rb9^W!}U2_VC)MM}EvLW53y5VQh(i7O!z~?9K{_&3T z`VQID09AU7GE8h5L9D!+N6XDAR^&(F{`e}3!=iw#}5u#Tg^3nctWfs1Hmk-X; z@nk1*BVEXSn1Q$P6pH#9I{Ky=04#pn0Out=QOHWa{k|wd@iVZLapdxv4FI{kwqq&d z2*s1|`=Tghr43%vpBBDiZb{#{d~3)%`l!=Pghh8- pYX~H4&6M=-*DnmnOBDeTVHZOpxosdUl1cyo002ovPDHLkV1ipX1AhPj diff --git a/clear_capped_v2/img/cursors/wand.png b/clear_capped_v2/img/cursors/wand.png deleted file mode 100644 index 44ccbf812879c42cb1f9587d865bcfc337ce6361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)hUn2-Navsqo?5A8 zh}}V^=%7@_%C;=H{tGpIj5CMu*>5J=i;m^t2QTySd)}9aAppozC}++wDz`eOViU-dbRRoz=JsVlZk>N%^azhi%=xTCt9`LQjtqNFW~e|R=r9= z`@I3J^#z@aD5yBuq2DLQO#|4uFW6R5kzPZ+h&6Af&5}POarL&lA~3t5R1i7uh*ffDw@qEs=HBW ze?CI~MkvG6H-MF7r{Yv4kw_q&PNP^XqFgTHXlH@RpLO}3aV{T{Ez=8lo;PHV$Ads1 zfOtF(s5%5V>3qE|&{lueV1Y1j%GF zXt&#NI-LlGLPN>_18TJzN~Mxf*f6pY5Dteo^|P&3>(H{!KTr&_wGRQWb^rhX07*qo IM6N<$g7V1&P5=M^ diff --git a/clear_capped_v2/img/favicon.png b/clear_capped_v2/img/favicon.png deleted file mode 100644 index f85de46de273c6d0058ee69464c5bad1641e8ae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr}70DGLM)n!cRA^7ns# z&bi5IZf+M_oHdfxi{CK(w7YC!N9~>1V-_(y3shtdCLZ|Iz^YpCPvcKwO5E8VrElh6 z^p%5!g}ZL--&H@sL57VjK&B(!R5F06{kIkK<2u$5!{h8cJ+_ZlB&q64Dl}T~0F4n~ YJSEp6=*p+T3v>g6r>mdKI;Vst0Kqpr-~a#s diff --git a/clear_capped_v2/img/icons.png b/clear_capped_v2/img/icons.png deleted file mode 100644 index c6e3bef2ed319ae53eee8f83d098f8a2eaf4938e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11499 zcma)ic|4Tg`!`v$8-uY6V-J&UvL^eI-I$PNCS^C%f+BtFW(=}RqAX?4$WE3qOHrbb zEX7R9N5T}Dke>1RE#Kew_x$lZ|I9tFbME_nz0Y;dx!%`(og3roY|GCh$-~0J!f$V9 z<<7#w%Fg`1&&|pF#r3USVPR23+FMz8#<8vsAMc;ON`M~j?k-eE@8`w83-(;pqH%|?xm5U#rwE^{EEsFC;i_e-|v;kWd)(SroO)2cX^{0Q}_u=J@ z1>fC@_}4wV3ke@KRdbLQLhR;tyvYxitlVl0Na%GgHD*hAExUzKQxSmOq7~*K#6Ij3 zY9TZgPv0#xG{sgu3qAp6xa@N$^INKX%%U;$y$bW=&$Ws>6I{#FQzqa+;aQV$))HmlcM8GAmo-n~K9>`tB-Jk(8R7hHlpTW`?b|wu?&S>dD zG3&_>Gm6cZjHt@%8gAG@n&|;sHvV{wjqUbX?S!-}onzrs+1$TTqMhzDFnH!PkFTb% zJuy=Wfw60~zzjY{yscK9Gsad?s8BPW+&%woQ?EjpX*24yvjxvbYSaO%Ts_=(o9MQh zeh+2hOmgb@D&Ea{-!p=BCQ#U)2z44NNglNdv(;p{+)vQXp}nhOqUF%4sheuyH-Xmi zz8UT7k=cLGN(U^7Eo55HM6*VbnpZKtt>TAR*0?i=9VC4yY{h+6`ql(jz_O2DMl|q| zovRGKO#uTxpJ&z7WTyawDG6(60)*`2O)^!i?HKyl(Q@)>pMRWa;qq(U9x8)}woBSiD9I z>2qlc7lifWD1+xRmDexRw$HV{F=qf|shWq_`ftS)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YHdH0miPF*Q2Yy;$06 zds|B6=kx9h4KSc}aDjDNKO`u(-w$xDP5|@&abe!*40`vbW_8^7u6ch4m(yEr+qAXP8FD1G)j8!4coi=Hly zAs(G?uWj@_93asC@xJ9rk%hWwfg!` zs};xWruAjr@qB$^t+|fKI=1OQwZ1m#6=@&zWxL^87bmkY?9c1e^n@a(<;v3CEBkWl zf+V%C*iL?Z;Yo|$!hfCn+kb73ajI2Q`+i$I<3M1p{OO4)ul`-}$xGIma+6Ec%#CNo4FVJ%gp00i_>zopr0JZOiV*mgE diff --git a/clear_capped_v2/img/icons/common/common-keyboard-gold@2x.png b/clear_capped_v2/img/icons/common/common-keyboard-gold@2x.png deleted file mode 100644 index c647658deb76b7f78bc445357551116b89a9df80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmeAS@N?(olHy`uVBq!ia0vp^9zd+c!3HD+F3O4lDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?+dW+z zLoyoQ&a%y73KVGAUujr-;8>K4S;BKhouH*31fr^#6fGOnJtX-j9B(Is9FAb?i=Z zd|!0FEq%cx|0%7Beha)~-9IR2Xg_D&amsSXq77;nmaS91$eH?p_r7K3Gl#`3mz;%) zu4yo@lMH$+{7rvlu}h0&XjqBBuQz^ytV_d{E+oY_8a)V;FYYi=4_Wz<(Z)znKKYN2)pKO_6 zd9t(6kxlQ!0anQ!3e7#~cBQ}LrB+@)S3aSU+o-^iO>$;Qms9$_{|0)k?-iKEQyw(& z#DJte_*nI(U)p~dtnL5#CI6+)FX?UtYXKYf<9cz^;q}iy#MW&~cKf=-P_*;Qt=3eA zW1YuD=L)xl=))2kKNyLZ&rX?|zHLDmp!vprRu_X?jmC=0x7auAPrE*sbwA^bw< zWzz36*GpX%oV|8ysqz1n1+9OrGCw$d>T&v{FBZ2mjcta7J20LZJYD@<);T3K0RRMR B=Dq*` diff --git a/clear_capped_v2/img/icons/common/common-swapcolors-arrow-grey.png b/clear_capped_v2/img/icons/common/common-swapcolors-arrow-grey.png deleted file mode 100644 index e80406a694e03977741bc1ef8a1dca64f4d4a550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)Oj6hRcne=~D)>d|gq(~u3R8a6NgahGr9(N#qvCKXT_l`}t$Zr1dVBY`D z{CIC*232JiX_{_`$a2}M8b(zC5Rp|?-2uMD7+1U9?hk6n0!*jVldAe0I0l?`&ONCE znS-({8vv(E{>?N^*Xw}Hcs#yijCs7E_AAfx3!P5qT@_FR*tXVQj4@sZE&*6;pBZDe zVvOIbcGU3RzXcGH^Qw9qKvmmGlI&K6KygQfUYFL(bs+mdlgVTc$cl7jG#VX05~$bf z{QN(&_QTpVZyV`2C zK2!o7fSys+kHFIyuUH#=s47K@(dj5)DksH!!_+>;HeY5>0N^j23_ZLL-d!vvD-*5SRsRYZQy$u3!I z=ZCp?p8oS4YPZ{e<^@H>mJI_rKr=Hl0a(lWs=75mfQrcZ9Di2`VRkEkNYnIep0BF+ zmWxvWWQ_SD&li#V%Eiff%iz*B(rUFDKqXW9J5AF))6>(9vVd~$(D?Xx44lp>U1^Lt zSr$wo5P*ohTu?gZz28?7PccvwMV|rR=ajAh78{MmRsAlKB*|QoBv)?=2%vLI>6C~Z zFvfhava+(HpGDg3_JK4_mqQ4*ZwhE~a`FcedA9)S(Q38&U6LgI{IUS-15U?r{LKFb z0%$gyPXlKP%JXTOp7q{8Td&u5_5rm+RZqon{7KOx%zf>%isSeiRb2vRy2Q?_>Kn$G zZ=xt#2GWg!_x^qn`8t#T6J@LEH1TwFDzUA^Y~>+=T-{ z5Hziu)&uLaY)~i(CN65&t6EpB8`fh%F$?t41^qd%Vy`mi_3d3GL!m5~I$U3P_Pn6$ z&P@fSBt2p#?i!+C65x{-Kt2sXtlw;721Kq@1_7mK7T_*I?R8bViKi8Qgqi|DyKopaSWWRqP2nM-vp+s(6 zyK>{kRY?mM{U3rLg4y(oejvJV<08SJBC*0k3N*rWRgIn&Ug^&9PTrY!XGH42W#*mp zJ?DJxnK$#^JR>6P1*_U^fKdAn8r$N68qG6Jw&c$%p)A*OsM;Fx6xeH6{bRAs_UneZAxOa==MM-j&=-L`q*UBp}XO z5;$nrl8Ox`>6HYsPGDWZ^f~c970U@^b^~-+fqW6DapE=B=W2#33kvm~Y4&<_y-Kq# zP*+LN5e2X)uwUSsz-NJZfveWHsImycZq7(~LE)5Vn%z#^o#?FN?^Zb*0uAK^9a9b83#6TR)`?{uf7)u@+|gos zhhIXCISq6u?*Jk>=Xk;Uep54`a<5}dV{rc>rkPa}nG;AUjr()dt70je$@VuC(Y4PFaWd324ArqL6xvbk=p`*A?wf@hkY1+=w}rnZ2l z(^KzU4A94_=u5G;hXwRGf!tr>#@29aK1v1(mpr@g*db>^U}6VNho|nvB%n`Kv6-NA zI%L6&s{N!iP`KjRbz1Q%a$^Nws`tAhk#Cc5-YtXHCO)sdSea) z%fWXv<+US-eBC?58wtcS2?C_HV4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0uqJzX3_ zJUZV_bL2W~z{7HV>2e#@@B5bT{2u(v|NJ}uqI)qRNh@TPXFg)tlVD(Wi!pVv$^;kw zySoC|e`q~$o$h^b<}1kq(ck$QWzMkdb_O7cc?bFAG*8M`O`?p_Z_@K)(?~(Vi zU+W)mHdxfSW}mj=I5204dHMNMu_64ytHdW|tL+V2t1{oxZF_pnuCV37t4w724jejV zBF+5dO2WZ=X)of==uIt{%5?otXZizj%F1+q%ckcUQzopr06C?B6951J diff --git a/clear_capped_v2/img/icons/frame/frame-dragndrop-white@2x.png b/clear_capped_v2/img/icons/frame/frame-dragndrop-white@2x.png deleted file mode 100644 index c1011816c69f85ba04f296cb9828b6944a0c3d38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4JCOfpuKeW$?tgAG z9(F3ud#tFm=2?pLaVd7~_T_u-a@`kPQj^wF;j$RWA20NAUIQXN=MC-^ z#{Rh{|ID(lGU(ZKMLBn>>D4bEPaHHzt8giBU*EFi&vLFcGIb0)_U))+eeK=Qbky1J zvvxQ8c^T&0QF@=d5A5%;M}N;tzn%|_ OMg~t;KbLh*2~7aSjymg=bFoy|KI!2Hmu;V(1+(!OYZFX zX`uZp=jgZDkN;V)F27tXlD6Z#eZu|Qv){kixAo<6p5_vnT}+l6nU)D3dEe(8te_rt zprmR3o(E=yFF8+iiW=0;`MTCTLdn5zO~Xs3S&5wtAhp~XZK_O9j&RM;TOc`&V}h`D z!mfri3`G?=9OsrT&(VIcQPE=dyiIExj<-E{^Wf#qKkfRD!`p9vV(^p-OUQh9auU$@ N44$rjF6*2UngE!ZpI-m~ diff --git a/clear_capped_v2/img/icons/frame/frame-duplicate-white@2x.png b/clear_capped_v2/img/icons/frame/frame-duplicate-white@2x.png deleted file mode 100644 index d6c28c6e9ef509c8646c292ebece155690fc0baf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85pG3fiPoFZ1E4Epj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9i zsh**M!Iz?i3=B-{o-U3d8P0F71^Ve2^0)+wot3(IZO^J_St%yAg~!+HE}5Vl*;Eqh z^Y2H6ja+?}AAk6~r*GNU=h;`3{yw<+Hhb5ss-eK{%$v-%z`}68A z?0X(uerf*rbLzSyn!%MoEkC{-`S_tuX}X2na-XM}A^m#xa((>|UV!YHdFt{CyWM}P z9%Q^_mv(3G(_1*H$OJ69uf)=>V2aW_D0g1j&yoij9T}%CTBK_EFaEXd^mAtSd_iwZ zDX^J$|NgS8bUiY2`~Nu-8>cKTJQXs}?WqnXH-~Xzi-zopr0AI5yQvd(} diff --git a/clear_capped_v2/img/icons/frame/frame-plus-white.png b/clear_capped_v2/img/icons/frame/frame-plus-white.png deleted file mode 100644 index 5227e9cfd8fd7274377d3a8a7642f9d89290ce82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$AY=VKT^vI^ zI+OqW|8LK1%OD(^Be}Ih=z!CrsxMOxd#pM3P`qTZ*hJofrB+F&RbyTm1U>%1y^FD5 xImWVXONzwSjv|MwT9*gZZ&m>{5qh~44$rjF6*2UngAI|Lq`Ar diff --git a/clear_capped_v2/img/icons/frame/frame-plus-white@2x.png b/clear_capped_v2/img/icons/frame/frame-plus-white@2x.png deleted file mode 100644 index 090f9a6a1023d7a032b15ffe2ddcdff0064fca55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkg1|*MGNWTVBEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4mdKI;Vst09iF%L;wH) diff --git a/clear_capped_v2/img/icons/frame/frame-recyclebin-white.png b/clear_capped_v2/img/icons/frame/frame-recyclebin-white.png deleted file mode 100644 index 98a6e4ea60d7f9089be1617d33c3585cdce60d93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3EX7WqAsj$Z!;#Vf4nJ zu)P6cM!8Z8Q=p(^iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0v}JY5_^ zJUZV_HRL;Fz~dS(AT&22v9-~;fZ6Zn;stRH&ISi=t&2UIq|ei-92MlE6S?t`yuE7R z90jE*8$t!MSpTzD%w1^9DE`%W!}XtXI~c>i?p{5sV@Zv&(%K(uubN)mC08(=(e!mt z>ETP#CpbDTAJ;s%H~9IrXHC)y88Y`CrSW}O@Yrn8#ybKRQ<`(dySAP=`rl79=HPzjI>yQM3?Xv0$7TWj!QkoY K=d#Wzp$Pz|*?E@$ diff --git a/clear_capped_v2/img/icons/frame/frame-recyclebin-white@2x.png b/clear_capped_v2/img/icons/frame/frame-recyclebin-white@2x.png deleted file mode 100644 index 1ed1955f5d2c83deee2916b2f92a78456ce32d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4ZMV|lm0nGxYoNZ?+81)*tA9$`@XQ;@s zcB7z^1Y2!e>Nc;rQL=Vy=Nd(OH*nT4r5~7T;^F*5UZVDlX1H#BNM) zJ99#|K!MZaXQ=Jp9T-vME zZM585Q+SVmzgFy;Q7?CF?uAzyUdi2UZ9U>2tebeXe^QLK%=(9GtYyTPZ~b^8>c;XC zZ>!4>-?VP^=YRZ2Y-SCU#as6uTV6+&TO6%ldv47`9ph^CH|gG>VA`>vH0FktUXCm{ b^q#XfdTJ&pAE`PAj7SDgS3j3^P6!lvI6;>1s;*b3=C|qL736UaGn=XP^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs% zRL{`B;7id$psG2ZE{-7<{%a>jbF~`qxNP=}-@TK&$Ud^i$!ANF)bfsxbut;tCNnQp zQL1NblT4TaBi<=q_MfP>F}`7;-j>uA>kkyPXYTWi>z<*Ox|U_VtIy&lRkt_duNpD~ z79Dx^dgi|OJKDCTXnjA|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0TsRRba4!c zXnlKaFYh4(0f&drIXWkqZemnbO%`0{)H8weghW7)tZU1mc#HTq7J7fOynjB4d1E1{ zxO~-8#`&TX!Wc85#5J$ji#ypYeCnKZ&uxmizc5PbfyKn+bML3By8JvJpfn|Sh46x9 zHL2+(8sEY&ddL6N6qE~1BvtcMu5|S4Vm@3S6;ACsI zp2UlGD`}n|cT-OqENGsT^uS)jlI@sdcLIYP-@iEC1rvfmLCWCi>gTe~DWM4f1lEL? diff --git a/clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png b/clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white.png deleted file mode 100644 index 4afa0e5d8bbf29d3b1c28e3fce647ffec67ef402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|mSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsNk`>*-%l@ftLXG(>jm*H7rISl6^=FnarMNs(JjGwzwx}b((zc;Y z&^qgQ6Uz-Z2gVb7C#+Xkuee-c=Zv2mksc5JHE3;->d@!f$foNMB#=H;XN9!o!t6_i kn>jTXmYm6PW4OuqJ7D%@AG>8wfz~s4y85}Sb4q9e0Q~<@p#T5? diff --git a/clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png b/clear_capped_v2/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png deleted file mode 100644 index 6ffe2bf1127f2d2fa76e4934bb2c8cbf451c1c9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0Tn&+ba4!c zXnlLlR;bB9pzWc!w0FOA=F6=gLi*f4m_#D;_DUDF(rCAF?#4a#sZ1^-OC9?TXzlefb1 zo$*xeSB=&MIth%Q9OBQcoWQ!Fc~!yzwpDG7CK~LUPr1c2Jx!Q*KypW$tMTUr(@mtF zpZT$~F3+!(J(=Y*zbMn%#+i%mEHE|PuOYsI<=ED;)`>3anP)6+i9ZmuyTx5PNoW7e wP=kcuB_W3$q(VfQPcL{SF@rs~iLrutW5<(_td|RPfxcz%boFyt=akR{0HvLVy8r+H diff --git a/clear_capped_v2/img/icons/settings/settings-export-white.png b/clear_capped_v2/img/icons/settings/settings-export-white.png deleted file mode 100644 index 45d76e67541af98c32b39533dd8b50fd76297978..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcmV-T0 z1)1Ot#)FWI2N(hr0Re(g+{6x|EiB`6hFz?QVO%oSxIaHAI9evb1OcTWayL zsm05t7B8F1iZ5%-S=1e>k@w@j&Ui|020Ws5hAW%#THJsT7y?nU46TkLB1I!bXKv95 zMNMcLuc7fgo=zxg&Ni?H+~mv|0y~QBcfhVmJfGqNU=P>=-ZJJyz^Y>VClHv#^Ht*; zKo@8MS2^?U4Yz0Gsm3p6YPL7;8uuX{h{(r`$g7C7a^#015+%z}%;I?yKUF7D1{%k< zzKXdvXA^iJu5lFye><9*}WoL#b|A#T*x)cSrh+;Kd0w;5%kDw#k;o|6%{mWqpb zTSGdfCnEi+_5LEo2L|HrA~Km;pNL4uMclSI*MUdk=Cox5Yy)GBc)zf1&J*0E0XBhi z+nsGP9sp1LJX^RhCeHdOC!P|Uj344h8ej#u#^SZmRJ;isn+7SM100#|WLhdc;>TCt zM8q}!!kkLw%tA_s0Jt>S!RL#FFSO#Bd{_BX|G8B5^Mp>u%PJ8gDx2|IyliUmvZ=+( brn2H+%ZY1lxC17*00000NkvXXu0mjfQ4{=F diff --git a/clear_capped_v2/img/icons/settings/settings-export-white@2x.png b/clear_capped_v2/img/icons/settings/settings-export-white@2x.png deleted file mode 100644 index 5c9f5d941a2967dc3068a88df3e3a131c3f07fba..0000000000000000000000000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;-{?cn|6BT-*$Df9ZCTC7=%OlT@|osUvdna?49rrg9L0gvbk_8*f!S#A)u zJ+#xw^yRGNA3O!~zny5C@VeINomR%z56LY@+rAaWcIzbyhW%w(8^%9>`QA;6PwdtU zMtJ|=T)Jc0iaX8wLrmvf+Z*z=Z%^=gfw;GqmCV0!dA+}%{q4Z~hVahRc!6nG!&h3X zM)w*%Pm^0-q?`6?&`N-mkviQqw^|P4&B=7gL%asV?6G6@U cxQYb+dofE|EEZ>30?Rc9Pgg&ebxsLQ0P>`18UO$Q diff --git a/clear_capped_v2/img/icons/settings/settings-open-folder-white.png b/clear_capped_v2/img/icons/settings/settings-open-folder-white.png deleted file mode 100644 index fd68fbf4aeacc965d7e60a846237e96eeaf85e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)< zXqv`aWZl0OsHGS0nqItXdhxF5#k-~#@0y7C4KyR#0?tg#ZW#uFL)I*IEi*oc-FP=9 zrx4@VDqC=V4D+OjtoS@OPU!j#uHs}i7!iMiZ52`(w&QIk5ZNl_>+6}FT# zY{&*$KH@OmSLRnt?ag`7P{$x)(cJ?o0;F|&CB1mp^x|F9i+4>g-Zg7h Z{1;aL1`c3Bh9v+1002ovPDHLkV1j5l0?+^e diff --git a/clear_capped_v2/img/icons/settings/settings-open-folder-white@2x.png b/clear_capped_v2/img/icons/settings/settings-open-folder-white@2x.png deleted file mode 100644 index 0a1fb21d2b647eb8b36fd53e4ca9f36b4ad0f33b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1008 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Radb&7< zRLprhdv~@-ph)}v-momi8!9V)upeTMLGaDmKf)p*U-$z=j=0w(D20j5 zx)E_iyzPgAtJJ|C4hNMC*-Rq4ZyqQzZoO&y+}!%+=YtyxrrAFK^!BcCar(QkRadnd z`}!8KU&w1IFjS23;Sd)-bd+RfPwNNY1KJC29WZ2_V=tG9|##C4SL$kw#?(xd#R|(vUm}8>e z7|NEc*<^n}_W_T=I*km)KkOThCFr;sal8o>*_5FRl!)ob^Id7?MAyzCkyw@bU7ti zXRKb-3b%ZLp=QGSx+bEYXw>UQ2=N9J=?)S{kCPm!zn?H}gzzMcjSuXlu!XKi(~y{=xFo^iPx6x3FjGB2{}0~>^UkSnQ+{@~ey=~XL2TZ+o~Z}w z9!uSuq4zXcr{({ey?u=9Cx5?Hr#U}K@lW8}Qcazw_aE%hK9dxGDm8)o=CN;8yBhAY z{hYc3=(>#pcFzAw%Ot0N+P=5D;-2oEhcj+B|F+P18f??LzvN7=uc*aZjVGFalp>=m z-$fj5dVj#vWp|bCzYtNKrm$c0)1n2)NVxFy{+~feaqHZ$E4BK-+{xhS>gTe~DWM4f Dtwy;* diff --git a/clear_capped_v2/img/icons/settings/settings-resize-white.png b/clear_capped_v2/img/icons/settings/settings-resize-white.png deleted file mode 100644 index f85cae210bed031acf4d27d3c58de6fe1c6bd5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsz5uAFIl=c zM=_{N|E1Uc2Hg*wbMHKzEnKqc^i){J@Wj( z+SMh{OHn(9VSP+cE90Myk8i@9$px~$o|6$Z`W66E_5at guLDbK>75midTQ~u;rn8FV5l*8y85}Sb4q9e0C)$SkN^Mx diff --git a/clear_capped_v2/img/icons/settings/settings-resize-white@2x.png b/clear_capped_v2/img/icons/settings/settings-resize-white@2x.png deleted file mode 100644 index 2db490a83afeae7ae146523de79d4930daf46dea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Rkdb&7< zRLpsM=b)c(pp4tc;G~XEetA9-lCctH8rC;HtJpLYY73bQ$RFJCHP>W9z-cC_lPb%^ zXIhrOd-_{7Ho)ui^Cx9$bK@e`glQkz99rG5T~+`Vl7Osy z=J>|xTiI_eX@BtgMt(Mb(4wyoe2=zmYo2~=-c_@{Fd!Yr)PCkg%B`di?MLph+cBV*;%{0-fYKz^ABu0 zE~xKXzWsss1LhA;@#49WMX? diff --git a/clear_capped_v2/img/icons/settings/settings-save-white.png b/clear_capped_v2/img/icons/settings/settings-save-white.png deleted file mode 100644 index bf131536531bda7c7f0470e4c065893ed22ce2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs`KDmFpr(Y2NxriyuI)sA>po(X$&%O_*PeQk~wwDW95NAzaPkJ1go_tx*8 zR>)Q$E-4WBHlir;&iCw?&0AN$n>=q0JHvUWHEmB1mau%#IC6@cyyNVS=t94hGx86Z-bu4LvX-+j+v$$f_DA|n XUyr@l_YPPH3lpinR(g8$%zH2dih1^v)|cBF)%Q3db&7< zRLpsMd$;f51PQl?<`1oySfdRXr8h9?9NX4gG(pmt5ktYj-vOVXm_4 zV7<27-3O<;+{}Mu9bF_{vsdY&I_tW5cfT^W+wlGGUUz%@Bw@bQ4}CVTj#KY{)B<+Y znzq^>EB>84!Pzb;lU6X}U?LlgVLIo>ANR>mY)?<$toqq}yV!J{n*PP=e@st?PMW-i zZ_{g|vo#rflVsE^y^8MWxxYQnckBMm?CF`+_b;nl_q^9-_n7qyyMVZ-+^@KY_OWU^ z?-o?Aujftqa9rhi?fNzBlU4jZ&zar1CtWnXh<{zSxbGzEtkfsn&rVOf?Y%#HM`qA` z?)AU9Eg#-);^*Y{dv`edKabGOJpY;mko&?eulzf~T~k6G$Z82UY+P#j5FE6tGv(g} zcKr%R5mf&EaPcm_8d-IO|H2+=q>7~X#6qfiW694Azf1(BHwI5vKbLh*2~7aI C$`oY) diff --git a/clear_capped_v2/img/icons/tools/tool-circle.png b/clear_capped_v2/img/icons/tools/tool-circle.png deleted file mode 100644 index 52a148117d2e6d3539e188964f673be54c2cad73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs_t0F1Mkez$nzE1{%lA4nP7(L z40a6qccCU1m{i+{4ik<~p z2lGyy7}@FXDVDV-<72n(lt7Km;U76qZk4ioX%|wnh)3(P_UY|6r%Fv#xh!@mZ^@}e zo20M*%5%8BYaPRsga0}9PdT+J&0Hzu&&|zw;(FR$@+SKpWyfyjla0An^?Z$ekKZ3Q zhgXr&?yJ^hl^Gw~#MsDu_tRa8CyJ+g=TzHV>-*%o$cpXztFZQyr;Fqtsr5WtQ)GY? e5@!>R)-$a8khok-LqZrBISihzelF{r5}E*ATFI~g diff --git a/clear_capped_v2/img/icons/tools/tool-circle@2x.png b/clear_capped_v2/img/icons/tools/tool-circle@2x.png deleted file mode 100644 index 524de8b17324dd51c8778868d8a68051f73656c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1079 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q1@pN$v zshIP2_E~SyM3MISTkfd5J+)wynClW2*Y1uDVv@Q|8d@G%l5LLJ;cKI=S~V?L8l-o~ z{y^B)4za)s;*JYyIU=nc7YF%wm$&RZ-u-fK@wq#B&l?|piYu+#U%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MHqq_C_gkQkY@?IH2Z2xEoBFNH89FI^-p8GW(8sROknA8a?clHu^<~L3{T^l(tzSw`1G!poHC-0QLF6ri<`WYG1>xsOisyyti zyd~ib8%&apcSO4OCM$!xP6l_K4DLD^+;zGZ{sYvY(VX#aLHYmy002ovPDHLkV1nQz B_+$V8 diff --git a/clear_capped_v2/img/icons/tools/tool-colorpicker@2x.png b/clear_capped_v2/img/icons/tools/tool-colorpicker@2x.png deleted file mode 100644 index bebff88b40f870c967a8334b60dddcc1d484f070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Ry_jGX# zshIQj_T6sYLWu((-@m&Rs&mop)ak05F#_V%&r?8V`>50_?aY?B#AU%)!j|)y=LYK?k0J$Ei$nYj*Ex={%`o0|_n8X&3Xz-!%>xr>9RIX@Pjmla+1|qK6I*gV@$3_-V76iU)lhc+_wNR0!T;YZ z66&5zWStWJLGFQ8{lx2x%tyNSSv;z1d@8s{bjO+h|IPK)Z5}IhEr>j&H)wEkz>8N!7F0mNC8%$Zs)+dhV$~G$0{b_M4=5B!l;69pZ~rB8$N#!X`plP|_g?nM zziB3`Wc0*%?UYZm<3grw5qx|^PgmIWNpjf5%WXZ40=6{t3?DikxU3<>R z!2P&ky0X$-rB7=P)up>E@zt7N{Ze>h*xC2f&DOD%oqk~k^!%zfd+P)xSO1m0%+|+T zJ&pg{O`|uTmb$xK>;5!xuIY!W4fER$_|xB7|JA?y2 z+q~9ixZN<{u+Lvt_e1KA*PToEJwEql@28t~9M#qzl%IWExwN#ZZ13~0tXv(uRS%?X z*7yI+dEQ<-k?jE6T+LLych61)=@(q?{NB8~AUtaq(6~p>-rPxUJ}0>E(C1zA>o9@n5ppFah4}n zuRXt|p3#rFI>RByqt0ulSLqwYJHZ*X2TC7gA4>Mxy5yj?>{8_ews-g!GTzy2vUAts zE%PSL3%b>)>mdDscSnEqx}fiI6L_X>zdf}$KJ5LTtQ(}{B_y?V%sb+L^YBNU3j>xH N44$rjF6*2UngC*-9Krwq diff --git a/clear_capped_v2/img/icons/tools/tool-colorswap.png b/clear_capped_v2/img/icons/tools/tool-colorswap.png deleted file mode 100644 index 778a53d32d1e5959ad47f769c1cd9aa5bc0c31b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 zcmV-11Ou7$aV8j1ez4#)y|2r;LKl ziIOgqbg`r=NxhQxN$QmJcc}&`74cgn-6SJhr_3|iC+QKVy^i4kVb*^*wA zG}rG3CGC>*gUrhlBqb%)d*6V=l2%A+lQdM+$UrgeEZ`Mj5JMlZ2B^*P%sD_a@G&WD z2WA(;p%~KBfZu)KUSJh)c7Zmo2Yz)M{{Xj*Ht|Wo*FNCxA_zy@6rjy*9S5!%E#e7a zy$`exsL9Z02Cxix9$OOM0q+1yfeBgcu5z14fril_9tP+F&X4IP1Fb+m*>M_<*;!Eu-5w?0~W{hvw#6?)@GD~_)IM99VLAlCj&d2$a?o$KK54l%nSgF zV!E(o-YNz0W;eDrCJ$@=Glp-x3M@Wn+Q0%@{Mm1@O&{ddz#%LzjF@er_w)kr#5(%q6;Bps48HPW|T(h*6Q%W9dzkjLBgxo4s^ zMU%^(i^wXl^nCdcH#bPwT zHqx`|RNxCN<8A>S2d>3x`Kawc{vhxya2rNRlaRDpcXg9-4TVZSY8Q=oob?mT_%wcbQ?0yO9XfGAG|f>dP~FvRc!%YUtqFImSVEs?Za(&@5qB=a-$tCW}(~m~vAp~cw%Zni{ENZO8>XLvSY~!s4ZU=rj z0r_mCgKj^tq141ftHKV+dr3z>cGk>BJ{RfGJ|Vq`D=G14s{`%;?!pceOR-~LARp?H zX-*2@ksS8gu!J<~#Iv3r&62cL(hEuzU`3%^ n#7mBo_8*Bc;^oE|@p9u|oq8rcI!Uu!00000NkvXXu0mjfnPX^{ diff --git a/clear_capped_v2/img/icons/tools/tool-colorswap@2x.png b/clear_capped_v2/img/icons/tools/tool-colorswap@2x.png deleted file mode 100644 index 91a9586018d4fe879de54bc2aa89641ca3a60aa1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2844 zcmaKuc{me}AIB%x<_zDQiD4v*qWI=W=GxIlQm$yqlyk8)$I8`0xi?XW)M})RC0{ok zaz-|VgehUjk$Yl4zu)uw^Y{Ed&-4DgpU?4p{`@?zJI)wKX$e&c001D3fZMt3`h|ZB zD7Kq_EU?{oO@shLxB_?M2GB2gw+3Bp42cJ~)_>C_2tm@kG(2=(q^2ziNyM#N%m#Fhji4){QdEFh+cJsuG!8UH4v z+SjGfP<)FGoy&3&eWfvD;!9bu71= zb8DKAk+Ikq7{f`i ztV}H;sJ_?i$TmO^p0H)xkJf&s>LQ~X?(kWC&o2H3%q~?02lT1W2-hP)RA;lrH` z(KMHGeCEo1x}%l{gaDGFR+Z5~)V18IDCDM@j=COiZNEh#yzU&k?IA&M?-+(1bOM(G zo?s@0ba-1LcfLd^VR4-!n?_uV7Lw?~r_z>(`qx7MhKHPc*ZLO{r;@%O)ET;bR6t2- zNPCYNoS1l`@VD^v0R8Zm(7JBFq^aE0JwX_(76guzKy36{32SJR->RfEatfR`vMDLSyl=Bw#C5$V>i9MVbbG`5lNTIbd+X~j3Lk0N;Vj) z#f^Br)^lYvjjQ~VJvWYZQU6>W6G{Sh&}>Wew$a$xRAbwcBCqn`&pFQOo^vWBQetQ< z_k@!mEN}g$(mn0cu~R?gB3TT9OBspcuDC{9$)S(;)Mg-~wd@5PYUs7}F&Z(B&XA}& zewuBQMMUxcf$mvxw(*M9lH|2c=TsF1cRZl%oEafIwi)2Eo=(bfdxqNTC4KbBtcDRz z^NUkz7Q(T}8r#d3sZpE16X`aCe)HeU3yhys=q=*7$>%pEY&IVFi0@<;TYTVnYg|8A zw!QiI@>*n`^TI}t)X2MrANDL?u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AbQTQ?X-&~MqVDY;lX64_rFIS!YG{L!0)XufS0IINT|Ng(EQj6NnmYpoXR4DVL^ z@XW5p?_&J@m;C-8SNxdF?sFvb>%*0$a)u8SW=yEn$?0yLE~C-*j%N06$;bH;W9-Ud*o1!ph5399 diff --git a/clear_capped_v2/img/icons/tools/tool-dithering.png b/clear_capped_v2/img/icons/tools/tool-dithering.png deleted file mode 100644 index 00180e693e4c9362df6826b1449a2cd341b77434..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs@(YFp9fMD-I|7=qQ0*>Q?k81TD1?Px9u{|^1c6l WbEhxvJaQLkJAlpinR(g8$%zH2dih1^v)|cBF)%Q)dAc}; zRLpsM>mui210IKi%ToSNy(=o!5y!Jr`oN6#eJy=kueG21{*r%B?*qew$xX*u`Z?u< zZPY4!KFq)=Ft<5B-j?0Mth&C16T5P=o!&Qd%{Lu=ceDk&iN(`}j2~jR@XpdZ-~Yw? uV0XdBld-2lFPAI73%cil$AxHqsA~-1K5X9fb_p=p7(8A5T-G@yGywp!hnklF diff --git a/clear_capped_v2/img/icons/tools/tool-eraser.png b/clear_capped_v2/img/icons/tools/tool-eraser.png deleted file mode 100644 index 263a9c0435d1f8000dc4bfbde45615b7dda3ead0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNs*TI%VyeH8!ywdpnl4Zr_mbn3ZGox}>M972#p zETW=u+`=(RDaP$S0?(QoCmjCcU)Ls}#`s0v_>##1GeJ2k1hP|Ex#Y<6meRw)p0=Lf zC#_RiTQys9MfQ>dg7ud_8rElQF|Ubz@mOe!cujCd`kwqRos73Q@0;9`de3~f$R+w= z?E?SJhxFw>WGg;sei5C(cB81}K7;4n4`Kz=L|-#+X1=~n_CfxEir5cEC3a;x58Fd! z&0c(7b3)c2yeR*?KrQ2z*A4w*7e0&5ySbJ*m&^V{mklE~+xfRY-DV#+{^ReR+*x9p z2cs7@p8Egz{iJ!DA8$K)|MRXTe-G{S_UxV{r~Aw}N^9;K@A(J1T&FMl5t-&U*DO}+ z=Zmyf`-W8KFI)Au@b2k|&tl@$U|jw88Bo=;w3S3+2x( zds{ItGxWA*#e^@ff>ua`S0r~@M=lh8h(MotZ{9Tajmc0<2gV$Or>mdKI;Vst01V69 A5dZ)H diff --git a/clear_capped_v2/img/icons/tools/tool-eraser@2x.png b/clear_capped_v2/img/icons/tools/tool-eraser@2x.png deleted file mode 100644 index 1fc023341ed3cc554ecaa7a417b5bc381bd12325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%PYc)B=- zRLpsMdvBIVphWw}^xl|hWVfAEMYCZ?gAyP%L!PmiGBoiHYO_GJyR_qZjmgfZOby~AF|nBO3OK>I<* z^F_B_mHu&C;Q2tZV8O$U_6IBT-VFm zn3tX6-JA9y=!T~Fm#Bl@$;+R-Fl}1BAvoyEtpitYXi8T3K8U-a$yufQ;NFduk6xHI zTyL7I)%A||UfbVmiMs!%U+8~6?}qRm-rr&c96L1QFTOe!v2W58)AibRxi_{qN*-vC zE2w>%eqOD?f2Z2#idO#Sv!|{{{)vAnY^fgHygl*!W-04X=3l?(Ox8Teo;W{Ux9pVg zU)2w)uY1y#-B3IGX7k$IduOVg&s{X$EX`XyCF|rFKE9pX7MlCNu{N{WCRKa#j9*?s zZfL{vBVh~04{tm4AooUjZpoWVFI+dSRjBZM6ZGQf#wSj(jmA@AZ?7tv|3fBEqT2VTy2+`N z6J?}7HS2SIyLip*LhJ@b`(x}6vhUvzDX{uncT0-xE-z5_KdYWek3HKmYk5|O@@|_){yJU$QvN)a=I{wLq@DRXHF2zW5$E&0crTYS#zJ$9{HQ`Fj3Vx!(KPmfK^A fNsd?&?mxyg2R$x#N_>n5W;g~n`(5kzfT(S!(5KZ`TmF4~@R?!7&f`%fk_ zXU;cse)FA~FW;1@j763IX@GoH0?%3{@T^q=&srt$to2`lR{@iX1(H^2z#D-Jz_Rds z9Ows55G^8GsY%Kr^@EWvhrW~QKAuxdS9)!svpDRABFzC<}{!lD>iu2 zQl>r&AYVdzhT3FqOWja62m1-?0<~T3Ro4|0yjDG@ZcI2~qk2jG5kO~!{zEZflS4ht zX!{imzB>SPr1btAqr*Bb#h50wPkpCOinEUkhf_oSBxSIA2Rs7?QjB>4JO^e22jh(6 zz`ulgVhVtKC2%;jcf}cxk9mI&I0`&05Gtu|12=)YKn3t^IKwjiH*fjXz!Bj5=%f7B zN?<>*d_=35(_5+bhsaW&GP2}bTEq9+3W+LTfvch2R=6`0sV>x?M>0yX$LoNnzA@=pfKFgTdZ!MlZ9oTbA6T4dL>``5V=h166#5$S`~#Kh6?3|-RwNml z?{BS8w}*C((e0>HJ*uva8QZL$P`lNOMwg3Tb)PyuDMK;#<_h)AAg^_sI}eZ5J4Uyp z)1iOQAlp~L3AJgzngCHYys92WrhHAh{ESD^@h3wXb<&W;5#GaB*SSmbCqgf z0Z;?<5iO{{Sd;&=N!DMh5_r}sfoH7}c-AU`XRR>{{uBS~ZsF`-m@WVS002ovPDHLk FV1i-nWd#5L diff --git a/clear_capped_v2/img/icons/tools/tool-lasso-select@2x.png b/clear_capped_v2/img/icons/tools/tool-lasso-select@2x.png deleted file mode 100644 index 17e7162fa6fe4ad97d1b255a1c25a6b40cdb848d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmb7FX;>177Def~<-VnoWeS1gmbql9S>^_!W@2fj;UE|;;RJ<-1-Xzo&r}3OP2QAP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vR+VzT`KO)>ol7z#5TIo+vDc!eBUh0N55q<&v&rv}bheEX)keoDx_ZoH^Ed3R`_ zUpmj&*!~V38TGgow7d#i)Q@*NlrF7s!uf|w7ft;*_4#`+T#)0>{$gg?RcDJNjBX4R zmsMeqX!wV7J51Pf2w-5qHqI#Bo*+#Rr~R~*46(tid7k?J4E7%^d0k^4k?1lIb~#Iy OF#x!yzX#tPo%}b3cQ?TR diff --git a/clear_capped_v2/img/icons/tools/tool-lighten.png b/clear_capped_v2/img/icons/tools/tool-lighten.png deleted file mode 100644 index 74a2ef427ed521a84a52f2645d927d245c6a7c54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{siP)5i}z$^mT*Ua@83_Jr0V9^4))WY@3`UcN{qXvje;2rP^cnVB`+rUHMTi_2I z#lpve7Y)Y8z*a*|4x9$SalLy1KcKoiE`Vo&y4MD1TyOK5w?a>-zK9pV-9X(-BXp@5 z#;=VP{IJF(^rY_rzaznMUY&sFRKL^5hPpQi&^WKW3-CR!@g>bKVi~)M(53c5T$Wj7 z-^)Krng?p0r0wI4o)uZZcf9=6%W<)+ZA0G}&x$PIQ!hU=)U*ZnJuAu}c*_4NX>%#R zqrcN$Q(-3QO47}m-|JM@=StG8RZxA+<3D=p`%f0|b1yH~U#9<`;&T3_rVkBa@vNu~ z_$t+b$EXu<|7G0ua{tLo(q}{87|)6<;3r=GSkhLY=B=dfhTc}ssth}4>X!c^ao6l@ z%TFD$Hh`}Q;GGRwB7LlV0Q`!8?tH8j=?97DM(AD+5@i$(rmK!_0zMePix`$z@Yuuh z4d6cTJ^XGGOT zJh6gIHXSX0eZwWM))s-7wdoTxaxjuMGIS!owqzU2{N zz{0TI%jMsWx^qKY4zoY<_icJpQw#xW!P6Rk8R!`x&UUHyJMsYBKJN z3H(FUvz50z_$e>Nvo>?d{yCsGIScvztAud5;)Dza4^RO+1I87@>XULG| zj0-p#!mwwqUNhn=pMH>L2}JgcWdZ)eqe6DwDZ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@l~D$KeN3uiGq(4Mp!Sj;#}nV4P)_;IZ){-;R4h_VcC zOmF`oecK`Yqj|#2Z~tz!MBhGQS2fi;;kME`&N&h3U$?xLn{vfKuZ!la_FMzPCKYKS`|S$;Yjc=aM;Qur6z;exNsV?-x_oE^)8>ZyKuF eG~{MMQ2ykF`%H`%Y6Jo!l)=;0&t;ucLK6V$U*J{% diff --git a/clear_capped_v2/img/icons/tools/tool-move@2x.png b/clear_capped_v2/img/icons/tools/tool-move@2x.png deleted file mode 100644 index 78fcc514a784ab07e6fc1522c39063c83b9beb18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1015 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Qfc)B=- zRLprh%Q_>(QKW6Zugio8R&H18tsYAg6vdkQoh~}DDr@W$5Ru*}$P*ED<3{Gnri8_U z@~s++S~cvr<2y9Enp%HwboqN+**b$aC(L~E*>``w-`V@TdBWYDvn?n08*hGo?oQCo zm}3_&PW;Ny)y6IU_|VZE1%`StJwz}kt3Q-=kpHmj(`EO4$M_vI-P31fH~yQoE$%@H zTe75i<*5m|6Su{jX|PHCp}%1BvbW|23qM(j8y^T_J7TmYtSmP=hi%4zptj>iTkbh{ zPrbiUGJ(lk@?K8cv9tzGozw~)=VVE_-FZNuUVfd?Pb!p`M`0PT63Ri@w3_+Geh6A3m=;`WyAY656wSLPpZrdmb|Lo@jc{t>*=;JdG}1+` z;)y=Ol6)ToZm9QFa&FAoFd673hjmQdtQ$`quz9dg;Tp%96bly4=nFQ(+_jm V9miVMSq99c44$rjF6*2UngHyjyLSKp diff --git a/clear_capped_v2/img/icons/tools/tool-paint-bucket.png b/clear_capped_v2/img/icons/tools/tool-paint-bucket.png deleted file mode 100644 index c3dbd17a85eeda98d139e7e2e75eadf6f0298c94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 741 zcmV+~t7pMW9mEbwx+!Ty(osq4l4_Ec zC4H9kQc|@;zSaVKYy?;#U0c9;&;0*1-@qpZ_YfEY_5p{1F&@EiDLz;4?V zunnvNi+RHP1RXG-uPM-{fikd=7rakU1gry_Kz|G9x^HgqzJbpT<`Xaq30t4exc=k2S5r=B8RKY=Q6 z7r0;}Ki}lD1zZRE+U?&LdK6eAuIZD&5#SPV8+Z-W5+39@P)dM@cv+3|2HydEvkot( z_ze)({4{XU8PyUnmjHhwZ}3U$=$S`s-F5>%n!wk9!K^uaHd$xvc+YE6Nfk+Rk_Hm) zPiIZy10LCN%p>|@_0yq>Bybgbd_yeP^ z8gR8s`TsKC-C-*YOFAZLRnjX-8{JIqs@vef)U*Fp3h>Y>z(cD553K?`vRIqV XFPhTFkFG;n00000NkvXXu0mjfazj4v diff --git a/clear_capped_v2/img/icons/tools/tool-paint-bucket@2x.png b/clear_capped_v2/img/icons/tools/tool-paint-bucket@2x.png deleted file mode 100644 index aafd114ab3fe4cb3250af545ac3d9f2826bc622f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1582 zcmbW1dpOez7{}+@Mrbb0?YK->EG(C_6S-_`%V8-phZ(u%GHh6mTah*?xvxm6xgC+q z>6{Yv%RNz|NOM`o{c+h`7NQ*eeg5lx-tYT;zVGw>`@7k=Af$I|HX*z(w7@*~R^{n(6L#4EmYruiQg$#yVo^7hqS$*h}SS_f~;A zmkbF5HC-}H9nJ?dfk&m2%7P;TrARP)n7jXW^hdpVWrnP>xDjq^3{No@DA#eLybOY+ z`Qp~%Lqnvuc#6&%v8h}jS||O)VrGrRL-va!am0z{yxNNc3GC>RlcI8>Fp)l>mG@1G z7swOgVR@05#8WAyOthM6pT>7{+SMFwo)Pb^!NkJ8@qI>_TM1+#y+(t~Nf=Ek_~ifA zGoS#ZDK`8bdRNu6b^GCZ1TWWMf|b*vIR_!PAv<=u%$n&(J{Nk-FS+$}y&4CpgCg|F z@zf>Xz^np+yP=g^X_)TFi+%G^2B&<^(Ksp(ba$wREqdi%@*}#0feq5u5@4a~*2D}} zA3Iuzhms=l=V950t4FP&B=@pqS?Gx2bmq104}=%SE2SUWOC380(4y^;kZar>wcx})Zs(` zoFAZjJmkAXg7^tYLLuUU(pHW5#?IG2TkUV9>cCbd?5F0}5yF3Y)aA znhMd-Y`%%aW*uqIN}nB;}p_OiTPXl?7mGQRjS=#9q&zVV4rcBZ`q z;@Julb40lUPQq=I!emcQ_H&hwx3LF2P5ZXDTr7asb3KxcY80KB$Fb#Pv=eJyg#@aI)^WUsD z7^cJL{Zpf8|18*;rExd39ub30owB1xasey04E}T>N4Hpdm`(cP(7PyU78nC}Rm|3L z=PJOX&r~`&nha+84a7L9o{Yc5EUruHW;5yLDT@Q|;BaaOjvA{{*m?7)M03crcRDF! zsi(3J{;sY24se6HI-BCidOi|WKiI7p&!{ToXUti>U~ZR`lm~IUW|+$7o@Tn7vV=F- zVH}PYkh8)t{-t?x$)Voy{iDBIrjwL*UiR?Y`vk6s#!TcpR47^b!|p*|wEiSfzq~LG ztjZ^rW$*sg<2nkP)1{+dTLz2LSDTU26ua@B=!m>%H91N6syf;usq++56VskEYwso` z_+*iGV-KtG=yTs-G4B=d<1Y1Xxf;S?f(QdlgH`C{@$D>nm8`vjyr&W5gYIaw?$?|s zPt4yL-4{^YA<6czx>;?6X1_CA!JC%w|3MF$7-LDjKo{A~oTZNzXB)@z(q8a0% ze{<|sb;i`%Q7-=n D%c#WT diff --git a/clear_capped_v2/img/icons/tools/tool-pen.png b/clear_capped_v2/img/icons/tools/tool-pen.png deleted file mode 100644 index 68e3b7e7d2153530ad2750137f1eb9ccc9be8e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 670 zcmV;P0%84$P)$d$JuZRgU-3M#{b3m)(odv!DFMy^-DwR{f8n6HycD!@ISKu|U&o_2V=%c`A zU0Zzi60BP1Ndm+&N$vM@Dq3i90+|ztV}Oh=<|*@idk7+5>Os7!8?H^ zOkMXn-c5|20?kFARVMTaOieEXrycLEg}#sH>Jc0KB=7}Tv{|q9ZdvH@5|dO4csH;L zRDmOoH)f$H%7iWhya!XyRp5~0jR4!gJ)qJ^;Jv^)=8Vzdcvms2$HN%VMZo(pTlE^y z<#?AcC&0&)^dgoC{seRW=yS%eTj*!No>@~07*qoM6N<$ Eg8nNh@&Et; diff --git a/clear_capped_v2/img/icons/tools/tool-pen@2x.png b/clear_capped_v2/img/icons/tools/tool-pen@2x.png deleted file mode 100644 index 5a8c1569f06a935e560213ed7d57011fedb34a3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1488 zcmbtU`#aMM82|3LZJ5haE*WwQ6^&D_QKIcj*2r~IvP~AdSeV3dNvMc6cZ<@F;t`JP zbiyi<%H@$u9HXT~W~n&D!I^*IocH;B-p})Xp3n2V&-4E9UdLh4aCt3x007`1#>Gpb zXSNBImGtSagZ>hczT^ygLnRdtC1yxw7#$OENs=GkCdApKBvxW-M!EV&ou-9GG0!td z0F%iyCsV^O5zf;|<}}8I60w680LXZNF2}rMISZV?2sIz=^bY6b5R0(mxKw?phAKg= zQ{B_M9ER!)OGP7K7AFi)#Tqo!S_mN|-m+MQ;1%zA+5(1mbrB<$AoF<$(;Ft%J1w}T zGQT-;0+=y_F%^wJ%H~8rS!~hRkq%K}dueH@;K*NEV5~@k9Ss>yQ>SMB51gco$PhaX zgHemhbqY3w<<8;5&$}U~0CWwQC`e5I_=Pe?qc^|)4H_W1_zMSnU`wg$54cE7N^R(Lasl1p0oFtYfQ zKg=td(&>2v=(s)72VE)dh8vG8oxtMJejbX|T*b;F5Bm%mkyPt6!=P*F$tB5BQkfm_ z)nA9Uc7$Q?*Xf&^`hAEoFd9SCo#j|?szB+7k9;(wYscg-5z@wT8w8uNAXMw8+neqN zXGXWw$Y7CTM0YPeiOomcwKBHet6_zj?NF-5-al&6r$__rOkRth_Kw?(O-H7<*LUdk zBIUbO93io~JjdBGi0?1d26lq6HrM-ROc2Sw~xevtW=~<)R zt>xL6kc(Y=0~B^s10T5QfH{=~jkdYAX5<>5Z4(=w^^)q5(~29sg`44W!w<~&;m3bA zqYdiMx#tv_Ra)iR?jhfcUI@5pU)Fqr`pEoS=>*=z2bi>A3nUw{zN0x!{Ckbv-aQ2@<1S);)pvMx0t;XNGSKMI z%=0(0(5|I%UGlr~Qivr!*>h0;92(E@SXz+&ma#1!K446~(hJ#^AErq{i(8 z{Gb5FU_Si5^CR_BSlJyvVHPXq8h6z!q`->Ip#8%Z+h*;SVk zJJyiwkxSBjfi%^Lu7B#g+LoJb2s9!RR}*%Lt7GPt=20AxShcnf>Mm4pZfSv>>dq{? z&K4k+wg9T!-&wJwG=KRi-NynL2T2quazw9FHox+UkW7}@ioblB%HuZqFzw)pD2}M; z*p>}_U!8T+E5$#?e;*Qtt}YEE1n~sjtpf?x0L`;>3>|5;9(YyDqpnyOUYQH0%g|ML z4zo^~_R9XOjooww85aDo)stN|sq5pDN42FYQrFTWU%%YkOwT^MKXmnuqWNw!lJ2uR z^X8n0I@NaLnQ!d_3p9Ft;>lW01b7A1ROXa#eO=N8N~I^IDV?kkqo1bNSHypZk zf{_EV93}C((I-2`)h^xM3z4;!iF|O=Zei~mE7vuz;fHsjQ{OawVudgMGyah?=D#gW TIjyBB`Mv+OuJ5!! diff --git a/clear_capped_v2/img/icons/tools/tool-rectangle-select.png b/clear_capped_v2/img/icons/tools/tool-rectangle-select.png deleted file mode 100644 index a613bd9bc720b3e27d148c8304e99e68242bb045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNso-U3d z8I5nRALMFK5OE3Y{r7)*ytcWkiAT)r8Jl^;4=>?=8+uhHcQx}FuY#zi%R+OeJ=nss z{OzM%pIetX-_O5kcJJuzhY??HupHf1SlS=#d%FJGwnEd2t*=kUp8|_K+5F}AG2_sC zlU6#N4q2GG>Vi>d#^&JEo6*G^a${-usZbNYG1&1Tl*mWc}r@~Z_pj=|H_&t;uc GLK6U5^lHig diff --git a/clear_capped_v2/img/icons/tools/tool-rectangle-select@2x.png b/clear_capped_v2/img/icons/tools/tool-rectangle-select@2x.png deleted file mode 100644 index cc2e56502fb578776a10e0d4ef09cc1478d7afd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%QydAc}; zRLpsM`yf|SfPllro`3(R=jwY1o{#oKMZ z9!zdJ&eG2*CyZA>j(h#rSFF=>Z@jlpIt12{%Y9$hCNAUTO!Hn&u=Z`AENgDftUYOa zvIT75?xN{NZ++qqL3q)XZT`h4ZBIaWo4qa5ryDhbY%kL^6b4& zXS4TA2axl2PniKRKI~mk-COI^Pj;VChN#bZT0U#fL5O+y9gpn2jp`ShB#*tk&Y}bi ORt8U3KbLh*2~7aeSEu^` diff --git a/clear_capped_v2/img/icons/tools/tool-rectangle.png b/clear_capped_v2/img/icons/tools/tool-rectangle.png deleted file mode 100644 index a2d43856afc6ab716ae5be254920620bc8f6ed80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsmdKI;Vst0CFf-6951J diff --git a/clear_capped_v2/img/icons/tools/tool-rectangle@2x.png b/clear_capped_v2/img/icons/tools/tool-rectangle@2x.png deleted file mode 100644 index b1897a133ad96ed421918d0f9318283767062b8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q4c)B=- zRLpsM+mNr>K!D+(z{mgkv+Y!^*c{8`5*A*4neirf?bpuFdw(8a?*Y!C())5vS;_F-t)Kb=gzy- q0(P43yAR9vpH`Vg&~<3$S~JwLv+cDLT4WClI0jEwKbLh*2~7aEM3)u- diff --git a/clear_capped_v2/img/icons/tools/tool-shape-select.png b/clear_capped_v2/img/icons/tools/tool-shape-select.png deleted file mode 100644 index 55d6400f94999c5a2d4ed8ca48bf3d990af38736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQomSQK*5Dp-y;YjHK@;M7UB8wRq z*xrCJqg<(lDNsZF#?Utatoy@AtjxccSN*+lwt^?7lxdJ^k>*Z6SKfwWZu5s-4Hx z5UBj1P{H~&8^V@sKV|X3a?O1P?gO6sjT^P<)X%JMY(F6Pf!BiVS{F-L^~KDlm9c50q-7G zy9rxQ@+UAzFtar-yz^2ttj6Q-%Dh#JU#%0L8SwmYm34mI)JH4yuik(4(EieVr`ubu z&fQ>sdrBB%1p7W_W!dWLl^S2v8>swFBx7J>%{kr#;%ifDq z!d_0#Z3(t)k?m(UI(l??U&Oy^K4OJylODZg+{`$BAkl;)3yp)i1AVt-W;a=dIW5ZH@g0 z^b`1gOfp_9@~JDo?Waft>%M8LFWYXc^Pl4PYqIEU6*&ajzi=t%+Zj(EfRY7+r>mdK II;Vst00wgYcmMzZ diff --git a/clear_capped_v2/img/icons/tools/tool-shape-select@2x.png b/clear_capped_v2/img/icons/tools/tool-shape-select@2x.png deleted file mode 100644 index fed2da90297664784cdc45401ac097e352cc16f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1288 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%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Zjh{J~pFjSu!0N-$zsze<&XPaEm7 z*PE`-=G=Um?_{0M!{^h5Rxiv;zbtk4R>aK-W%Hf|9g5ihc=4{kEsBTxm;bu3X>wK4 zo1jB~Bsq-v(+uVu2yuI5BD_;5By&ZyZUK=Q7$dvSsAtHmR}^`ozi0ul)MD^-^>bP0 Hl+XkK9)wk< diff --git a/clear_capped_v2/img/icons/tools/tool-stroke.png b/clear_capped_v2/img/icons/tools/tool-stroke.png deleted file mode 100644 index 5ae9bf3c8e4d915ad0578e1fb472fe69a3401675..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks?IP)noV=By2_^eFYF`c`dCc`a(EdL~cqMnX5M7u1jH;*>WjfWX=-ChIqLjDX(9J>xpwxzte>KpZ(1wM#HfiE>^dn&#}eP?K&p^b!AbM1h}#qnh#wjMYS z+yK@B-8u4RQl8h^_Bieaz5o+|{lHaVHSj4%&QZWjU{<_l1M~a(Le?G7Jm6+8@oT_J z;KM)UXo+A+$f-ar`dz?%U_oC=vQ~Uf;{GevA_4!TtUZ2&pOE)~_k|Pvqsly2DOAsa?en|EDZ^0IJ{l(TdHf&1L=^L)Oa=llJBp3je;Z{C?;e{C%jEdT(Z zjSBDyQS*hrum`N}Gs|+Uns(8=QJ6jIV(y8~RnMB#fb%r9e)ul{y=}@<)Jx+;Uu+^e zJ|>YKnSck->2x@e5=)DUq~hW6354>cpG^P&@P3q!7bc}*v7DTX`MXi?jhdS9^0>!D ze9UJyCtPT|{zDOr!|OPY8@%=4fyLq5w{!m!wRT8#;$QsEHE*!~*(-=&!=uTFYQN{k zq-@iwjPkPf&f2Ok%Uv`+(pg9&B+gbc2pijzVt2QVch{EU|5-s>dQLEb>Zy8jpF)f% zyQV5NCGL=HhSi>ppzoGA7NgEyZG=qf!2dWnk7l0+Q$SLFv6!mop}7gzG{b_{0H*0e zrnUUXeU%CXaQtCnO`3MfzMmE>IlsZTDYyf_V`pEuh@0NOHC9}FeO;`4kKg$vZ*13^ zA(!Ds6_wUPwR@VpLqsb~#6R9#`>KUfV)`iN&#N4)@>Vbfedk~shh`b<{E7iSfIa3T!y`s0lpwu+Hn%H6V?1X@r+f1f#M{oE7>J1ckLfJH9t+$fTV*YU&X2%GE#2%Yo(Q7>7I<6%H zv0w!c0y|n&p_3<8nnb`7^riKg_xNQnY*k_%sF=!ivzWW*j# zmJtRidWBb23aP}AW@KyabMPFTp2aIALWy zSf{7^2ryQlyL%z)d^TBH8_s;D;=k(mxI@P07P_0H7FVX&%J&?>ghg)3? zxuY=-6UFm%mBKMj5Gm~wj47lYJl1S3<1k6SPCbRYspTWpK4>2@rT7$|jQ4_k(58sXlXdf~JQeY11E zYzZCN`xP6}sV}_Puomm0-&U4!QG$FH2uTNFPf-6&>7lffPRg@p_to}qvNjKRr8^ss zm|f7S2%V{Df7LovF}h?T@<+*2rr)O5#TvFM_Qq~|T*n?x5@x|`UHE?T=AyTPxe_Hw z+2^@kcYt9uGQ1?-nhGl5smS6Wl8||ZWT8ZNZ3GlSg+-(tL2HK08b!A)X3rm=g-l4C zk-vV1qNb9Z)wIYx*TqWRnWK;C{olc=j^bHQE?au2)KPa({X_sL-(a75Z(Qb|5_l)E diff --git a/clear_capped_v2/img/icons/tools/tool-vertical-mirror-pen.png b/clear_capped_v2/img/icons/tools/tool-vertical-mirror-pen.png deleted file mode 100644 index 618bd5a6f7b55f1962a5437aa8100f9344e93fe4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmVP)l4#WAWIz%T1OBBBQcK@czA42T z@p^u$tG;=>S~>zW9aWlYfUFAOz7@cID}eh}0Qao`?pw70_j36O8TYLKUZ5H!byVwA zZ{R(WMkEbO>X+0~u_sV;BjbC$z&LOWIB&)|QmKEvfcFBwfE|{19~jL8-c@7pZs0qx z#q!#Lx4^zU;Gb#;zR5s$TV69T3|s?d+8S5laa)ovUA24yDi4kxb zctc#PF5q1Tdb{N<0iFY=m{>=Jf+sb1&+;PR4DkY6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ef80lXShc_xi8ly3_E@38p1rvC7IMYV zcIWv9U{~2ef@qKhAxfuJ0rQad!-{VU@##=ImKJ~y1MXW+)hwa<0_}4GxKxaYGEwH$ zHk=MO>t)mkSAqdM%jKYAPavWhcyFA}d9DfjUiS(meyqcUeapO2vM#4O4L3Ab86IHO^T%rhTa0{nun{>(Jk zM$B3!!Fz9^VmIp`(+@ZldI#kX4o+{J)57`45{O@>L)-9nZhPl_0F8;nP~m52&<#51dW*%v^H(FWi!yPUH=M|nBYPhR`5CVao0V m*>pu=9b2Jk$7)XPeazubDqe5a+0O;Kn8DN4&t;ucLK6V3*lrI1 diff --git a/clear_capped_v2/img/icons/transform/tool-center@2x.png b/clear_capped_v2/img/icons/transform/tool-center@2x.png deleted file mode 100644 index 64ff4e92c54e43837e2c881f2d791fbdf629bbd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^F(Ayr1|%Q9zZ3zaSc;uILpXq-h9ji|$mcBZh%5%G zzYfBTP8zc-fP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cBF)%Q?dAc}; zRLpsM=XTa12N8$B;9vju&)K(KWuw6NGcTh0;|y~64Be0B-v7=%cl|~751B0eoN~f8 zY85^oW;`%FnA~(6tH5u$S_bvH`kT9C@6?z4zWBM#=pk5fnq7PR%vX2*=m^6N**LZN zegFRGr(eSO_Njmj%$a2fk$ofj{KL(4z3;8&Mc*^_smOWyz|42u-bXTazkXGGc|9L! zmBo&j+@SeY+~4K@ho6Np71Z$6tI4s{Cw?=r4=taxA(m;NMRurqkN`njxg HN@xNA$;ZK$ diff --git a/clear_capped_v2/img/icons/transform/tool-clone.png b/clear_capped_v2/img/icons/transform/tool-clone.png deleted file mode 100644 index 0323455896c90e9fb849ba6d71550296436f6278..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GY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y_I^GD?GJxlYR*_^KD7P-%CeDQ4Mae?{?uM!nE`tA$~y3aT< zcG4@CiblpibF2R@-%#cp#C`so#5~^^?eo4>=ch$E{Wv`HdAiW`Q^sBQjORJ(*T{T) z*Cu!6(C6^I^_{P;t1kUe)4#3C<0RL9mpNI}{JPry$ep|RTmANA&g`qo+Ixf!b55xb v4n6(Q{8(4v!=#uU65@KtTD!?)?qucmIe+e5rtvFa8N=Y|>gTe~DWM4fvsD)G diff --git a/clear_capped_v2/img/icons/transform/tool-flip.png b/clear_capped_v2/img/icons/transform/tool-flip.png deleted file mode 100644 index 8369b2b45723265eae138a282ac24baf2cb565ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 708 zcmV;#0z3VQP)*9Jn>8PBcGcy4vZbE`9+Td9pN*PiRga(zBnsf`~-&WlwfysIn$eW0+! zDBvaVCAL{g;!>JPsHY;n0Gy&}yND}b5jcx!n2PuT&4!z(6ed1ODTvPj=RmKlS(#G} z&j3T<1#lVKGzIZ}9!%HOwrqMPFIcg}XMihUv|7^=UpD&;yaJvB-$NS565r#oX{p|r zyuHxIF~p~V0WeXoSsAyj@dEe?%mcH)jc@Z9;=BB9+DC6q{%%NeDDf%a8!*{a(~?&u z-UBXxr@%Adr;mY9;yW~(_R$b{XX8W=-U|1C8ULVSyM z({;J1+yU=Ry)7RTzQiZcJIS=IW@T*KRZ2ZUe}i}E9p+YI#FzLccGGp)mQAT&zz0)z zQ(V}C_$d06oN?8(%ry}QZTcGcfj&+DxXkzv-@t7;R5!p!Q-4E}ASK>I-vH+%H7jGu z8ZR}A-q#1{o8!>dL`r-enduk}fFsjq-4!e$UZDToEC>yRtnpHd=sV1r8Mm5~5MM)X zI##E^C)01u8mW|Wefr8zwpx;y*CwWKi*qfN72w#Dn&ihR)hck(G~rq*$zI?DslpinR(g8$%zH2dih1^v)|cB0SyZBba4!+ znDchd{%lc45x4WkEIxuxt3n)AG`i>1d_xhtHw#8}$$PY@VBJ zaUlKy(+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!xT4(&@EvwOsqFv4_XMkqqE?oV^kursK zgn0Qo+r+y$V;2T%Z7w5lHj=j=JF72-I%CRpnl)6r>NK3c+=Nv=Z*{KB?tX`TxLahC zejm{8iVHvhB=6r*tXWNY>-EC>S6*SE6x+pXst1Bp{ZA|}Bmh>Zv3(Zj_}l+on3D&H z+jr>j-_eH}BG`pcK<)Q*cU)hJ+c4I7zbdaN&11J zy#J0?zD?7Je^LpU^q!3>?#n`DWX*w*gq=>uIU;ZhwN7=>jWagSBmlH8MPRz3weJ0I zm{%sYT?v3Fk-xkET`{jBcNh7mO-T+0 zt9JSiRH%h-;n(WtDi00f?S3shaI0%Ru$vXV6XV*?T0CeW%^IKsXZfYKLEftBa{gZ18SlW_I08|GmYOM UGM@l{+rV`ha>cU#C-2n%0?Ip#YybcN diff --git a/clear_capped_v2/img/unused/circle-dark.png b/clear_capped_v2/img/unused/circle-dark.png deleted file mode 100644 index dec10e5ece9cfa9e5280fab2ce1dbf69906df266..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3356 zcma);c{J4h_rNt-XOLtmyKka0o>HObAu^05`!WnAhU|qfV{D_5;faP)mMoFIY@@-@ zGz>lEn{Bc`XhO0tLt||WzmMnlJLh-K_pk5gocHH_-uK?mec$sr_ukiiWNU3I0+s>u z@bHM3n;F~l@En02EA;${aZ%Da|LHHS5z+_$AXm zYWY>1;j15SUFY2k9nKmi%}Q|j2t&8h`_m1Sk`yci{U6cIMG4Qdufwe*{h=5ym!;)* zN$<|oG5^ZMM9lWY=s&Sgxz@$v;wB=4RTv5XME2jkLck&p^ef?1W{QP{MQd<_Yb$oc ztGI7Izs+N<656$zeU4WO&ObDC#mXRdj4?4Wae&M8rgY1JQkoYwqlnh!mw#UvnTve6 z!Ql${r29V223dcU(x##JX)H(~Fi3HxX1S6%`p7xj3z$ppZB;G=v;BX9z-- zB_FP1<$wsw^jE)s_w>`w)vPJlKaPxl)7^8G)zS5rp0gm-5E1W_>*JTd;etfGu;9%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D*VoDO?(&F*RI)$`fBQhH$(hwKEP_+l?oEjHjN z2=dZT;b7-f%Xv+{yum6M9EnQ$*!_I!2<~rGo5N@JdzZ5Nq!01Ij$2u_N~B3m&G)kq oJYO2Wv&02^zW;8F{|~D-vlDyl&QMmar0=1|9Byq~1M`UgA5BtP)Bpeg diff --git a/clear_capped_v2/img/unused/eraser-dark.png b/clear_capped_v2/img/unused/eraser-dark.png deleted file mode 100644 index 05b49d61a6d49d97f00e8b3ac4e0560c2dd5ffc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmV;819JR{P)wTu@VpI24MnfgOO75 z>-cQnIksd~LM1pKaTMSAh|lM96qf`c*t0&Eg(u5V78N{QQ}>kd_cZF&79CnMFj= z-a)20vK0#(xmq#NQ?0QF#DATUhD3s>g&7cmFkK_22oWb?x7GgmhaS+pJ&;lr`jjjDk%*sm8!c)XZ2AG>s_As3%_oANW zHGwE%iKXX=4NMb=Rm%q+J;qEyA$t(TxAx-smHA`?afvv}19nxKM9iYQJvY2v7E%Y%TTB;-9%3G$5Vsn)h`k4p8i2Sx#1$bI_cE zEUeA1v(Y&sam;K~(83lXQOs;qguDY$+z-|kBI+e2#8yaoB72?Gq`_q;O2h_a&(yMp zh#WH=OnzZPM2g7<)3F#4kzuk?8w5HwGZn58?=VsC|A{Wq-GRi;jQ3D7h4D46#tIvv z1I$W!TVKmok`408SY`n+nJ}(qB8NbkF~fv-*|H)JP~R{RQ`qhx%Sb)}4|$5N1)l{- zosBFOLf`laizVz11L6(x`|hqzU%>Bv8r%>@n}Qs;RK8Xe?lY zJ}dVn?tR7tUvLZ!qQv@et`QhEvT7UijTQtke{3SE#3RXI$^gd+BJZwM`9&EMa`OU6 zEh0rsmxx2juP)3yAS%|`^k8NIQL$i227W7ym_3Nh`dD;#;=d-vXZ{4qVdy|Xj-&P?~rox3}y zYU)<9yXW@wclvbq>C@d%$&?mlt3X61DpkrxU+~A`NT2KSdEvTKN;NI?)gsDQn7+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A5l(52E(goOQ0e_ldOryuJmJq&YyzfXi$``}|vKqk-{M|rz0FS42)iGPr z<8~+|)z{D1@hPotwX6;UKF|0>!YJCA>O%JlNj}EmC^Kqch(~r^yVWZEL)0p cSBCQaA1Q@JkH9H^xc~qF07*qoM6N<$g2!{3W&i*H diff --git a/clear_capped_v2/img/unused/gallery.png b/clear_capped_v2/img/unused/gallery.png deleted file mode 100644 index 23db3a94b3d666c3081543da07b8fe186c204b4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^CO~Y=!3HF6)M^IFdgVmyM5$#nALzx)xAKEi)vd#5q4VH#M&W$Yo$~E=o-- zNlj5G&n(GMaQE~LP{_|yNL27mOrH8AJ{qW?$J50zB;(%O>xNv14Fp&Yl+Jrr^LXBJ z_Z^=5mX*9@67yi3z4O~P$ukeHUaLO;YUQdw*>XE?GBARH@0{EXzxGUeV_)`O<^1NG ztA3?LXD{EpdH)5w4bf9eogEw;UOOB=kQZ9^s{VxV9p068tNNvxn3#fUL*x~%x_>PM jsaVzjikSrjO5Xlt_}k-|y^ZHl1<2)|u6{1-oD!MZe#GSKi42?3h zD3pr&;DQzEgB7I~TZ)Q^z9=HJ6?&mBA_!ipE#AODC?eJeL)gqrlBYg|*wEUhH%m5& z+GIEL`H+jb>`rEP&z@-@zo*^(&iT%N{&UXk%sF$2nW2+dEY|3{?#BQg0q_@qV*oy| zEGwl|$Sfr~8;eGx^~{_Aux|FJTL8QVpccRjIteJTYB zmC1maGe<;}C0y-M_5QgJsZ{C!fY_3F4Ksgjnx@i|rYza)_&yAv!!V4rl(I_*u{)7S zTwG8r<ApFFG909C9R5VU}xSu-GL0YS57K+pn$X3c=01q98S0YM808XX2S0YD@Y zxfe5&rP*i(fKVv(um(-@=vWvrq?D(H5O=`a@NH7c1_1RMG|i)HW#|E)rQj9|goyS=qtWZkyhla8 zWnEHAd3!pY{*9TB5Yc7;TbTJBA;g(jEVfxiqXi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dark.png deleted file mode 100644 index 433aef2a67149cc53cd03731656db6ccb6e29861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7703 zcmZX3XH-*LwDk$0mk_#A3=oPmsiL7vN2E!Y9+09S9U(vxkP?bWQNTt35rHcTh$u=E zL%E1jq@#eLBPF0hgh1ZmzVF93#`~2svgTfUuDRFRd!4g0Y^}|>*oD~v0N}DPH@*x2 z5bzNKurh-`?h#e~03bGFVSK?Mc534>ca`&KVb2~iFfc53=t)_bN+z?kD(3XXvZ&Sk zSd08K7Wq<{MaFXcCU$p8r?ZVMGRw{LrQ-6WOw`nN7B1#V>3Zr||EG>n+phkaH6)>V}#ASLR={|_5UURB>}wX^0}d~206+ZXPX zqdr@LiZ8o1Jq3EI7UiJ}qc$Q^DQ1zbIfoJJd;wwg*W9L=K@%s>QEdcfKtPx7M?2l) ziSpz%qxg+^UylyHJLHTF_Ak255pHD$wbL#$_vFOx7AMw z2J@SRJzYBpQi}peqTv8_9jEod#>d+G_4%YHj;zDvkcsBu0k3UO_((W zbRt1+x3He=4R=l>wl8G9OhP)&1{9P+#r+A;38`n!YF9+R*|KX)#s!s~{L zDywW*)!MSH+40}oTowW$P9#X_GOq2K zwrTh`0n4;m#}M<;K}c@!$n!nKXYPn#0a*$rjeOYATEsjK#Z1ZVx zgawD{DfgU2S&v>t=fm)RPbxwG*3E`@dyNLCi&MTasvhw7;VFx^9F-l1A-RepEqgEd z?pa$OKTE9~4yhA!=Nk|HygFb*ZPxD3sNp-F>V-1|)GA+MF~~=fd(NM*!#$Wm_(mFU zi=9}06Yy`)L(x0ViNp+)Y)^3W7D7?^A_(LgI+$0F#onKcYwi|BwaWKE9cM!gb7#F@ zE;6kG=9eWgbfWwA$pm={X5cOQmYv9waGhG%o2z~5T0s6?!VK=Ura{lLV8W-@zAkmW zY9H9d01H#&EqYSRZ%aOR1PsWT8>=CjFvc&s1~kuRviy?I$GXPp=Be+!OQ z)dF~LH|&{xZpRfB9m*m_emt_pu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=ss(T|ej6_4Cv09}MgRzu-QJ~~`Usq5<>pGA3Xl8V6| ze&-9se^WXH32L15Im#pf*ZW29cTHk*s&v!$rObh&K{Yb)_drlJPBsW>A&QTP2J^>{o;6?4KY3vuBaTnahSzbPaU;V{pKr3_0`5@sewc{;_7``?F>qw`f-NkrK(xuzlzC~{( zR!U67JS<1mu)g#M0ZeF7VC=6mqsE748e@Yti!BoM9It3p`DT-$M;SWi&umcu&!jM_ zm1mHVI9zO@U-HYJrY40xFpA`4c!fz$8A75=|Er_%Nk6MzvXJypyYCKLw#)YMy<&135dX@Mqu3talo5#S(6p$hx8X z_^Y1bnl%9$J1jt)yn0@dd?o)Yg&^O_YIvn%qa`H;g$G~49mqBkbq5jMU$T_U)pjz= zo6NlblW*Mp4G9tsOAzJ=V`4iV71+>-(jVjLc8e7QfFnYTu8M~`8#u8 z0qc1m%~_{$PQurA4C4JA=bxef`7-x_je#V^+`df6GS?{kr|beoCK}Mo>&Cs0P~RZz zYCjk@XkP}R_e&f!&Q(iZGPjqT2W(}2KFM#tY1Vgmn1?!e^~D4}%-nY#-!M-n8i&#E z_SF#<9#cnpoMw#V5d0D$71_{^Dct>mErf9tJ-@Sx!0$=e6zOkWCFC~Qc0u5i}?HmOqq$kjv|KUBB$qp&1e(J z+?op}GZ3dGX(_R*=b)*IOiOt6!xX>L=TMi$%n>)ounqy&c+^)Lb9A2;u-*S;`e5i({|>T%a${@>DW(6Q zQ`~K#QK4SUTsp1w;AIx&rNf~u>ni)y6#n$b)VtsIj6D&S82Ax(=_itODmvO*JZDZ0 z6%w|%$3FM!C`CVqurlCy2;Ow6*}+QF&oiX_{_=}ObI-dRUVlV=WCnr#-YlNb{$!J2 qxMsx5V!#?C^M7tc|Ifwg5uzJ6QE8L>)EK<*1uRUgjb9jgC;t!7s(ru! diff --git a/clear_capped_v2/img/unused/paintbucket-dark.png b/clear_capped_v2/img/unused/paintbucket-dark.png deleted file mode 100644 index b6bd648bcc9985b0c1996c04d403a075aa8f5c70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+(x5DXU19|rYV+@N^SDjk%jUl1$l`_Zq+k;-U0MSJmpwSrEpH_Vbs&Mv$e~2!)*)bM4kz%bW_oI62n#1>l({0u&0VM2oVoqlTz(Gj{)KPQwk>3 zd;r#i;M-St=0WZ5tDuPpcvX9lGRR~MqsdqNnyZI1n6vPAbbM%Ns9r$T!v8*48*4}l zdJ3fXFfz%`tYG#*93EIZ<3Lp41z_tsfG#IKGJeXRlm-&WkveIej^5$n;iR&}vk(F3%@2IJ%S$(;3+I8};VXklL)f~&sy#p6@ zifp*y>dAWV%`yH}EBs6CI|Y~`y|uc8as@nIf`I@vAF2TyuFK z>JvnByW(r><>kf7gL$>bpEeZ$iCd=|52~2k647q&hdflj@V0-$wd>G^5y?64>3W_I=9^m@KWonUpv6Y!X903hE4t- DQ}>`* diff --git a/clear_capped_v2/img/unused/pen-dark.png b/clear_capped_v2/img/unused/pen-dark.png deleted file mode 100644 index beacd0d1e8af0d5be9ebf9b5bdb667372c942fb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1679 zcmb7^drVVz6vxl)EiI3fTP7+KMlVAx**fqsUlVK{AmEfbM;6@NiaKAJ+B(QktnEc- zs>9hjwi&Ff4vD%%R3aHZ##&Kl@i~bRd|)fqR~)eva8&x(`Bk0%;~%@py}#e@Jih01 z&M&!}X65IIB8No+fG96FYc>FdTMEJjxXk@(?;>0T^FPSR!WAEH<}p1k5t`gN#Q;%* z$VIWBq^oO2u@A-=uHw*bMdxW zT+ZY~x>P5=aYV6TAJaLsSQgl_9@y0b#wUGqqk^fJYDjigaIC)H@g)tfH=AEjPs4)l zAt+@P;R_%JTUQ$1Kv?MH8j65C?0eUw2(TL+i2CSUONr~{%r^0D?)EDX~^qlahwkg9#$`h+E zHq5#P2`d`)1tG_Rx2<5Z_^@|Rr8PCQM=Z{VT%mOBG@e4|F)SWVv{vCE@Qv>z33h1t z7&Spc)Nl91fN%%t$3|hrz(Y^P)CA3;mNRNvV>7pOcEY(Ve6hg{~)w5NQb!7JlLHxFf%1s+61-pebh*e5~^%55oaVE|Eqz zhOFe{Z(G%}JmZGSC7*Q3C2g7x35v@6l6T*-2+#qMQVFyx`&?r%VRp8#g zJ|FRpQqRdw?^bfb3^&rHQ+DPu&#CV_;;&x`H_BWF5xd4lgnB9^O;8wYVd52@odaJ> zTB#IAfVj)rpSe3AwoQ-VHHMp|lUcZ;Yn1bMmc)NA;fXW)@xluSFfgSqh}*-+*|mD+ z;4f;#cuJSqV<*`eC70b<7dX03;wguOGWvk8xFay}ZiM@XoyzH%x^}2B177#fw96p1 z6(l_}wVY?D_WRRx+X_m9@pj`T?G>Rr>vy|x!2~YiQMV=Xaj#8^em_1ksuZBF;rPng1RzJt_Ze+#3cp*soKDe2U{;7NlBY7HQkxcMpj zg0%*bZ8;MT4=5$K>x#aWJ}%<=6*8z5-gNWZm-?j{;_Hyh@M(qCc~@#{=(F@HmeFj6 zI0_z=pHhP57p5IHh6E@!gT*{P*UNz^(H_S2KL5j$)mEmXob`Xk?TdRuO3r!N`C0ql HFIx96u@K5o diff --git a/clear_capped_v2/img/unused/rectangle-dark.png b/clear_capped_v2/img/unused/rectangle-dark.png deleted file mode 100644 index 37487c8e62b4daefb1b41441b5c54f780af75665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-;BmO< za%XjEQR$`|tSoy)YvsKZkGogpxVgxu^V?=dOYGs6Fh~gAdhg8nRj=yXPM%4QIonn_ z=|BS`vswazWb*;Bp(M`?5F1KL7=YMdGUwO3f8N{9=-8M6`3d)52_-P7wzB^;P4WH< PbQOcAtDnm{r-UW|K}=45 diff --git a/clear_capped_v2/img/unused/rectangle_selection-dark.png b/clear_capped_v2/img/unused/rectangle_selection-dark.png deleted file mode 100644 index 3b5b827d6c4f6d5b0a8b4bcc60e25d202de38dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{6!3HFy-t7Mlq&N#aB8wRqxP?KOkzv*x380{4 ziEBhjaDG}zd16s2gJVj5QmTSyZen_BP-_|>L79WRYi3(CNx#tOTO|F0t?vQbSJqVtYcm$ae~qcQpf;i3S>t5$vME8bS4G0^ zn)v<-QI2`P^PP%kV1sB{*Mn@mz}w$`&N-MDxV$Vu(lq(Yr0AOOef`r{{pC2-&&b9j zVUTbxF(@?D&TEa;;n$fyI*$@B&)jkBoOQzM`-ze{*Co%hM<%?RbfAHenau}CJkzt> z_r&hs9^-G - - - - - Piskel - - - - - -
                                            - Loading Piskel ... -
                                            - - -
                                            - - - - - -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                            -
                                              - -
                                            -
                                            -
                                            - -
                                            -
                                            - -
                                            -
                                            -
                                            -
                                            -
                                            - - - - - -
                                            - - -
                                            -
                                            -
                                            -
                                            -
                                              -
                                              -
                                              -
                                              -
                                              -
                                              - -
                                              -
                                              -
                                              -
                                              -
                                              - -
                                              -
                                              -
                                              -
                                              -
                                              -
                                              -
                                              1x
                                              -
                                              -
                                              Full
                                              -
                                              -
                                              -
                                              - -
                                              -
                                              -
                                              -
                                              -
                                              -
                                              - - -
                                              -
                                              -
                                              -
                                              -
                                              -

                                              Layers -
                                              -

                                              -
                                              - - - - - - - - - - - - -
                                              - -
                                                - - -
                                                - -
                                                -

                                                Transform

                                                -
                                                  -
                                                  -
                                                  -

                                                  Palettes

                                                  -
                                                  - - - -
                                                  -
                                                  - - - - -
                                                  - - - -
                                                  -
                                                  -
                                                  - -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  - -
                                                  -
                                                  - -
                                                  -
                                                  - -
                                                  -
                                                  - -
                                                  -
                                                  - -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  - -
                                                  -
                                                  -
                                                  -
                                                  - -
                                                  - - - - - - - - - - -
                                                  -
                                                  - -
                                                  - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clear_capped_v2/js/lib/gif/gif.ie.worker.js b/clear_capped_v2/js/lib/gif/gif.ie.worker.js deleted file mode 100644 index b6150c93..00000000 --- a/clear_capped_v2/js/lib/gif/gif.ie.worker.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1< to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
                                                   
                                                  a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
                                                  t
                                                  "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
                                                  "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
                                                  "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

                                                  "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
                                                  ", "
                                                  " ], - thead: [ 1, "", "
                                                  " ], - tr: [ 2, "", "
                                                  " ], - td: [ 3, "", "
                                                  " ], - col: [ 2, "", "
                                                  " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
                                                  ", "
                                                  " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
                                                  " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
                                                  ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
                                                  - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
                                                  ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
                                                  ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
                                                  ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
                                                  "; - } - } - - return [ - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - gradientFix, - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "", - "
                                                  ", - "
                                                  ", - "
                                                  ", - "", - "", - "
                                                  ", - "
                                                  ", - "
                                                  " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
                                                  " + html.join('') + "
                                                  "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
                                                  -
                                                  -
                                                  -
                                                  -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    - -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    - -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    1x
                                                    -
                                                    -
                                                    Full
                                                    -
                                                    -
                                                    -
                                                    - -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    - - -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    -

                                                    Layers -
                                                    -

                                                    -
                                                    - - - - - - - - - - - - -
                                                    - -
                                                      - - -
                                                      - -
                                                      -

                                                      Transform

                                                      -
                                                        -
                                                        -
                                                        -

                                                        Palettes

                                                        -
                                                        - - - -
                                                        -
                                                        - - - - -
                                                        - - - -
                                                        -
                                                        -
                                                        - -
                                                        -
                                                        -
                                                        -
                                                        -
                                                        - -
                                                        -
                                                        - -
                                                        -
                                                        - -
                                                        -
                                                        - -
                                                        -
                                                        - -
                                                        -
                                                        -
                                                        -
                                                        -
                                                        -
                                                        -
                                                        - - -
                                                        -
                                                        -
                                                        -
                                                        - -
                                                        - - - - - - - - - - -
                                                        -
                                                        - -
                                                        - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file diff --git a/dev/css/animations.css b/dev/css/animations.css new file mode 100644 index 00000000..f24f9e72 --- /dev/null +++ b/dev/css/animations.css @@ -0,0 +1,9 @@ +@keyframes fade { + 50% { opacity: 0.5; } +} + +@keyframes glow { + 0% { opacity: 0.66; } + 50% { opacity: 1; } + 100% { opacity: 0.66; } +} diff --git a/dev/css/bootstrap/bootstrap-tooltip-custom.css b/dev/css/bootstrap/bootstrap-tooltip-custom.css new file mode 100644 index 00000000..8b1add44 --- /dev/null +++ b/dev/css/bootstrap/bootstrap-tooltip-custom.css @@ -0,0 +1,8 @@ +.tooltip.in { + opacity: 0.95; + filter: alpha(opacity=95); +} + +.tooltip { + line-height: 20px; +} \ No newline at end of file diff --git a/dev/css/bootstrap/bootstrap.css b/dev/css/bootstrap/bootstrap.css new file mode 100644 index 00000000..de0c1a0e --- /dev/null +++ b/dev/css/bootstrap/bootstrap.css @@ -0,0 +1,112 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.tooltip { + position: absolute; + z-index: 30000; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; +} +.tooltip.right { + margin-left: 3px; +} +.tooltip.bottom { + margin-top: 3px; +} +.tooltip.left { + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} + +.tooltip { + line-height: 20px; +} diff --git a/dev/css/bootstrap/readme.txt b/dev/css/bootstrap/readme.txt new file mode 100644 index 00000000..2a24c100 --- /dev/null +++ b/dev/css/bootstrap/readme.txt @@ -0,0 +1 @@ +Bootstrap custom build containing only the tooltip component \ No newline at end of file diff --git a/dev/css/color-picker-slider.css b/dev/css/color-picker-slider.css new file mode 100644 index 00000000..f3a52dde --- /dev/null +++ b/dev/css/color-picker-slider.css @@ -0,0 +1,105 @@ +.color-picker-slider * { + box-sizing: border-box; +} + +.color-picker-slider input[type="range"] { + -webkit-appearance: none; + -webkit-tap-highlight-color: rgba(255, 255, 255, 0); + width: 100%; + border: none; + padding: 1px 2px; + border-radius: 3px; + background-image: linear-gradient(to right, hsl(0, 30%, 70%) 0, hsl(359, 30%, 70%) 100%); + box-shadow: inset 0 1px 0 0 #0d0e0f, inset 0 -1px 0 0 #3a3d42; + outline: none; /* no focus outline */ +} + +/* thumb */ + +.color-picker-slider input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + cursor:pointer; + width: 7px; + height: 18px; + border: none; + border-radius: 2px; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #529de1), color-stop(100%, #245e8f)); /* android <= 2.2 */ + background-image: -webkit-linear-gradient(top , #529de1 0, #245e8f 100%); /* older mobile safari and android > 2.2 */; + background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ +} +.color-picker-slider input[type="range"]::-moz-range-thumb { + width: 7px; + height: 18px; + border: none; + border-radius: 2px; + background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ +} + +.color-picker-slider input[type="range"]::-ms-thumb { + width: 7px; + height: 18px; + border-radius: 2px; + border: 0; + background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%); /* W3C */ +} + +/*CROSS BROWSER RESET*/ + + +.color-picker-slider input[type="range"]::-moz-range-track { + border: inherit; + background: transparent; +} + +.color-picker-slider input[type="range"]::-ms-track { + border: inherit; + color: transparent; /* don't drawn vertical reference line */ + background: transparent; +} + +.color-picker-slider input[type="range"]::-ms-fill-lower, +.color-picker-slider input[type="range"]::-ms-fill-upper { + background: transparent; +} + +.color-picker-slider input[type="range"]::-ms-tooltip { + display: none; +} + +.color-picker-slider, +.color-picker-input { + padding: 0 10px; + height : 25px; + overflow: hidden; +} + +.color-picker-slider span{ + line-height : 25px; + width : 10px; + float:left; +} + +.color-picker-slider input[type="range"]{ + float:left; + height : 10px; + width : 100px; + margin: 7px 1px 7px 8px; +} + +.color-picker-slider input[type="text"]{ + float:left; + width : 47px; + margin-left: 5px; +} + +.color-picker-input { + margin-bottom: 10px; +} + +.color-picker-input .textfield{ + width:100%; +} + +.color-picker-slider input[type="range"][data-dimension="h"] { + background-image:linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); +} \ No newline at end of file diff --git a/dev/css/dialogs-browse-local.css b/dev/css/dialogs-browse-local.css new file mode 100644 index 00000000..e9e3f175 --- /dev/null +++ b/dev/css/dialogs-browse-local.css @@ -0,0 +1,51 @@ + +/************************************************************************************************/ +/* Browse local piskels panel */ +/************************************************************************************************/ + +#dialog-container.browse-local { + width: 700px; + height: 500px; + top : 50%; + left : 50%; + position : absolute; + margin-left: -350px; +} + +.show #dialog-container.browse-local { + margin-top: -250px; +} + +.local-piskel-list { + width: 100%; +} + +.local-piskel-item { + height: 3em; +} + +.local-piskel-name { + width: 40%; +} + +.local-piskel-save-date { + font-weight : normal; +} + +.local-piskel-list a { + text-decoration: none; +} + +.local-piskel-list a:hover { + text-decoration: underline; +} + +.local-piskel-list-head { + font-weight: bold; + color: var(--highlight-color); +} + +.local-piskel-load-button, +.local-piskel-delete-button { + width : 75px; +} \ No newline at end of file diff --git a/dev/css/dialogs-cheatsheet.css b/dev/css/dialogs-cheatsheet.css new file mode 100644 index 00000000..27dcf58f --- /dev/null +++ b/dev/css/dialogs-cheatsheet.css @@ -0,0 +1,227 @@ +.cheatsheet-link { + position: fixed; + bottom: 10px; + left: 10px; + + color : var(--highlight-color); + font-weight: bold; + font-size : 1.25em; + line-height: 20px; + + cursor: pointer; + + opacity: 0.5; + z-index: 11000; + transition : opacity 0.3s; +} + +.cheatsheet-link:hover { + opacity: 1; +} + +.cheatsheet-container { + box-sizing: border-box; + display: block; + + bottom: 46px; + padding: 20px 3%; + border-radius: 3px; + background-color: rgba(0,0,0,0.9); + overflow: auto; +} + +.cheatsheet-container .cheatsheet-title { + font-size:24px; + margin-top: 30px; +} + +.cheatsheet-container .cheatsheet-title:nth-of-type(1) { + margin-top: 0; +} + +.cheatsheet-section { + box-sizing: border-box; + float: left; + + vertical-align: top; + padding : 0 20px 20px 20px; + min-width: 300px; +} + +.cheatsheet-boxes { + display: flex; + flex-direction: row; + flex-wrap: wrap; + + float: left; +} + +@media (min-width: 1300px) { + .cheatsheet-container > div { + width: 33%; + } + .cheatsheet-boxes { + flex-direction: column; + } +} + +.cheatsheet-shortcut { + overflow: hidden; + margin: 10px 0; +} + +.cheatsheet-icon.tool-icon { + float: left; + + height: 30px; + width: 30px; + margin: 0 10px 0 0; + background-size: 30px 30px; +} + +.cheatsheet-description { + color: white; + font-size : 14px; + margin-left: 10px; + line-height : 30px; +} + +.cheatsheet-key { + box-sizing: border-box; + display : inline-block; + height: 30px; + line-height: 26px; + padding: 0 10px; + + border : 2px solid white; + border-radius: 2px; + + text-align: center; + font-family: monospace; + font-weight: bold; + font-size : 18px; + color: white; +} + +.cheatsheet-shorcut-conflict .cheatsheet-key { + border-color: red; + color: red; +} + +.cheatsheet-shortcut-editable { + cursor : pointer; +} + +.cheatsheet-shortcut-editable .cheatsheet-key { + border-color: var(--highlight-color); + color: var(--highlight-color); +} + +.cheatsheet-shortcut-editing .cheatsheet-key { + animation: fade .5s infinite; +} + +.cheatsheet-shortcut-undefined .cheatsheet-key { + border-color: red; + color: red; +} + +/*Cheatsheet actions*/ + +.cheatsheet-actions { + position: absolute; + box-sizing: border-box; + + bottom : 0; + left : 0; + right : 0; + height : 46px; + + padding : 10px; + overflow: hidden; + + background-color : var(--highlight-color); +} + +.cheatsheet-helptext { + font-size: 14px; + height : 26px; + line-height : 26px; + color: black; +} + +.cheatsheet-helptext-tooltip { + text-align: left; +} + +.cheatsheet-helptext-tooltip-item { + line-height: 0.9em; + margin: 10px 0; +} + +.cheatsheet-button { + position: absolute; + bottom: 10px; + right: 10px; +} + + +.cheatsheet-icon-tool-circle { + background-image: url(../img/icons/tools/tool-circle.png); +} + +.cheatsheet-icon-tool-colorpicker { + background-image: url(../img/icons/tools/tool-colorpicker.png); +} + +.cheatsheet-icon-tool-colorswap { + background-image: url(../img/icons/tools/tool-colorswap.png); +} + +.cheatsheet-icon-tool-dithering { + background-image: url(../img/icons/tools/tool-dithering.png); +} + +.cheatsheet-icon-tool-eraser { + background-image: url(../img/icons/tools/tool-eraser.png); +} + +.cheatsheet-icon-tool-lasso-select { + background-image: url(../img/icons/tools/tool-lasso-select.png); +} + +.cheatsheet-icon-tool-lighten { + background-image: url(../img/icons/tools/tool-lighten.png); +} + +.cheatsheet-icon-tool-move { + background-image: url(../img/icons/tools/tool-move.png); +} + +.cheatsheet-icon-tool-paint-bucket { + background-image: url(../img/icons/tools/tool-paint-bucket.png); +} + +.cheatsheet-icon-tool-pen { + background-image: url(../img/icons/tools/tool-pen.png); +} + +.cheatsheet-icon-tool-rectangle-select { + background-image: url(../img/icons/tools/tool-rectangle-select.png); +} + +.cheatsheet-icon-tool-rectangle { + background-image: url(../img/icons/tools/tool-rectangle.png); +} + +.cheatsheet-icon-tool-shape-select { + background-image: url(../img/icons/tools/tool-shape-select.png); +} + +.cheatsheet-icon-tool-stroke { + background-image: url(../img/icons/tools/tool-stroke.png); +} + +.cheatsheet-icon-tool-vertical-mirror-pen { + background-image: url(../img/icons/tools/tool-vertical-mirror-pen.png); +} diff --git a/dev/css/dialogs-create-palette.css b/dev/css/dialogs-create-palette.css new file mode 100644 index 00000000..3ca38335 --- /dev/null +++ b/dev/css/dialogs-create-palette.css @@ -0,0 +1,169 @@ +#dialog-container.create-palette { + width: 500px; + height: 600px; + top : 50%; + left : 50%; + position : absolute; + margin-left: -250px; +} + +.show #dialog-container.create-palette { + margin-top: -300px; +} + +.create-palette-section { + position: absolute; + left: 10px; + top: 50px; +} + +.create-palette-import-section { + display : inline-block; +} + +.colors-container { + position: absolute; + + left: 10px; + right: 10px; + top: 85px; + + height: 460px; + + border: 1px solid black; + background: #333; +} + +.color-picker-container { + position:absolute; + left : 280px; + top:0; + bottom:0; + right:0; + background: #222; +} + +.create-palette-actions { + position: absolute; + box-sizing: border-box; + + width:100%; + height: 45px; + + left: 0; + right: 0; + bottom: 0; + + padding:10px; + text-align:right; +} + +.color-preview { + width: 170px; + height: 70px; + margin: 11px; +} + +.colors-list { + overflow: auto; + width: 280px; + box-sizing: border-box; + height: 100%; + padding-bottom: 10px; +} + +.create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ + position:relative; + float : left; + + width : 44px; + height : 44px; + margin : 10px 0 0 10px; + + box-sizing : border-box; + + cursor : pointer; +} + +@-moz-document url-prefix() { + .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ + margin : 7px 0 0 7px; + } +} + +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .create-palette-color, .create-palette-new-color, .colors-list-drop-proxy{ + margin : 7px 0 0 7px; + } +} + + +.create-palette-color { + border:1px solid #2c2c2c; + transition : border-color 0.2s; +} +.create-palette-color:hover { + border:1px solid var(--highlight-color); +} + +.colors-list-drop-proxy { + border:2px dotted #eee; +} + +.create-palette-new-color { + border:2px dotted var(--highlight-color); + + border-radius: 2px; + line-height: 40px; + text-align: center; + font-size: 20px; + color: var(--highlight-color); +} + +.create-palette-color.selected { + border:2px solid var(--highlight-color); +} + +.create-palette-remove-color { + position: absolute; + top: 0; + right: 0; + padding: 2px 4px 0 0; + opacity : 0.2; + + font-weight: bold; + color: rgb(255,255,255); + text-shadow : 0 0 1px rgb(0,0,0); + + transition : opacity 0.3s, color 0.1s; +} + +.light-color .create-palette-remove-color { + color: rgb(0,0,0); + text-shadow : 0 0 1px rgb(255,255,255); +} + +.selected .create-palette-remove-color { + top: -1px; + right: -1px; +} + +.create-palette-color:hover .create-palette-remove-color { + opacity: 0.6; +} + +.create-palette-color .create-palette-remove-color:hover { + opacity: 1; + color: rgb(240,80,80); + text-shadow : 0 0 1px rgb(0,0,0); +} + +/*SPECTRUM OVERRIDES*/ + +.create-palette .sp-container{ + background-color: transparent; + border: none; + box-shadow : none; + border-radius:0; + padding:5px; +} \ No newline at end of file diff --git a/dev/css/dialogs-import.css b/dev/css/dialogs-import.css new file mode 100644 index 00000000..ccb603a7 --- /dev/null +++ b/dev/css/dialogs-import.css @@ -0,0 +1,292 @@ +#dialog-container.import { + width: 500px; + height: 350px; + top : 50%; + left : 50%; + position : absolute; + margin-left: -250px; + margin-top: -175px; +} + +.import .dialog-content { + font-size: 1.3em; +} + +.import-step-container { + display: flex; + width: 100%; + height: 100%; + box-sizing: border-box; + box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.5); + background: #444; +} + +.import-step-content { + padding: 10px; +} + +.import-step-buttons { + position: absolute; + bottom: 10px; + right: 10px; + text-align: right; +} + +.import-first-step .import-back-button { + display: none; +} + +/** + * IMAGE IMPORT STEP + */ + +.import-image-container { + padding: 10px; +} + +.import-image-loading { + opacity: 0.3; + pointer-events: none; +} + +.import-image-loading::after { + content: 'loading image'; + + position: absolute; + width: 100%; + top: 0; + left: 0; + margin-top: 110px; + + text-align: center; + font-size: 3em; + color: white; + text-shadow: 0 0 60px black; +} + +.import-subsection { + margin-left: 25px; +} + +.import-section:not(.import-subsection) > .dialog-section-title { + width: 50px; +} + +.import-section-preview-title { + position: absolute; + margin-left: 50%; + margin-top: -28px; +} + +.import-section-preview { + position: absolute; + display: inline-block; + border: 1px dashed #999; + border-radius: 3px; + margin-left: 50%; + top: 10px; + + width: 220px; + height: 220px; + display: flex; + align-items: center; + justify-content: center; +} + +.import-section-preview img { + max-width: 100%; + max-height: 100%; + display: block; +} + +.import-section-preview canvas { + position: absolute; +} + +.dialog-section-title { + display : inline-block; + width: 80px; +} + +.dialog-section-radio { + margin-top: 15px; + vertical-align: sub; +} + +.import-size-field:nth-of-type(2) { + margin-left: 5px; +} + +.import-image-file-name { + display: inline-block; + overflow: hidden; + + width: 200px; + vertical-align: middle; + + word-break : break-all; + white-space: nowrap; + text-overflow: ellipsis; + + font-style: italic; + font-weight: normal; + text-shadow: none; + color: var(--highlight-color); +} + +[name=smooth-resize-checkbox] { + margin : 0 8px; +} + +.dialog-import-body { + padding: 10px 20px; + font-size:1.3em +} + +/** + * SELECT MODE + */ + +.import-info { + display: flex; + flex-direction: column; + + height: 100%; + max-width: 178px; + box-sizing: border-box; + + padding: 10px; + border-right: 3px solid gold; +} + +.import-preview canvas { + max-width: 100%; + max-height: 100%; +} + +.import-meta { + margin-top: 10px; + box-sizing: border-box; + + /*center meta information horizontally*/ + display: flex; + flex-direction: column; + justify-content: center; +} + +.import-meta > div { + height: 22px; + display: flex; + margin-bottom: 5px; +} + +.import-meta-value, +.import-meta-label { + padding: 2px 4px; + border: 1px solid gold; +} + +.import-meta-label { + border-radius: 2px 0 0 2px; + color: var(--highlight-color); + border-right-width: 0; +} + +.import-meta-title .import-meta-label { + border-right-width: 1px; + border-radius: 2px; +} + +.import-meta-value { + border-radius: 0 2px 2px 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.import-missing { + text-align: center; + line-height: 70px; + font-style: italic; + color: #aaa; +} + +.import-mode-title { + margin-bottom: 10px +} + +.import-mode-section { + display: flex; + border: 3px solid #666; + border-radius: 3px; + padding: 10px; + margin-bottom: 10px; + align-items: center; +} + +.import-mode-section .button { + width: 75px; + height: 30px; + font-size: 14px; + margin-left: 10px; + + flex-grow: 0; + flex-shrink: 0; +} + +.import-mode-section-description { + flex-grow: 1; +} + +.import-resize-option, +.insert-mode-option { + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.import-resize-option :checked + span, +.insert-mode-option :checked + span { + color: var(--highlight-color); +} + +/** + * ADJUST SIZE + */ +.import-resize-anchor-info, +.import-resize-option-label { + margin-bottom: 10px; +} + +.import-resize-section { + margin-bottom: 10px; +} + +.import-resize-anchor { + margin-top: 20px; +} + +.import-resize-option :checked + span { + color: var(--highlight-color); +} + +.import-resize-warning { + color: var(--highlight-color); +} + +/** + * INSERT LOCATION + */ + +.insert-mode-container { + margin-top: 20px; + margin-bottom: 10px; +} + +.insert-frame-preview { + margin: 10px 0; +} + +.insert-frame-preview .frame-picker-wrapper { + height: 120px; +} \ No newline at end of file diff --git a/dev/css/dialogs-performance-info.css b/dev/css/dialogs-performance-info.css new file mode 100644 index 00000000..8d3732ad --- /dev/null +++ b/dev/css/dialogs-performance-info.css @@ -0,0 +1,68 @@ +.performance-link { + display: none; + position: fixed; + bottom: 10px; + right: 10px; + z-index: 11000; + cursor: pointer; + opacity: 0; + transition : opacity 0.3s; +} + +.performance-link.visible { + display: block; + opacity: 0.66; + animation: glow 2s infinite; +} + +.performance-link.visible:hover { + opacity: 1; + animation: none; +} + +#dialog-container.performance-info { + width: 500px; + height: 525px; + top : 50%; + left : 50%; + position : absolute; + margin-left: -250px; + margin-top: -260px; + +} + +.dialog-performance-info-body { + font-size: 13px; + letter-spacing: 1px; + padding: 10px 20px; +} + +.dialog-performance-info-body ul { + border: 1px solid #666; + padding: 5px; + border-radius: 3px; +} + +.dialog-performance-info-body li { + list-style-type: initial; + margin: 0 20px; +} + +.dialog-performance-info-body sup { + color: var(--highlight-color); + cursor: pointer; +} + +.show #dialog-container.performance-info { + margin-top: -300px; +} + +.dialog-performance-info-body .warning-icon { + float: left; + margin-top: 10px; +} + +.dialog-performance-info-body .warning-icon-info { + overflow: hidden; + margin-left: 30px; +} diff --git a/dev/css/dialogs-unsupported-browser.css b/dev/css/dialogs-unsupported-browser.css new file mode 100644 index 00000000..257bb556 --- /dev/null +++ b/dev/css/dialogs-unsupported-browser.css @@ -0,0 +1,32 @@ +/************************************************************************************************/ +/* Unsupported browser dialog */ +/************************************************************************************************/ + +#dialog-container.unsupported-browser { + width: 600px; + height: 260px; + top : 50%; + left : 50%; + position : absolute; + margin-top: -130px; + margin-left: -300px; +} + +.unsupported-browser .dialog-content { + font-size:1.2em; + letter-spacing: 1px; + padding:10px 20px; + overflow: auto; +} + +.unsupported-browser .supported-browser-list { + padding: 5px 20px; +} + +.unsupported-browser .supported-browser-list li { + list-style-type: square; +} + +#current-user-agent { + color: var(--highlight-color); +} diff --git a/dev/css/dialogs.css b/dev/css/dialogs.css new file mode 100644 index 00000000..b6b651b7 --- /dev/null +++ b/dev/css/dialogs.css @@ -0,0 +1,84 @@ +#dialog-container-wrapper { + position: absolute; + z-index: 20000; + + top: 0; + right: 0; + bottom: 0; + left: 0; + + padding: 50px 150px; + overflow: hidden; + + box-sizing: border-box; + -moz-box-sizing : border-box; + + background-color: rgba(0,0,0,0.8); + opacity: 0; + pointer-events: none; + + color: white; +} + +#dialog-container-wrapper.animated { + transition: opacity 0.2s; +} + +#dialog-container-wrapper.show { + opacity: 1; + pointer-events: auto; +} + +#dialog-container { + width: 100%; + height: 100%; + + margin-top: -1500px; + + box-sizing: border-box; + -moz-box-sizing : border-box; + + border-radius: 3px; + border : 3px solid var(--highlight-color); + background: #444; + overflow: auto; +} + +.show #dialog-container { + margin-top: 0; +} + +.dialog-wrapper { + height: 100%; + position : relative; +} + +.dialog-content { + position: absolute; + top: 45px; + bottom: 0; + width: 100%; + box-sizing: border-box; +} + +.dialog-head { + width: 100%; + background: var(--highlight-color); + margin: 0; + padding: 10px; + color: black; + font-size: 1.8em; + height: 45px; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +.dialog-close { + position: absolute; + top: 0; + right: 0; + line-height: 45px; + margin-right: 10px; + font-size: 1.3em; + cursor: pointer; +} \ No newline at end of file diff --git a/dev/css/font-icon.css b/dev/css/font-icon.css new file mode 100644 index 00000000..f771603a --- /dev/null +++ b/dev/css/font-icon.css @@ -0,0 +1,96 @@ +@font-face { + font-family: 'piskel'; + src:url('fonts/icomoon.eot?-3olv93'); + src:url('fonts/icomoon.eot?#iefix-3olv93') format('embedded-opentype'), + url('fonts/icomoon.woff?-3olv93') format('woff'), + url('fonts/icomoon.ttf?-3olv93') format('truetype'), + url('fonts/icomoon.svg?-3olv93#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="piskel-icon-"], [class*=" piskel-icon-"] { + font-family: 'piskel'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.piskel-icon-eye:before { + content: "\e602"; +} + +.piskel-icon-onion:before { + content: "\e601"; +} + +.piskel-icon-download:before { + content: "\e600"; +} + +.piskel-icon-rotateleft:before { + content: "\e603"; +} + +.piskel-icon-rotateright:before { + content: "\e604"; +} + +.piskel-icon-fliph:before { + content: "\e605"; +} + +.piskel-icon-flipv:before { + content: "\e606"; +} + +.piskel-icon-trashplain:before { + content: "\e607"; +} + +.piskel-icon-trash:before { + content: "\e608"; +} + +.piskel-icon-merge:before { + content: "\e609"; +} + +.piskel-icon-pencil:before { + content: "\e610"; +} + +.piskel-icon-close:before { + content: "\e611"; +} + +.piskel-icon-minus:before { + content: "\e60a"; +} + +.piskel-icon-plus:before { + content: "\e60b"; +} + +.piskel-icon-arrow-up-fat:before { + content: "\e60c"; +} + +.piskel-icon-arrow-down-fat:before { + content: "\e60d"; +} + +.piskel-icon-arrow-up-thin:before { + content: "\e60e"; +} + +.piskel-icon-arrow-down-thin:before { + content: "\e60f"; +} diff --git a/clear_before_scale/css/fonts/icomoon.eot b/dev/css/fonts/icomoon.eot similarity index 100% rename from clear_before_scale/css/fonts/icomoon.eot rename to dev/css/fonts/icomoon.eot diff --git a/clear_before_scale/css/fonts/icomoon.svg b/dev/css/fonts/icomoon.svg similarity index 100% rename from clear_before_scale/css/fonts/icomoon.svg rename to dev/css/fonts/icomoon.svg diff --git a/clear_before_scale/css/fonts/icomoon.ttf b/dev/css/fonts/icomoon.ttf similarity index 100% rename from clear_before_scale/css/fonts/icomoon.ttf rename to dev/css/fonts/icomoon.ttf diff --git a/clear_before_scale/css/fonts/icomoon.woff b/dev/css/fonts/icomoon.woff similarity index 100% rename from clear_before_scale/css/fonts/icomoon.woff rename to dev/css/fonts/icomoon.woff diff --git a/clear_before_scale/css/fonts/piskel.eot b/dev/css/fonts/piskel.eot similarity index 100% rename from clear_before_scale/css/fonts/piskel.eot rename to dev/css/fonts/piskel.eot diff --git a/clear_before_scale/css/fonts/piskel.svg b/dev/css/fonts/piskel.svg similarity index 100% rename from clear_before_scale/css/fonts/piskel.svg rename to dev/css/fonts/piskel.svg diff --git a/clear_before_scale/css/fonts/piskel.ttf b/dev/css/fonts/piskel.ttf similarity index 100% rename from clear_before_scale/css/fonts/piskel.ttf rename to dev/css/fonts/piskel.ttf diff --git a/clear_before_scale/css/fonts/piskel.woff b/dev/css/fonts/piskel.woff similarity index 100% rename from clear_before_scale/css/fonts/piskel.woff rename to dev/css/fonts/piskel.woff diff --git a/dev/css/forms.css b/dev/css/forms.css new file mode 100644 index 00000000..5be66169 --- /dev/null +++ b/dev/css/forms.css @@ -0,0 +1,78 @@ +.row { + display: block; +} + +.textfield { + box-sizing:border-box; + + background : black; + border : 1px solid #888; + border-radius : 2px; + padding : 3px 10px; + color : white; + + height: 23px; +} + +.textfield[readonly="true"] { + background: transparent; +} + +.textfield[disabled=disabled] { + background : #3a3a3a; +} + +.textfield:focus { + border-color: var(--highlight-color); + outline: none; +} + +.textfield-small { + width : 50px; +} + +.button { + box-sizing: border-box; + height: 24px; + background-color: #666; + border-style: none; + border-radius: 2px; + cursor: pointer; + text-decoration: none; + + color: white; + font-weight: bold; + font-size: 1rem; + text-align: center; + + transition: background-color 0.2s linear; +} + +.button:hover { + color: var(--highlight-color); +} + +.button-primary { + background-color: var(--highlight-color); + color: black; +} + +.button-primary:hover { + background-color: white; + color: black; +} + +.button[disabled], +.button[disabled]:hover { + cursor:default; + background-color: #aaa; + color: #777; +} + +.import-size-field, +.resize-size-field, +.export-size-field { + width: 50px; + margin-right: 8px; + text-align: right; +} \ No newline at end of file diff --git a/dev/css/frames-list.css b/dev/css/frames-list.css new file mode 100644 index 00000000..b658a26b --- /dev/null +++ b/dev/css/frames-list.css @@ -0,0 +1,182 @@ +.preview-list-wrapper { + position: relative; + height: 100%; + overflow: hidden; +} + +.preview-list-scroller { + overflow-y: scroll; + overflow-x: hidden; + height: 100%; +} + +.top-overflow, +.bottom-overflow { + height: 20px; + position: absolute; + left: 0; + right: 12px; + + -webkit-transition: all 500ms ease-out; + -moz-transition: all 500ms ease-out; + -ms-transition: all 500ms ease-out; + -o-transition: all 500ms ease-out; + transition: all 500ms ease-out; + + background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D), + linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D); + background-size: 30px 40px; + background-repeat: repeat-x; + background-position: 3px 0; + z-index: 10; +} + +.top-overflow { + top: -20px; +} + +.bottom-overflow { + bottom: -20px; + background-position: 3px -20px; +} + +.top-overflow-visible .top-overflow { + top: 0; +} + +.bottom-overflow-visible .bottom-overflow { + bottom: 0; +} + +.preview-list { + list-style-type: none; + padding-right: 9px; +} + +.add-frame-action { + display: flex; + align-items: center; + + margin-top: 8px; + padding: 6px 0; + overflow: hidden; + width: 96px; + + border: #888 solid 3px; + border-radius: 4px; + + color: #888; + background-color: #222; + font-size: 13px; + cursor: pointer; +} + +.add-frame-action-icon { + margin: 3px; + float: left; + flex-shrink: 0; +} + +.add-frame-action .label { + overflow: hidden; + text-align: left; +} + +.add-frame-action:hover { + border-color: var(--highlight-color); +} + +.preview-tile { + position: relative; + border: #444 3px solid; + border-radius: 3px; + margin: 5px 0; + width: 96px; + height: 96px; +} + +.preview-tile:first-child { + margin-top: 0; +} + +.preview-tile:hover { + border: #999 3px solid; +} + +.tile-view { + position : relative; +} + +.preview-tile .tile-overlay { + z-index: 10; + position: absolute; + background-color: rgba(100, 100, 100, 0.6); + opacity: 0; + height: 30px; + width: 30px; + border: none; +} + +.preview-tile:hover .tile-overlay { + opacity: 1.0; +} + +.preview-tile .tile-overlay.tile-count { + display: block; + opacity: 1.0; + border-bottom-right-radius: 3px; + top: 0; + left: 0; + font-size: 14px; + line-height: 30px; + color: white; + font-weight: bold; + text-align: center; + cursor: default; +} + +.preview-tile .tile-overlay.delete-frame-action { + top: 0; + right: 0; + border-bottom-left-radius: 3px; + cursor: pointer; +} + +.preview-tile .tile-overlay.duplicate-frame-action { + bottom: 0; + right: 0; + border-bottom-left-radius: 3px; + cursor: pointer; +} + +.preview-tile .tile-overlay.dnd-action { + bottom: 0; + left: 0; + border-top-right-radius: 3px; + cursor: move; +} + +.preview-tile.selected { + border-color: var(--highlight-color); +} + +.preview-tile.selected:after { + content: ""; + position: absolute; + top: 38px; + right: -9px; + border: transparent 4px solid; + border-left-color: var(--highlight-color); + border-width: 6px 0 6px 6px; + border-style: solid; +} + + +/** + * Drag n drop styles. + */ + +.preview-tile-drop-proxy { + border: 3px dashed var(--highlight-color); + background-color: rgba(255, 215,0, 0.2); +} diff --git a/dev/css/icons.css b/dev/css/icons.css new file mode 100644 index 00000000..bcf40da9 --- /dev/null +++ b/dev/css/icons.css @@ -0,0 +1,362 @@ +/* +Icon classes can be used entirely standalone. They are named after their original file names. + +Example usage in HTML: + +`display: block` sprite: +
                                                        + +To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class: + +// CSS +.icon { + display: inline-block; +} + +// HTML + +*/ +.icon-common-keyboard-gold { + background-image: url(../img/icons.png); + background-position: 0px -230px; + width: 36px; + height: 21px; +} +.icon-common-swapcolors-arrow-grey { + background-image: url(../img/icons.png); + background-position: -230px -137px; + width: 18px; + height: 18px; +} +.icon-common-warning-red { + background-image: url(../img/icons.png); + background-position: -230px -116px; + width: 21px; + height: 21px; +} +.icon-frame-dragndrop-white { + background-image: url(../img/icons.png); + background-position: -230px -60px; + width: 30px; + height: 30px; +} +.icon-frame-duplicate-white { + background-image: url(../img/icons.png); + background-position: -230px -30px; + width: 30px; + height: 30px; +} +.icon-frame-plus-white { + background-image: url(../img/icons.png); + background-position: -230px -90px; + width: 26px; + height: 26px; +} +.icon-frame-recyclebin-white { + background-image: url(../img/icons.png); + background-position: -230px 0px; + width: 30px; + height: 30px; +} +.icon-minimap-popup-preview-arrow-gold { + background-image: url(../img/icons.png); + background-position: -230px -173px; + width: 18px; + height: 18px; +} +.icon-minimap-popup-preview-arrow-white { + background-image: url(../img/icons.png); + background-position: -230px -155px; + width: 18px; + height: 18px; +} +.icon-settings-export-white { + background-image: url(../img/icons.png); + background-position: -138px 0px; + width: 46px; + height: 46px; +} +.icon-settings-gear-white { + background-image: url(../img/icons.png); + background-position: -138px -46px; + width: 46px; + height: 46px; +} +.icon-settings-open-folder-white { + background-image: url(../img/icons.png); + background-position: -138px -92px; + width: 46px; + height: 46px; +} +.icon-settings-resize-white { + background-image: url(../img/icons.png); + background-position: 0px -138px; + width: 46px; + height: 46px; +} +.icon-settings-save-white { + background-image: url(../img/icons.png); + background-position: -46px -138px; + width: 46px; + height: 46px; +} +.icon-tool-circle { + background-image: url(../img/icons.png); + background-position: -92px -138px; + width: 46px; + height: 46px; +} +.icon-tool-colorpicker { + background-image: url(../img/icons.png); + background-position: -138px -138px; + width: 46px; + height: 46px; +} +.icon-tool-colorswap { + background-image: url(../img/icons.png); + background-position: -184px 0px; + width: 46px; + height: 46px; +} +.icon-tool-dithering { + background-image: url(../img/icons.png); + background-position: 0px 0px; + width: 46px; + height: 46px; +} +.icon-tool-eraser { + background-image: url(../img/icons.png); + background-position: -184px -92px; + width: 46px; + height: 46px; +} +.icon-tool-lasso-select { + background-image: url(../img/icons.png); + background-position: -184px -138px; + width: 46px; + height: 46px; +} +.icon-tool-lighten { + background-image: url(../img/icons.png); + background-position: 0px -184px; + width: 46px; + height: 46px; +} +.icon-tool-move { + background-image: url(../img/icons.png); + background-position: -46px -184px; + width: 46px; + height: 46px; +} +.icon-tool-paint-bucket { + background-image: url(../img/icons.png); + background-position: -92px -184px; + width: 46px; + height: 46px; +} +.icon-tool-pen { + background-image: url(../img/icons.png); + background-position: -138px -184px; + width: 46px; + height: 46px; +} +.icon-tool-rectangle-select { + background-image: url(../img/icons.png); + background-position: -184px -184px; + width: 46px; + height: 46px; +} +.icon-tool-rectangle { + background-image: url(../img/icons.png); + background-position: -184px -46px; + width: 46px; + height: 46px; +} +.icon-tool-shape-select { + background-image: url(../img/icons.png); + background-position: -92px -92px; + width: 46px; + height: 46px; +} +.icon-tool-stroke { + background-image: url(../img/icons.png); + background-position: -46px -92px; + width: 46px; + height: 46px; +} +.icon-tool-vertical-mirror-pen { + background-image: url(../img/icons.png); + background-position: 0px -92px; + width: 46px; + height: 46px; +} +.icon-tool-center { + background-image: url(../img/icons.png); + background-position: -92px -46px; + width: 46px; + height: 46px; +} +.icon-tool-clone { + background-image: url(../img/icons.png); + background-position: -92px 0px; + width: 46px; + height: 46px; +} +.icon-tool-crop { + background-image: url(../img/icons.png); + background-position: -46px -46px; + width: 46px; + height: 46px; +} +.icon-tool-flip { + background-image: url(../img/icons.png); + background-position: 0px -46px; + width: 46px; + height: 46px; +} +.icon-tool-rotate { + background-image: url(../img/icons.png); + background-position: -46px 0px; + width: 46px; + height: 46px; +} + +@media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 192dpi) { + .icon-common-keyboard-gold { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-common-swapcolors-arrow-grey { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-common-warning-red { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-frame-dragndrop-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-frame-duplicate-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-frame-plus-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-frame-recyclebin-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-minimap-popup-preview-arrow-gold { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-minimap-popup-preview-arrow-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-settings-export-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-settings-gear-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-settings-open-folder-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-settings-resize-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-settings-save-white { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-circle { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-colorpicker { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-colorswap { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-dithering { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-eraser { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-lasso-select { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-lighten { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-move { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-paint-bucket { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-pen { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-rectangle-select { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-rectangle { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-shape-select { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-stroke { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-vertical-mirror-pen { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-center { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-clone { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-crop { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-flip { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } + .icon-tool-rotate { + background-image: url(../img/icons@2x.png); + background-size: 260px 251px; + } +} diff --git a/dev/css/layout.css b/dev/css/layout.css new file mode 100644 index 00000000..b9dc9e24 --- /dev/null +++ b/dev/css/layout.css @@ -0,0 +1,160 @@ +/** + * Application layout + */ + +.main-wrapper { + position: fixed; + top: 5px; + right: 0; + bottom: 5px; + left: 0; +} + +.column-wrapper { + text-align: center; + font-size: 0; + display: flex; + + position: absolute; + left: 100px; /* Reserve room for tools on the left edge of the screen. */ + top: 0; + right: 50px; /* Reserve room for actions on the right edge of the screen. */ + bottom: 0; +} + +.left-column { + vertical-align: top; + height: 100%; + margin-right: 7px; + flex-shrink: 0; +} + +.main-column { + height: 100%; + position: relative; +} + +.right-column { + box-sizing: border-box; + vertical-align: top; + height: 100%; + flex-shrink: 0; + + display: flex; + flex-direction: column; + position: relative; + + margin-left: 10px; + /* Add some padding for the absolutely positioned .cursor-coordinates */ + padding-bottom: 20px; +} + +.drawing-canvas-container { + font-size: 0; +} + +.sticky-section { + position: fixed; + top: 0; + bottom: 0; + z-index: 1000; +} + +.sticky-section .sticky-section-wrap { + display: table; + height: 100%; +} + +.sticky-section .vertical-centerer { + display: table-cell; + vertical-align: middle; +} + +.left-sticky-section.sticky-section { + left: 0; + max-width: 100px; +} + +.left-sticky-section .tool-icon { + float: left; +} + +.cursor-coordinates { + color:#888; + font-size:12px; + font-weight:bold; + font-family:monospace; +} + +/** + * Canvases layout + */ + +.canvas { + position: relative; + z-index: 1; +} + +.canvas-container { + position: relative; + display: block; +} + +.canvas-container .canvas-background { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.light-picker-background, +.light-canvas-background .canvas-background { + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEXf39////8zI3BgAAAAHklEQVR4AWNghAIGCMDgjwgFCDDSw2M0PSCD0fQAACRcAgF4ciGUAAAAAElFTkSuQmCC') repeat; +} + +.medium-picker-background, +.medium-canvas-background .canvas-background { + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEW6urr///82MBGFAAAAHUlEQVR4AWOAAUYoQOePEAUj3v9oYDQ9gMBoegAAJFwCAbLaTIMAAAAASUVORK5CYII=') repeat; +} + +.lowcont-medium-picker-background, +.lowcont-medium-canvas-background .canvas-background { + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEXV1dXb29tFGkCIAAAAHklEQVR4AWNghAIGCMDgjwgFCDDSw2M0PSCD0fQAACRcAgF4ciGUAAAAAElFTkSuQmCC') repeat; +} + +.lowcont-dark-picker-background, +.lowcont-dark-canvas-background .canvas-background { + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEVMTExVVVUnhsEkAAAAHUlEQVR4AWOAAUYoQOePEAUj3v9oYDQ9gMBoegAAJFwCAbLaTIMAAAAASUVORK5CYII=') repeat; +} + +.canvas.onion-skin-canvas { + opacity: 0.2; +} + +.canvas.canvas-overlay, +.canvas.layers-canvas, +.canvas.onion-skin-canvas { + position: absolute; + top: 0; + left: 0; +} + +.tools-wrapper, +.options-wrapper, +.palette-wrapper { + float : left; +} + +/** + * Z-indexes should match the drawing area canvas superposition order : + * - 1 : draw layers below current layer + * - 2 : draw current layer + * - 3 : draw layers above current layer + * - 4 : draw the tools overlay + */ +.canvas.layers-below-canvas {z-index: 7;} +.canvas.drawing-canvas {z-index: 8;} +.canvas.canvas-overlay {z-index: 9;} +.canvas.onion-skin-canvas {z-index: 10;} +.canvas.layers-above-canvas {z-index: 11;} \ No newline at end of file diff --git a/dev/css/minimap.css b/dev/css/minimap.css new file mode 100644 index 00000000..5864afd0 --- /dev/null +++ b/dev/css/minimap.css @@ -0,0 +1,8 @@ +.minimap-crop-frame { + position: absolute; + border: 2px solid gold; + z-index: 100; + box-sizing: border-box; + -moz-box-sizing: border-box; + cursor: pointer; +} \ No newline at end of file diff --git a/dev/css/notifications.css b/dev/css/notifications.css new file mode 100644 index 00000000..6cd2e66a --- /dev/null +++ b/dev/css/notifications.css @@ -0,0 +1,72 @@ +.user-message { + position: absolute; + right: 0; + bottom: 0; + padding: 10px 47px; + max-width: 300px; + + border-top-left-radius: 7px; + border: #e1a325 2px solid; + border-right: 0; + border-bottom: 0; + + color: #222; + background-color: var(--highlight-color); + + font-weight: bold; + font-size: 13px; + + z-index: 30000; +} + +.user-message .close { + position: absolute; + top: 6px; + right: 17px; + + font-size: 18px; + font-weight: bold; + + cursor: pointer; +} + +.user-message .close:hover { + color: black; +} + +.progress-bar-container { + position: absolute; + left: 0; + bottom: 0; + padding: 10px; + width: 360px; + border-top-right-radius: 2px; + border: var(--highlight-color) 2px solid; + border-left: 0; + border-bottom: 0; + background-color: #444; + font-size: 14px; + z-index: 30000; + color: #eee; +} + +.progress-bar-item { + float: left; + height:20px; +} + +.progress-bar-status { + line-height: 20px; + width : 40px; + overflow : hidden; + margin: 0 0 0 10px; +} + +.progress-bar { + border : 1px solid grey; + margin-top: 8px; + height : 4px; + width : 300px; + background : linear-gradient(to left, var(--highlight-color), var(--highlight-color)) no-repeat -300px 0; + background-color : black; +} \ No newline at end of file diff --git a/dev/css/pensize.css b/dev/css/pensize.css new file mode 100644 index 00000000..4fc85931 --- /dev/null +++ b/dev/css/pensize.css @@ -0,0 +1,57 @@ +.pen-size-container { + overflow: hidden; + padding: 5px 5px; +} + +.pen-size-option { + float: left; + box-sizing: border-box; + width: 20px; + height: 20px; + margin-right: 2px; + border-style: solid; + border-width: 2px; + border-color: #444; + cursor: pointer; +} + +.pen-size-option[data-size='1'] { + padding: 5px; +} +.pen-size-option[data-size='2'] { + padding: 4px; +} +.pen-size-option[data-size='3'] { + padding: 3px; +} +.pen-size-option[data-size='4'] { + padding: 2px; +} + +.pen-size-option:before { + content: ''; + width: 100%; + height: 100%; + background-color: white; + display: block; + text-align: center; + line-height: 12px; + font-size: 90%; +} + +.pen-size-option:hover { + border-color: #888; +} + +.pen-size-option.selected:before { + background-color: var(--highlight-color); +} + +.pen-size-option.selected { + border-color: var(--highlight-color); +} + +.pen-size-option.labeled:before { + content: attr(real-pen-size); + color: black; +} diff --git a/dev/css/reset.css b/dev/css/reset.css new file mode 100644 index 00000000..b9d9a303 --- /dev/null +++ b/dev/css/reset.css @@ -0,0 +1,52 @@ +html, body { + height : 100%; width: 100%; + margin : 0; + overflow: hidden; + cursor : default; + font-family: Arial; + font-size: 11px; + line-height: 1.1; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +ul, li { + margin : 0; + padding : 0; + list-style-type: none; +} + +/** Firefox overrides this with -moz-use-system-font */ +button, +input, +input[type="submit"] { + font-family: Arial; +} + +/* IE11 applies a big default margin for range inputs */ +input[type="range"] { + padding: 0; +} + +/* Force apparition of scrollbars on leopard */ +::-webkit-scrollbar { + -webkit-appearance: none; + width: 6px; +} + +::-webkit-scrollbar-thumb { + border-radius: 2px; + background-color: #666; +} + +::-webkit-scrollbar-track { + background-color: rgba(50, 50, 50, 0.4); +} + +a, a:visited { + color: var(--highlight-color); +} \ No newline at end of file diff --git a/dev/css/settings-application.css b/dev/css/settings-application.css new file mode 100644 index 00000000..19c3bd86 --- /dev/null +++ b/dev/css/settings-application.css @@ -0,0 +1,94 @@ +/*******************************/ +/* Application Setting panel */ +/*******************************/ +.application-settings-form { + height: 100%; +} + +.settings-section-application { + position: relative; + overflow: hidden; + margin: 0 20px; + height: 100%; +} + +.background-picker-wrapper { + display: inline-block; + width: 130px; + overflow: hidden; + vertical-align: middle; + margin-left: 5px; +} + +.background-picker { + cursor: pointer; + float: left; + height: 14px; + width: 14px; + background-color: transparent; + margin-right: 5px; + padding: 1px; + position: relative; + border: #888 2px solid; +} + +.background-picker:hover { + border-color: #eee; +} + +.background-picker.selected { + border-color: var(--highlight-color); +} + +.settings-opacity-input { + margin: 5px; + vertical-align: middle; +} + +.layer-opacity-input { + width: 100px; +} + +.seamless-opacity-input { + width: 75px; +} + +.settings-opacity-text { + height: 31px; + display: inline-block; + line-height: 30px; + width: 40px; + border: 1px solid grey; + box-sizing: border-box; + border-radius: 3px; + text-align: center; +} + +.grid-width-select, +.color-format-select { + margin: 5px 5px 0 5px; +} + +.settings-section-application > .settings-title { + /* Override the default 10px margin bottom for this panel */ + margin-bottom: 15px; +} + +.settings-section-application .button-primary { + margin-top: 10px; +} + +.settings-version-info { + position: absolute; + bottom: 10px; + right: 10px; + color: #888; +} + +/* Override default link styles for the release notes link + It doesn't need to popout too much */ +.settings-version, +.settings-version:hover { + color: white !important; + text-decoration: none !important; +} \ No newline at end of file diff --git a/dev/css/settings-export.css b/dev/css/settings-export.css new file mode 100644 index 00000000..b667c0d7 --- /dev/null +++ b/dev/css/settings-export.css @@ -0,0 +1,185 @@ +/*******************************/ +/* Gif/Png Export Setting panel*/ +/*******************************/ +.gif-download-button, +.gif-render-button { + margin-top : 10px; + margin-right : 10px; +} + +.gif-export-preview, +.png-export-preview { + position:relative; + margin-top:10px; + max-height:32px; +} + +.gif-export-preview { + max-width:32px; +} + +.png-export-preview img { + max-height:32px; + float: left; +} + +.png-export-preview .light-picker-background { + max-width:240px; +} + +.gif-upload-status { + width: 180px; + margin-left: 5px; + margin-top: 10px; +} + +.gif-upload, +.png-export-preview { + overflow: hidden; +} + +.gif-upload-status, +.gif-export-preview { + float : left; +} + +.preview-upload-ongoing:before{ + content: "Upload ongoing ..."; + position: absolute; + display: block; + height: 100%; + width: 100%; + text-align: center; + padding-top: 45%; + box-sizing:border-box; + -moz-box-sizing:border-box; + background: rgba(0,0,0,0.5); + color: white; +} + +.export-scale { + margin-bottom: 10px; +} + +.export-scale .scale-input { + margin: 5px; + vertical-align: middle; + width: 150px; +} + +.export-scale .scale-text { + height: 31px; + display: inline-block; + line-height: 30px; + width: 40px; + border: 1px solid grey; + box-sizing: border-box; + border-radius: 3px; + text-align: center; +} + +.export-resize { + margin: 10px 0; + overflow: hidden; +} + +.export-resize > * { + float: left; +} + +.export-resize > *:not(:last-child) { + margin-right: 10px; +} + +.export-resize > .resize-field { + width: 70px; +} + +.export-resize > .resize-label { + height: 23px; + line-height: 23px; +} + +.export-tabs { + overflow: hidden; + position: relative; +} + +.export-tabs:after { + content: ""; + display: block; + position: absolute; + bottom: 0; + width: 100%; + height: 1px; + z-index: 0; + background-color: var(--highlight-color); +} + +.export-tab { + float: left; + cursor: pointer; + padding: 5px; + border: 1px solid transparent; + border-radius: 2px 2px 0 0; + /* Make sure the tab and its border are positioned above the :after element; */ + position: relative; + z-index: 1; +} + +.export-tab.selected, +.export-tab:hover { + color: var(--highlight-color); +} + +.export-tab.selected { + border-color: var(--highlight-color); + border-bottom-color: #444; + border-style: solid; + border-width: 1px; +} + +.export-panel-header { + padding: 10px 5px 0px; +} + +.export-info { + font-style: italic; + text-shadow: none; + font-weight: normal; +} + +.export-panel-section { + padding: 5px; + margin-top: 10px; + border: 1px solid #5d5d5d; + border-radius: 2px; +} + +.export-panel-row { + display: flex; + align-items: center; + overflow: hidden; +} + +.export-panel-gif .button { + margin-right: 5px; + width: 75px; + flex-shrink: 0; +} + +.export-panel-png .textfield { + width: 50px; +} + +.png-export-dimension-info, +.png-export-datauri-info { + margin-left: 5px; +} + +#png-export-columns, +#png-export-rows { + /* Override default textfield padding-right to keep the number spinners + aligned to the right. */ + padding-right: 0; +} diff --git a/dev/css/settings-import.css b/dev/css/settings-import.css new file mode 100644 index 00000000..ed3aa18b --- /dev/null +++ b/dev/css/settings-import.css @@ -0,0 +1,18 @@ +/************************************************************************************************/ +/* Import panel */ +/************************************************************************************************/ + +.import-section, +.resize-section { + margin: 10px 0; +} + +.file-input-button { + margin-right: 8px; + border-radius: 2px; +} + +.import-highlight { + font-weight: bold; + color: white; +} \ No newline at end of file diff --git a/dev/css/settings-resize.css b/dev/css/settings-resize.css new file mode 100644 index 00000000..8c79bba5 --- /dev/null +++ b/dev/css/settings-resize.css @@ -0,0 +1,12 @@ +.resize-section-title { + vertical-align: top; + display: inline-block; + padding-top: 5px; + width: 25%; +} + +.resize-anchor-container { + position: relative; + margin-top: 5px; + display: inline-block; +} diff --git a/dev/css/settings-save.css b/dev/css/settings-save.css new file mode 100644 index 00000000..25df9f69 --- /dev/null +++ b/dev/css/settings-save.css @@ -0,0 +1,36 @@ +.save-field { + width: 100%; +} + +.save-status { + margin-top: 10px; + margin-bottom: -10px; + vertical-align: middle; + font-weight: normal; + text-shadow: none; + font-style: italic; +} + +.save-file-name { + white-space: nowrap; + font-weight: bold; + color: white; + font-style: normal; +} + +.save-desktop-file-name { + word-wrap: break-word; + font-weight: bold; + color: white; + font-style: normal; +} + +.save-status-warning-icon { + float: left; + margin-top: 5px; +} + +.save-status-warning-icon { + overflow: hidden; + padding-left: 10px; +} diff --git a/dev/css/settings.css b/dev/css/settings.css new file mode 100644 index 00000000..909c30ef --- /dev/null +++ b/dev/css/settings.css @@ -0,0 +1,96 @@ + +/** Righty sticky drawer expanded state. */ + +.right-sticky-section.sticky-section { + right: 0; + width: 47px; + + -webkit-transition: all 200ms ease-out; + -moz-transition: all 200ms ease-out; + -ms-transition: all 200ms ease-out; + -o-transition: all 200ms ease-out; + transition: all 200ms ease-out; +} + +.right-sticky-section.expanded { + right: 280px; +} + +.right-sticky-section .tool-icon { + float: right; + margin-right: 0; +} + +.tool-icon .label { + position: absolute; + left: 0; + bottom: 4px; + right: 0; + font-size: 11px; + text-transform: uppercase; + color: #fff; + text-align: center; +} + +.drawer-content { + overflow: hidden; + background-color: #444; + height: 550px; + max-height: 100%; + width: 280px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + box-shadow: 0 0 5px 0 black; +} + +.right-sticky-section.expanded .tool-icon { + padding-right: 1px; +} + +.right-sticky-section .tool-icon.has-expanded-drawer { + position: relative; + background-color: #444; + margin-right: 0; + padding-right: 2px; + border-left : 3px solid var(--highlight-color); +} + +/************************************************************************************************/ +/* Common settings classes */ +/************************************************************************************************/ + +.settings-section { + margin: 10px 20px; + font-size: 12px; + font-weight: bold; + color: #ccc; +} + +.settings-section .button { + margin: 0; +} + +.settings-title { + margin-top: 20px; + margin-bottom: 10px; + text-transform: uppercase; + border-bottom: 1px #aaa solid; + padding-bottom: 5px; + color: var(--highlight-color); +} + +.settings-description { + margin : 0 0 10px 0; +} + +.settings-form-section { + margin-bottom: 10px; +} + +.settings-item { + margin : 10px 0; +} + +[name*=checkbox] { + vertical-align: middle; +} diff --git a/dev/css/spectrum/spectrum-overrides.css b/dev/css/spectrum/spectrum-overrides.css new file mode 100644 index 00000000..7b293c2b --- /dev/null +++ b/dev/css/spectrum/spectrum-overrides.css @@ -0,0 +1,118 @@ +/** + * Piskel specific CSS for spectrum widgets + */ + +/* Widget's main container */ +.sp-container { + border-radius: 4px; + background-color: #2B2B2B; + border: solid 4px #888; + padding: 5px 5px 0 5px; + box-shadow : 0 0 5px 0 black; +} + +.sp-container[data-y-position=bottom] { + border-top-left-radius: 0; +} + +.sp-container[data-y-position=top] { + border-bottom-left-radius: 0; +} + +/* Color square container */ +.sp-color, .sp-hue { + border : 1px solid #222; +} + +/* Remove the padding on the input container */ +.sp-replacer { + padding: 4px; + height: 100%; + border-width: 0; + box-sizing: border-box; + -moz-box-sizing:border-box; + background-color: #444; +} + +.sp-replacer:hover { + background-color: #888; +} + +/* Hide the triangle */ +.sp-dd { + display: none; +} + +/* */ +.sp-preview { + margin-right: 0; + height: 100%; + width: 39px; + border-width: 0; +} + +.sp-palette-row-selection { + max-width: 62px; +} + +.sp-palette .sp-thumb-el { + margin : 0 5px 5px 0; + width: 24px; + height: 24px; + border-color: #444; + +} + +.sp-picker-container, .sp-palette-container { + padding-top: 5px; + padding-right: 5px; + padding-left: 5px; + border-left-width: 0; + border-right-width: 0; +} + +.sp-picker-container { + padding: 5px; + padding-bottom: 300px; + margin-bottom: -295px; +} + +.sp-slider { + height: 5px; + left: -2px; + right: -2px; + border: 2px solid white; + background: rgba(255,255,255,0); + opacity: 1; + border-radius: 2px; + box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); +} + +.sp-dragger { + border-radius: 8px; + height: 12px; + width: 12px; + border: 2px solid white; + background: none; + box-sizing:border-box; + -moz-box-sizing:border-box; + box-shadow: 0 0 1px 1px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(0,0,0,0.5); +} + +.sp-palette .sp-thumb-el.sp-thumb-active { + border-color: var(--highlight-color); + box-shadow: 0 0 0px 1px var(--highlight-color); +} + +.sp-input { + border: 1px solid #666; + margin: 0; + background: #111; + border-radius: 2px; + color: #D3D3D3; + font-family: monospace!important; +} + +.sp-input.sp-validation-error { + background: #330000; +} \ No newline at end of file diff --git a/dev/css/spectrum/spectrum.css b/dev/css/spectrum/spectrum.css new file mode 100644 index 00000000..850e1930 --- /dev/null +++ b/dev/css/spectrum/spectrum.css @@ -0,0 +1,477 @@ +/*** +Spectrum Colorpicker v1.1.2 +https://github.com/bgrins/spectrum +Author: Brian Grinstead +License: MIT +***/ + +.sp-container { + position:absolute; + top:0; + left:0; + display:inline-block; + *display: inline; + *zoom: 1; + /* https://github.com/bgrins/spectrum/issues/40 */ + z-index: 9999994; + overflow: hidden; +} +.sp-container.sp-flat { + position: relative; +} + +/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ +.sp-top { + position:relative; + width: 100%; + display:inline-block; +} +.sp-top-inner { + position:absolute; + top:0; + left:0; + bottom:0; + right:0; +} +.sp-color { + position: absolute; + top:0; + left:0; + bottom:0; + right:20%; +} +.sp-hue { + position: absolute; + top:0; + right:0; + bottom:0; + left:84%; + height: 100%; +} +.sp-fill { + padding-top: 80%; +} +.sp-sat, .sp-val { + position: absolute; + top:0; + left:0; + right:0; + bottom:0; +} + +.sp-alpha-enabled .sp-top { + margin-bottom: 18px; +} +.sp-alpha-enabled .sp-alpha { + display: block; +} +.sp-alpha-handle { + position:absolute; + top:-4px; + bottom: -4px; + width: 6px; + left: 50%; + cursor: pointer; + border: 1px solid black; + background: white; + opacity: .8; +} +.sp-alpha { + display: none; + position: absolute; + bottom: -14px; + right: 0; + left: 0; + height: 8px; +} +.sp-alpha-inner { + border: solid 1px #333; +} + +/* Don't allow text selection */ +.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { + -webkit-user-select:none; + -moz-user-select: -moz-none; + -o-user-select:none; + user-select: none; +} + +.sp-container.sp-input-disabled .sp-input-container { + display: none; +} +.sp-container.sp-buttons-disabled .sp-button-container { + display: none; +} +.sp-palette-only .sp-picker-container { + display: none; +} +.sp-palette-disabled .sp-palette-container { + display: none; +} + +.sp-initial-disabled .sp-initial { + display: none; +} + + +/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ +.sp-sat { + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; + filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); +} +.sp-val { + background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; + filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); +} + +.sp-hue { + background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); + background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); +} + +/* IE filters do not support multiple color stops. + Generate 6 divs, line them up, and do two color gradients for each. + Yes, really. + */ +.sp-1 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); +} +.sp-2 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); +} +.sp-3 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); +} +.sp-4 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); +} +.sp-5 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); +} +.sp-6 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); +} + +.sp-hidden { + display: none !important; +} + +/* Clearfix hack */ +.sp-cf:before, .sp-cf:after { content: ""; display: table; } +.sp-cf:after { clear: both; } +.sp-cf { *zoom: 1; } + +/* Mobile devices, make hue slider bigger so it is easier to slide */ +@media (max-device-width: 480px) { + .sp-color { right: 40%; } + .sp-hue { left: 63%; } + .sp-fill { padding-top: 60%; } +} +.sp-dragger { + border-radius: 5px; + height: 5px; + width: 5px; + border: 1px solid #fff; + background: #000; + cursor: pointer; + position:absolute; + top:0; + left: 0; +} +.sp-slider { + position: absolute; + top:0; + cursor:pointer; + height: 3px; + left: -1px; + right: -1px; + border: 1px solid #000; + background: white; + opacity: .8; +} + +/* +Theme authors: +Here are the basic themeable display options (colors, fonts, global widths). +See http://bgrins.github.io/spectrum/themes/ for instructions. +*/ + +.sp-container { + border-radius: 0; + background-color: #ECECEC; + border: solid 1px #f0c49B; + padding: 0; +} +.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue +{ + font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.sp-top +{ + margin-bottom: 3px; +} +.sp-color, .sp-hue +{ + border: solid 1px #666; +} + +/* Input */ +.sp-input-container { + float:right; + width: 100px; + margin-bottom: 4px; +} +.sp-initial-disabled .sp-input-container { + width: 100%; +} +.sp-input { + font-size: 12px !important; + border: 1px inset; + padding: 4px 5px; + margin: 0; + width: 100%; + background:transparent; + border-radius: 3px; + color: #222; +} +.sp-input:focus { + border: 1px solid orange; +} +.sp-input.sp-validation-error +{ + border: 1px solid red; + background: #fdd; +} +.sp-picker-container , .sp-palette-container +{ + float:left; + position: relative; + padding: 10px; + padding-bottom: 300px; + margin-bottom: -290px; +} +.sp-picker-container +{ + width: 172px; + border-left: solid 1px #fff; +} + +/* Palettes */ +.sp-palette-container +{ + border-right: solid 1px #ccc; +} + +.sp-palette .sp-thumb-el { + display: block; + position:relative; + float:left; + width: 24px; + height: 15px; + margin: 3px; + cursor: pointer; + border:solid 2px transparent; +} +.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { + border-color: orange; +} +.sp-thumb-el +{ + position:relative; +} + +/* Initial */ +.sp-initial +{ + float: left; + border: solid 1px #333; +} +.sp-initial span { + width: 30px; + height: 25px; + border:none; + display:block; + float:left; + margin:0; +} + +/* Buttons */ +.sp-button-container { + float: right; +} + +/* Replacer (the little preview div that shows up instead of the ) */ +.sp-replacer { + margin:0; + overflow:hidden; + cursor:pointer; + padding: 4px; + display:inline-block; + *zoom: 1; + *display: inline; + border: solid 1px #91765d; + background: #eee; + color: #333; + vertical-align: middle; +} +.sp-replacer:hover, .sp-replacer.sp-active { + border-color: #F0C49B; + color: #111; +} +.sp-replacer.sp-disabled { + cursor:default; + border-color: silver; + color: silver; +} +.sp-dd { + padding: 2px 0; + height: 16px; + line-height: 16px; + float:left; + font-size:10px; +} +.sp-preview +{ + position:relative; + width:25px; + height: 20px; + border: solid 1px #222; + margin-right: 5px; + float:left; + z-index: 0; +} + +.sp-palette +{ + *width: 220px; + max-width: 220px; +} +.sp-palette .sp-thumb-el +{ + width:16px; + height: 16px; + margin:2px 1px; + border: solid 1px #d0d0d0; +} + +.sp-container +{ + padding-bottom:0; +} + + +/* Buttons: http://hellohappy.org/css3-buttons/ */ +.sp-container button { + background-color: #eeeeee; + background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); + background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); + background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); + background-image: -o-linear-gradient(top, #eeeeee, #cccccc); + background-image: linear-gradient(to bottom, #eeeeee, #cccccc); + border: 1px solid #ccc; + border-bottom: 1px solid #bbb; + border-radius: 3px; + color: #333; + font-size: 14px; + line-height: 1; + padding: 5px 4px; + text-align: center; + text-shadow: 0 1px 0 #eee; + vertical-align: middle; +} +.sp-container button:hover { + background-color: #dddddd; + background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); + background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); + border: 1px solid #bbb; + border-bottom: 1px solid #999; + cursor: pointer; + text-shadow: 0 1px 0 #ddd; +} +.sp-container button:active { + border: 1px solid #aaa; + border-bottom: 1px solid #888; + -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; +} +.sp-cancel +{ + font-size: 11px; + color: #d93f3f !important; + margin:0; + padding:2px; + margin-right: 5px; + vertical-align: middle; + text-decoration:none; + +} +.sp-cancel:hover +{ + color: #d93f3f !important; + text-decoration: underline; +} + + +.sp-palette span:hover, .sp-palette span.sp-thumb-active +{ + border-color: #000; +} + +.sp-preview, .sp-alpha, .sp-thumb-el +{ + position:relative; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); +} +.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner +{ + display:block; + position:absolute; + top:0;left:0;bottom:0;right:0; +} + +.sp-palette .sp-thumb-inner +{ + background-position: 50% 50%; + background-repeat: no-repeat; +} + +.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); +} + +.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); +} diff --git a/dev/css/style.css b/dev/css/style.css new file mode 100644 index 00000000..51eae66f --- /dev/null +++ b/dev/css/style.css @@ -0,0 +1,91 @@ +body { + background: #1D1D1D; +} + +/* Browser fixes */ +::-ms-clear { + display: none; +} + +.allow-user-select { + -webkit-touch-callout: initial; + -webkit-user-select: initial; + -khtml-user-select: initial; + -moz-user-select: initial; + -ms-user-select: initial; + user-select: initial; +} + +.no-overflow { + overflow: hidden; +} + +.highlight { + color: var(--highlight-color); +} + +.pull-top, +.pull-right, +.pull-bottom, +.pull-left { + position:absolute; +} + +.pull-top { + top:0; +} + +.pull-right { + right:0; +} + +.pull-bottom { + bottom:0; +} + +.pull-left { + left:0; +} + +.uppercase { + text-transform: uppercase; +} + +.checkbox-fix { + margin-left: 0; +} + +.hidden { + display: none; +} + +/** + * TOOLTIPS + */ +.tooltip-shortcut { + color: var(--highlight-color); +} + +.tooltip-container { + text-align: left; +} + +.tooltip-descriptor { + color:#999; +} + +.tooltip-descriptor:last-child { + padding-bottom: 5px; +} + +.tooltip-descriptor-button { + padding: 2px; + border: 1px Solid #999; + font-size: 0.8em; + margin-right: 5px; + width: 35px; + text-align: center; + border-radius: 3px; + display: inline-block; + line-height: 10px; +} \ No newline at end of file diff --git a/dev/css/toolbox-animated-preview.css b/dev/css/toolbox-animated-preview.css new file mode 100644 index 00000000..7037ee51 --- /dev/null +++ b/dev/css/toolbox-animated-preview.css @@ -0,0 +1,200 @@ +/** + * Animated preview styles. + */ + +.preview-container { + flex-shrink: 0; + + border : 0 Solid black; + border-radius:5px 0 0 5px; + box-shadow : 0 0 2px rgba(0,0,0,0.2); + font-size: 0; +} + +.preview-container .canvas-container { + overflow : hidden; +} + +.preview-container canvas { + border : 0 Solid transparent; +} + +.canvas-container .animated-preview-canvas-background { + position : relative; + height: 100%; +} + +#animated-preview-container { + background: #333; + border-radius : 0 0 2px 2px; + overflow : hidden; +} + +.canvas-container-wrapper { + height :200px; + width : 200px; + overflow:hidden; +} + +.preview-container .background-image-frame-container { + height: 100%; + width: 100%; + position: relative; + background-position: center; +} + +.display-fps { + float: left; + color: #aaa; + font-size: 12px; + min-width: 55px; + vertical-align: bottom; + line-height: 26px; +} + +.range-fps { + overflow: hidden; + width: 100px; + height : 26px; + margin : 0; + box-sizing: border-box; +} + +.preview-toggle-onion-skin { + font-size: 2rem; + color: #aaa; + float: left; + line-height: 26px; + height: 100%; + padding-left: 5px; + padding-right: 5px; + border-right: 1px solid #222; + transition: 0.2s linear; + cursor:pointer; +} + +.preview-toggle-onion-skin:hover { + color : white; +} + +.preview-toggle-onion-skin-enabled, +.preview-toggle-onion-skin-enabled:hover { + color : var(--highlight-color); +} + +.preview-contextual-actions { + position : absolute; + z-index: 500; + right : 10px; + top : 10px; + + cursor : pointer; + + opacity: 0; + transition: 0.3s opacity, 0.3s border-color; +} + +.minimap-container:hover .preview-contextual-actions { + opacity: 1; +} + +.preview-contextual-action { + float: left; + + width : 18px; + height: 18px; + line-height: 18px; + margin: 0 5px; + + border: 2px solid white; + background-color: rgba(0, 0, 0, 0.3); + color: white; + + font-size: 10px; + font-weight: bold; + font-family: Tahoma; +} + +.preview-contextual-action-hidden { + display: none; +} + +.preview-contextual-action:hover { + color: var(--highlight-color); + border-color: var(--highlight-color); +} + +/** + * Drop-down in preview size selection + */ +.preview-drop-down { + float: left; + position: relative; + width : 22px; + min-height: 22px; + margin: 0 5px; +} + +.preview-drop-down.preview-drop-down-disabled { + opacity: 0.5; +} + +.preview-disable-overlay{ + position: absolute; + width: 100%; + height: 100%; + display: none; +} + +.preview-drop-down.preview-drop-down-disabled .preview-disable-overlay { + display: block; + z-index: 10; +} + +.preview-drop-down .preview-contextual-action { + position: relative; + margin: 0 0 -100% 0; + opacity: 0; + transition: opacity linear .2s, + margin linear .2s; + transition-delay: 0s, .2s; + z-index: 1; +} + +.preview-drop-down:hover .preview-contextual-action { + margin: 0 0 5px 0; + opacity: 1; + transition-delay: 0s, 0s; +} + +.preview-drop-down .size-button-selected { + opacity: 1; + color: gold; + border-color: gold; + z-index: 5; +} + + +.open-popup-preview-button { + border : 2px solid white; + background-color : rgba(0,0,0,0.3); +} + +.open-popup-preview-button:hover { + border-color: var(--highlight-color); +} + +/** + * The regular image is provided by the sprite icons.png+icons.css + */ +.icon-minimap-popup-preview-arrow-white:hover { + background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold.png); + background-position: 0 0; + background-size: 18px 18px; +} + +@media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 192dpi) { + background-image: url(../img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png); + +} diff --git a/dev/css/toolbox-layers-list.css b/dev/css/toolbox-layers-list.css new file mode 100644 index 00000000..b03e861c --- /dev/null +++ b/dev/css/toolbox-layers-list.css @@ -0,0 +1,92 @@ + +/** + * Layers container + */ +.layers-list-container { + min-height: 85px; + display: flex; + flex-direction: column; +} + +/** + * Layers title and toggle preview + */ + +.layers-title { + position: relative; + flex-shrink: 0; +} + +.layers-toggle-preview { + position: absolute; + top: 0.3em; + right: 0.5em; + + color: #999; + font-size: 1.3em; + cursor: pointer; + + transition: 0.2s linear; +} + +.layers-toggle-preview:hover { + color: white; +} + +.layers-toggle-preview-enabled, +.layers-toggle-preview-enabled:hover { + color : var(--highlight-color); +} + +/** + * Layers buttons + */ + +.layers-button { + margin: 0; + width: 16.66667%; + float : left; +} + +/** + * Layers list + */ + +.layers-list { + font-size : 12px; + overflow: auto; +} + +.layer-item { + position: relative; + display: flex; + height:24px; + line-height: 24px; + border-top: 1px solid #444; + cursor: pointer; +} + +.layer-item .layer-name { + padding: 0 0 0 10px; + flex: 1 auto; + white-space: nowrap; +} + +.layer-item .layer-name.overflowing-name { + overflow: hidden; + text-overflow: ellipsis; +} + +.layer-item:hover { + background : #222; +} + +.layer-item-opacity { + padding-right: 8px; +} + +.current-layer-item, +.current-layer-item:hover { + background : #333; + color: var(--highlight-color); +} \ No newline at end of file diff --git a/dev/css/toolbox-palettes-list.css b/dev/css/toolbox-palettes-list.css new file mode 100644 index 00000000..136571cf --- /dev/null +++ b/dev/css/toolbox-palettes-list.css @@ -0,0 +1,174 @@ +.palettes-list-container { + min-height: 100px; + display: flex; + flex-direction: column; +} + +.palettes-title { + flex-shrink: 0; + background-size: 22px; + background-repeat: no-repeat; + background-position: 97%; +} + +/** + * Palettes action buttons + */ + +.palettes-list-container .toolbox-buttons { + background-color: #3f3f3f; + height: 24px; + padding: 0; +} + +.palettes-list-button, +.palettes-list-select { + margin: 0; + float: left; +} + +.palettes-list-button { + width: 16.66667%; +} + +.palettes-list-select { + width: 66.66667%; + height: 100%; + padding: 0 5px 0 5px; + + color: #aaa; + font-size : 0.75em; + + text-align:left; + font-weight: normal; + + transition : background-color 0.3s, color 0.3s; + cursor:pointer; +} + +.palettes-list-select:hover, +.palettes-list-select:focus { + background-color: #484848; + color: white; +} + +.palettes-list-select:focus { + outline: none; +} + +/* + * Palette colors list + */ + +.palettes-list-colors { + height: 100%; + max-height: 160px; + overflow: auto; + padding-top: 5px; +} + +.palettes-list-color { + cursor: pointer; + float: left; + margin: 0 0 5px 5px; + width: calc((100% - 30px) / 5); + height: 32px; + position: relative; +} + +.palettes-list-color div { + height: 100%; +} + +/* + * Placeholder when no color is available in the current palette + */ + +.palettes-list-no-colors { + height: 35px; + line-height: 35px; + width: 100%; + color: gray; + font-size: 0.7em; + font-style: italic; + text-align: center +} + +/* + * Primary and secondary color markers + */ + +.palettes-list-primary-color:before, .palettes-list-secondary-color:before { + content: ""; + position: absolute; + bottom: 1px; + display: inline-block; + background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M1%203v10h10z%22/%3E%3C/svg%3E'); + width: 14px; + height: 14px; +} + +.palettes-list-primary-color:before { + left: 1px; +} + +.palettes-list-secondary-color:before { + right: 1px; + background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20height%3D%2215%22%20width%3D%2215%22%3E%3Cpath%20stroke%3D%22gold%22%20stroke-width%3D%222%22%20d%3D%22M3%2013h10V3z%22/%3E%3C/svg%3E'); +} + +/* + * Color index for the 9 first colors + */ + +.palettes-list-color:nth-child(-n+10):after { + position: absolute; + top: 0; + right: 0; + + background-color: black; + color: var(--highlight-color); + + font-family: Tahoma; + font-size: 0.5em; + font-weight: bold; + + padding: 2px 3px 2px 3px; + border-radius: 0 0 0 2px; +} + +.palettes-list-color:nth-child(1):after { + content: "1"; +} + +.palettes-list-color:nth-child(2):after { + content: "2"; +} + +.palettes-list-color:nth-child(3):after { + content: "3"; +} + +.palettes-list-color:nth-child(4):after { + content: "4"; +} + +.palettes-list-color:nth-child(5):after { + content: "5"; +} + +.palettes-list-color:nth-child(6):after { + content: "6"; +} + +.palettes-list-color:nth-child(7):after { + content: "7"; +} + +.palettes-list-color:nth-child(8):after { + content: "8"; +} + +.palettes-list-color:nth-child(9):after { + content: "9"; +} diff --git a/dev/css/toolbox.css b/dev/css/toolbox.css new file mode 100644 index 00000000..373c00da --- /dev/null +++ b/dev/css/toolbox.css @@ -0,0 +1,44 @@ +.toolbox-container { + border: 2px solid #888; + font-size: medium; + color: white; + text-align: left; + border-radius: 2px; + margin-top: 5px; + overflow: hidden; +} + +.toolbox-title { + padding: 8px; + margin: 0; + font-size: 15px; + /* reset for firefox */ + height: 16px; + background: #222; +} + +.toolbox-buttons { + flex-shrink: 0; + overflow: hidden; + border-top: 1px solid #666; + border-bottom: 1px solid #222; +} + +.toolbox-buttons .button { + /* Override border propery on .button elements from form.css */ + border-style: solid; + border-color: #333; + border-width: 0 1px 0 0; + border-radius: 0; + + background-color: #3f3f3f; +} + +.toolbox-buttons .button[disabled], +.toolbox-buttons .button[disabled]:hover { + background-color: #aaa; +} + +.toolbox-buttons button:last-child { + border-right-width: 0; +} diff --git a/dev/css/tools.css b/dev/css/tools.css new file mode 100644 index 00000000..9406517e --- /dev/null +++ b/dev/css/tools.css @@ -0,0 +1,167 @@ +.tool-icon { + position : relative; + cursor : pointer; + width: 46px; + height: 46px; + margin: 1px; + background-color: #3a3a3a; +} + +.tool-icon.selected { + cursor: default; + background-color: #444; +} + +.tool-icon.selected:before { + content:""; + position : absolute; + height : 100%; + width : 100%; + border: 3px solid var(--highlight-color); + box-sizing: border-box; +} + +.tool-icon:hover { + background-color: #444; +} + +/* + * Tool cursors: + */ + +.tool-paint-bucket .drawing-canvas-container:hover, +.tool-colorswap .drawing-canvas-container:hover { + cursor: url(../img/cursors/paint-bucket.png) 14 14, pointer; +} + +.tool-vertical-mirror-pen .drawing-canvas-container:hover { + cursor: url(../img/cursors/vertical-mirror-pen.png) 5 15, pointer; +} + +.tool-pen .drawing-canvas-container:hover { + cursor: url(../img/cursors/pen.png) 1 14, pointer; +} + +.tool-dithering .drawing-canvas-container:hover { + cursor: url(../img/cursors/dither.png) 1 14, pointer; +} + +.tool-lighten .drawing-canvas-container:hover { + cursor: url(../img/cursors/lighten.png) 1 15, pointer; +} + +.tool-eraser .drawing-canvas-container:hover { + cursor: url(../img/cursors/eraser.png) 3 14, pointer; +} + +.tool-stroke .drawing-canvas-container:hover { + cursor: url(../img/cursors/stroke.png) 1 14, pointer; +} + +.tool-rectangle .drawing-canvas-container:hover { + cursor: url(../img/cursors/rectangle.png) 5 15, pointer; +} + +.tool-circle .drawing-canvas-container:hover { + cursor: url(../img/cursors/circle.png) 5 15, pointer; +} + +.tool-move .drawing-canvas-container:hover { + cursor: url(../img/cursors/hand.png) 7 7, pointer; +} + +.tool-rectangle-select .drawing-canvas-container:hover, +.tool-lasso-select .drawing-canvas-container:hover { + cursor: crosshair; +} + +.tool-shape-select .drawing-canvas-container:hover { + cursor: url(../img/cursors/wand.png) 10 5, pointer; +} + +.tool-colorpicker .drawing-canvas-container:hover { + cursor: url(../img/cursors/dropper.png) 2 15, pointer; +} + +.swap-colors-button { + position: relative; + top: 50px; + left: 6px; + height: 18px; + width: 18px; + + opacity : 0.3; + + cursor : pointer; +} + +.swap-colors-button:hover { + opacity : 1; +} + +.tool-color-picker { + position:relative; +} + +.tool-color-picker:nth-child(1) { + z-index : 100; +} + +.tool-color-picker:nth-child(2) { + z-index : 90; + margin-top: 25px; + margin-left:-20px; +} + +.tool-color-picker input { + width: 16px; + height: 16px; + text-indent: -10000px; + border: 1px solid black; + background: white; + cursor: pointer; + position : relative; + top: 10px; + margin-left: 2px; +} + +.tool-color-picker .secondary-color-picker { + top : 18px; + margin-left: 0; +} + +.palette-wrapper { + margin-top: 10px; + margin-left: 10px; +} + +.palette-color[data-color=TRANSPARENT] { + position: relative; + top: 10px; + left: 10px; + background-color: white; + height : 16px; + width : 16px; + border: 2px solid #000; + background-size: 16px 16px; + background-position: 0 0; + background-image: -webkit-gradient( + linear, + left top, + right bottom, + color-stop(0, #fff), + color-stop(0.45, #fff), + color-stop(0.5, #ff0000), + color-stop(0.55, #fff), + color-stop(1, #fff) + ); + background-image: -moz-linear-gradient( + left top, + #fff 0%, + #fff 45%, + #f00 50%, + #fff 55%, + #fff 100% + ); +} + diff --git a/dev/css/transformations.css b/dev/css/transformations.css new file mode 100644 index 00000000..7c8c1d9f --- /dev/null +++ b/dev/css/transformations.css @@ -0,0 +1,40 @@ +.transformations-container { + flex-shrink: 0; +} + +.transformations-container .tool-icon { + margin: 0 0 5px 0; +} + +.transformations-container .tools-wrapper { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + height: 46px; + + /* Override the float:left set on tools-wrapper in layout.css; */ + float: initial; +} + +.transformations-container.show-more .tools-wrapper { + height: auto; + /* Compensate the 5px bottom-margin coming from the tool-icon */ + margin-bottom: -5px; +} + +.transformations-show-more-link { + position: absolute; + color: #999; + right: 8px; + font-weight: normal; + cursor: pointer; + transition: 0.2s linear; +} + +.transformations-show-more-link:hover { + color: white; +} + +.show-more .transformations-show-more-link { + color: gold; +} \ No newline at end of file diff --git a/dev/css/variables.css b/dev/css/variables.css new file mode 100644 index 00000000..07172635 --- /dev/null +++ b/dev/css/variables.css @@ -0,0 +1,3 @@ +html, body { + --highlight-color: gold; +} \ No newline at end of file diff --git a/dev/css/widgets-anchor.css b/dev/css/widgets-anchor.css new file mode 100644 index 00000000..b7e1e242 --- /dev/null +++ b/dev/css/widgets-anchor.css @@ -0,0 +1,98 @@ +/*****************/ +/* ANCHOR WIDGET */ +/*****************/ + +.anchor-wrapper { + overflow: hidden; + width: 70px; +} + +/* When transitioning between enabled and disabled states */ +.transition .anchor-option, +.transition .anchor-option:before { + transition: background-color 0.2s, border-color 0.2s; +} + +.anchor-option { + float: left; + position: relative; + + box-sizing: border-box; + margin: 0 1px 1px 0; + width: 20px; + height: 20px; + + background : #888; + + font-size: 8px; + text-align: center; + cursor: pointer; +} + +.disabled .anchor-option { + cursor: default; + background : #555; + border-color: #555 !important; +} + +.anchor-option:hover { + border : 3px solid white; +} + +.anchor-option.selected { + border : 3px solid var(--highlight-color); +} + +.anchor-option:before { + content: ''; + position: absolute; + display: block; + top: 50%; + left: 50%; + margin: -2px; +} + +.anchor-option.selected:before { + content: ''; + width: 4px; + height: 4px; + background: var(--highlight-color); +} + +.disabled .anchor-option.selected:before { + background: #555; +} + +.disabled .anchor-option[data-neighbor]:before { + border-color: #555 !important; +} + +.anchor-option[data-neighbor]:before { + width: 0; + height: 0; + border-width: 4px; + border-style: solid; + border-color: transparent; +} + +.anchor-option[data-neighbor="bottom"]:before { + border-top-color: var(--highlight-color); + margin-left: -4px; +} + +.anchor-option[data-neighbor="left"]:before { + border-right-color: var(--highlight-color); + margin-top: -4px; + margin-left: -6px; +} + +.anchor-option[data-neighbor="top"]:before { + border-bottom-color: var(--highlight-color); + margin-top: -6px; + margin-left: -4px; +} + +.anchor-option[data-neighbor="right"]:before { + border-left-color: var(--highlight-color); + margin-top: -4px; +} diff --git a/dev/css/widgets-frame-picker.css b/dev/css/widgets-frame-picker.css new file mode 100644 index 00000000..ae88885c --- /dev/null +++ b/dev/css/widgets-frame-picker.css @@ -0,0 +1,55 @@ +/***********************/ +/* FRAME PICKER WIDGET */ +/***********************/ + +.frame-picker-wrapper { + width: 150px; + height: 150px; + border: 3px solid #666; + border-radius: 3px; +} + +.frame-viewer { + width: 100%; + height: calc(100% - 25px); + display: flex; + align-items: center; + justify-content: center; + +} + +.frame-viewer > canvas, +.frame-viewer > img { + max-width: 100%; + max-height: 100%; +} + +.frame-nav { + display: flex; + width: 100%; + height: 24px; + border-top: 1px solid #666; +} + +.frame-nav .button { + flex-shrink: 0; + border-radius: 0; + height: 24px; + background-color: #3f3f3f; +} + +.frame-nav .button[disabled], +.frame-nav .button[disabled]:hover { + background-color: #aaa; +} + +.frame-nav .button + .button { + border-left: 1px solid #333; +} + +.frame-nav-input { + min-width: 1px; + border-style: none; + height: 24px; + text-align: center; +} diff --git a/dev/css/widgets-wizard.css b/dev/css/widgets-wizard.css new file mode 100644 index 00000000..67899464 --- /dev/null +++ b/dev/css/widgets-wizard.css @@ -0,0 +1,32 @@ +.wizard-wrapper { + z-index: 1; + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} + +.wizard-step { + z-index: -1; + margin-left: calc(100% + 5px); + position: absolute; +} + +.current-step { + z-index: 1; + margin-left: 0; +} + +.current-step-in, +.current-step-out { + z-index: 10; + transition: margin-left 200ms; +} + +.current-step-in { + margin-left: 0; +} + +.current-step-out { + margin-left: 100%; +} diff --git a/clear_before_scale/img/canvas-backgrounds/canvas-background-light.png b/dev/img/canvas-backgrounds/canvas-background-light.png similarity index 100% rename from clear_before_scale/img/canvas-backgrounds/canvas-background-light.png rename to dev/img/canvas-backgrounds/canvas-background-light.png diff --git a/clear_before_scale/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png b/dev/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png similarity index 100% rename from clear_before_scale/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png rename to dev/img/canvas-backgrounds/canvas-background-lowcontrast-dark.png diff --git a/clear_before_scale/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png b/dev/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png similarity index 100% rename from clear_before_scale/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png rename to dev/img/canvas-backgrounds/canvas-background-lowcontrast-medium.png diff --git a/clear_before_scale/img/canvas-backgrounds/canvas-background-medium.png b/dev/img/canvas-backgrounds/canvas-background-medium.png similarity index 100% rename from clear_before_scale/img/canvas-backgrounds/canvas-background-medium.png rename to dev/img/canvas-backgrounds/canvas-background-medium.png diff --git a/clear_before_scale/img/cursors/circle.png b/dev/img/cursors/circle.png similarity index 100% rename from clear_before_scale/img/cursors/circle.png rename to dev/img/cursors/circle.png diff --git a/clear_before_scale/img/cursors/color-palette.png b/dev/img/cursors/color-palette.png similarity index 100% rename from clear_before_scale/img/cursors/color-palette.png rename to dev/img/cursors/color-palette.png diff --git a/clear_before_scale/img/cursors/dither.png b/dev/img/cursors/dither.png similarity index 100% rename from clear_before_scale/img/cursors/dither.png rename to dev/img/cursors/dither.png diff --git a/clear_before_scale/img/cursors/dropper.png b/dev/img/cursors/dropper.png similarity index 100% rename from clear_before_scale/img/cursors/dropper.png rename to dev/img/cursors/dropper.png diff --git a/clear_before_scale/img/cursors/eraser.png b/dev/img/cursors/eraser.png similarity index 100% rename from clear_before_scale/img/cursors/eraser.png rename to dev/img/cursors/eraser.png diff --git a/clear_before_scale/img/cursors/hand.png b/dev/img/cursors/hand.png similarity index 100% rename from clear_before_scale/img/cursors/hand.png rename to dev/img/cursors/hand.png diff --git a/clear_before_scale/img/cursors/lighten.png b/dev/img/cursors/lighten.png similarity index 100% rename from clear_before_scale/img/cursors/lighten.png rename to dev/img/cursors/lighten.png diff --git a/clear_before_scale/img/cursors/mirror-pen.png b/dev/img/cursors/mirror-pen.png similarity index 100% rename from clear_before_scale/img/cursors/mirror-pen.png rename to dev/img/cursors/mirror-pen.png diff --git a/clear_before_scale/img/cursors/paint-bucket.png b/dev/img/cursors/paint-bucket.png similarity index 100% rename from clear_before_scale/img/cursors/paint-bucket.png rename to dev/img/cursors/paint-bucket.png diff --git a/clear_before_scale/img/cursors/pen.png b/dev/img/cursors/pen.png similarity index 100% rename from clear_before_scale/img/cursors/pen.png rename to dev/img/cursors/pen.png diff --git a/clear_before_scale/img/cursors/rectangle.png b/dev/img/cursors/rectangle.png similarity index 100% rename from clear_before_scale/img/cursors/rectangle.png rename to dev/img/cursors/rectangle.png diff --git a/clear_before_scale/img/cursors/select.png b/dev/img/cursors/select.png similarity index 100% rename from clear_before_scale/img/cursors/select.png rename to dev/img/cursors/select.png diff --git a/clear_before_scale/img/cursors/stroke.png b/dev/img/cursors/stroke.png similarity index 100% rename from clear_before_scale/img/cursors/stroke.png rename to dev/img/cursors/stroke.png diff --git a/clear_before_scale/img/cursors/vertical-mirror-pen.png b/dev/img/cursors/vertical-mirror-pen.png similarity index 100% rename from clear_before_scale/img/cursors/vertical-mirror-pen.png rename to dev/img/cursors/vertical-mirror-pen.png diff --git a/clear_before_scale/img/cursors/wand.png b/dev/img/cursors/wand.png similarity index 100% rename from clear_before_scale/img/cursors/wand.png rename to dev/img/cursors/wand.png diff --git a/clear_before_scale/img/favicon.png b/dev/img/favicon.png similarity index 100% rename from clear_before_scale/img/favicon.png rename to dev/img/favicon.png diff --git a/dev/img/icons.png b/dev/img/icons.png new file mode 100644 index 0000000000000000000000000000000000000000..7eb129203306e02a91837a73afb9e1f5a7bd91cc GIT binary patch literal 11775 zcmaiacUV);)-Jtw5)vSQNG}3WO6W?JA|-U`L=+J)p@t&TJ3&H=h)9v%6{L!U5Kut{ zC4f>SL6H%lMhdnN$*3t+Bdp7{Q`>`gOQz*V02Z=bRN| zTW#{vG>@a>*e85nDOXBq-b#4OQuw5ohIRaEStKl?!H$ptc)-Z@Pla+g|H*Df}=~ zk1S~(<1xsXpySvc=los{!}@?q9z5vdnrL2@UtnRkSxzeI8neD&{^z9xgo*}ae3>I& z_p^*7S?;OS)3~2qI=O$j54C-6r&q{hMh}`^=x#adoLwpidMm&)j$434FYP&9v6AA)rv^?y+vX|?c>5!r9M**R&xuG+{sTv%2)?i-w?{n58 zTHE}GNAxxeDTwShtUWffYC#@ zk4EEz=Oup8{B|Zv5JD5E`nAR}d9ivV^My8#0h$o3K2bCz$rR0DL{`Tr840(wYZG}w zk_s@q?IW44VUq3So&~9SKgfX~i5{QsmVIuT&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+E2Ma>$nCdrIYAOexsJ_OLGl5WI-XKt50_hjJfA(Zp`160)SZV) z^)}X*jXDl2r|H(TbON1f6_R)i!`tCTVUD3RnuzZF+T-JaHh?*#?2s|K~42t|FV17{CR}fio=s7wQk`7g_hGnJ@C{>9x*_HdMvs zF#P4RBQvn}<~%3DmOm)6Y2EWgw*Y<0Uo!DhC#1M6)a^(6m-yvyVt~q5@P|K)%~u&; Vmp5h(0tdSptjz7q+D-gY{txLN`CtG5 literal 0 HcmV?d00001 diff --git a/clear_before_scale/img/icons/common/common-keyboard-gold.png b/dev/img/icons/common/common-keyboard-gold.png similarity index 100% rename from clear_before_scale/img/icons/common/common-keyboard-gold.png rename to dev/img/icons/common/common-keyboard-gold.png diff --git a/clear_before_scale/img/icons/common/common-keyboard-gold@2x.png b/dev/img/icons/common/common-keyboard-gold@2x.png similarity index 100% rename from clear_before_scale/img/icons/common/common-keyboard-gold@2x.png rename to dev/img/icons/common/common-keyboard-gold@2x.png diff --git a/clear_before_scale/img/icons/common/common-swapcolors-arrow-grey.png b/dev/img/icons/common/common-swapcolors-arrow-grey.png similarity index 100% rename from clear_before_scale/img/icons/common/common-swapcolors-arrow-grey.png rename to dev/img/icons/common/common-swapcolors-arrow-grey.png diff --git a/clear_before_scale/img/icons/common/common-swapcolors-arrow-grey@2x.png b/dev/img/icons/common/common-swapcolors-arrow-grey@2x.png similarity index 100% rename from clear_before_scale/img/icons/common/common-swapcolors-arrow-grey@2x.png rename to dev/img/icons/common/common-swapcolors-arrow-grey@2x.png diff --git a/clear_before_scale/img/icons/common/common-warning-red.png b/dev/img/icons/common/common-warning-red.png similarity index 100% rename from clear_before_scale/img/icons/common/common-warning-red.png rename to dev/img/icons/common/common-warning-red.png diff --git a/clear_before_scale/img/icons/common/common-warning-red@2x.png b/dev/img/icons/common/common-warning-red@2x.png similarity index 100% rename from clear_before_scale/img/icons/common/common-warning-red@2x.png rename to dev/img/icons/common/common-warning-red@2x.png diff --git a/clear_before_scale/img/icons/frame/frame-dragndrop-white.png b/dev/img/icons/frame/frame-dragndrop-white.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-dragndrop-white.png rename to dev/img/icons/frame/frame-dragndrop-white.png diff --git a/clear_before_scale/img/icons/frame/frame-dragndrop-white@2x.png b/dev/img/icons/frame/frame-dragndrop-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-dragndrop-white@2x.png rename to dev/img/icons/frame/frame-dragndrop-white@2x.png diff --git a/clear_before_scale/img/icons/frame/frame-duplicate-white.png b/dev/img/icons/frame/frame-duplicate-white.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-duplicate-white.png rename to dev/img/icons/frame/frame-duplicate-white.png diff --git a/clear_before_scale/img/icons/frame/frame-duplicate-white@2x.png b/dev/img/icons/frame/frame-duplicate-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-duplicate-white@2x.png rename to dev/img/icons/frame/frame-duplicate-white@2x.png diff --git a/clear_before_scale/img/icons/frame/frame-plus-white.png b/dev/img/icons/frame/frame-plus-white.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-plus-white.png rename to dev/img/icons/frame/frame-plus-white.png diff --git a/clear_before_scale/img/icons/frame/frame-plus-white@2x.png b/dev/img/icons/frame/frame-plus-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-plus-white@2x.png rename to dev/img/icons/frame/frame-plus-white@2x.png diff --git a/clear_before_scale/img/icons/frame/frame-recyclebin-white.png b/dev/img/icons/frame/frame-recyclebin-white.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-recyclebin-white.png rename to dev/img/icons/frame/frame-recyclebin-white.png diff --git a/clear_before_scale/img/icons/frame/frame-recyclebin-white@2x.png b/dev/img/icons/frame/frame-recyclebin-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/frame/frame-recyclebin-white@2x.png rename to dev/img/icons/frame/frame-recyclebin-white@2x.png diff --git a/clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-gold.png b/dev/img/icons/minimap/minimap-popup-preview-arrow-gold.png similarity index 100% rename from clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-gold.png rename to dev/img/icons/minimap/minimap-popup-preview-arrow-gold.png diff --git a/clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png b/dev/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png similarity index 100% rename from clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png rename to dev/img/icons/minimap/minimap-popup-preview-arrow-gold@2x.png diff --git a/clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-white.png b/dev/img/icons/minimap/minimap-popup-preview-arrow-white.png similarity index 100% rename from clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-white.png rename to dev/img/icons/minimap/minimap-popup-preview-arrow-white.png diff --git a/clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png b/dev/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png rename to dev/img/icons/minimap/minimap-popup-preview-arrow-white@2x.png diff --git a/clear_before_scale/img/icons/settings/settings-export-white.png b/dev/img/icons/settings/settings-export-white.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-export-white.png rename to dev/img/icons/settings/settings-export-white.png diff --git a/clear_before_scale/img/icons/settings/settings-export-white@2x.png b/dev/img/icons/settings/settings-export-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-export-white@2x.png rename to dev/img/icons/settings/settings-export-white@2x.png diff --git a/clear_before_scale/img/icons/settings/settings-gear-white.png b/dev/img/icons/settings/settings-gear-white.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-gear-white.png rename to dev/img/icons/settings/settings-gear-white.png diff --git a/clear_before_scale/img/icons/settings/settings-gear-white@2x.png b/dev/img/icons/settings/settings-gear-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-gear-white@2x.png rename to dev/img/icons/settings/settings-gear-white@2x.png diff --git a/clear_before_scale/img/icons/settings/settings-open-folder-white.png b/dev/img/icons/settings/settings-open-folder-white.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-open-folder-white.png rename to dev/img/icons/settings/settings-open-folder-white.png diff --git a/clear_before_scale/img/icons/settings/settings-open-folder-white@2x.png b/dev/img/icons/settings/settings-open-folder-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-open-folder-white@2x.png rename to dev/img/icons/settings/settings-open-folder-white@2x.png diff --git a/clear_before_scale/img/icons/settings/settings-resize-white.png b/dev/img/icons/settings/settings-resize-white.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-resize-white.png rename to dev/img/icons/settings/settings-resize-white.png diff --git a/clear_before_scale/img/icons/settings/settings-resize-white@2x.png b/dev/img/icons/settings/settings-resize-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-resize-white@2x.png rename to dev/img/icons/settings/settings-resize-white@2x.png diff --git a/clear_before_scale/img/icons/settings/settings-save-white.png b/dev/img/icons/settings/settings-save-white.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-save-white.png rename to dev/img/icons/settings/settings-save-white.png diff --git a/clear_before_scale/img/icons/settings/settings-save-white@2x.png b/dev/img/icons/settings/settings-save-white@2x.png similarity index 100% rename from clear_before_scale/img/icons/settings/settings-save-white@2x.png rename to dev/img/icons/settings/settings-save-white@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-circle.png b/dev/img/icons/tools/tool-circle.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-circle.png rename to dev/img/icons/tools/tool-circle.png diff --git a/clear_before_scale/img/icons/tools/tool-circle@2x.png b/dev/img/icons/tools/tool-circle@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-circle@2x.png rename to dev/img/icons/tools/tool-circle@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-colorpicker.png b/dev/img/icons/tools/tool-colorpicker.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-colorpicker.png rename to dev/img/icons/tools/tool-colorpicker.png diff --git a/clear_before_scale/img/icons/tools/tool-colorpicker@2x.png b/dev/img/icons/tools/tool-colorpicker@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-colorpicker@2x.png rename to dev/img/icons/tools/tool-colorpicker@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-colorswap.png b/dev/img/icons/tools/tool-colorswap.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-colorswap.png rename to dev/img/icons/tools/tool-colorswap.png diff --git a/clear_before_scale/img/icons/tools/tool-colorswap@2x.png b/dev/img/icons/tools/tool-colorswap@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-colorswap@2x.png rename to dev/img/icons/tools/tool-colorswap@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-dithering.png b/dev/img/icons/tools/tool-dithering.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-dithering.png rename to dev/img/icons/tools/tool-dithering.png diff --git a/clear_before_scale/img/icons/tools/tool-dithering@2x.png b/dev/img/icons/tools/tool-dithering@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-dithering@2x.png rename to dev/img/icons/tools/tool-dithering@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-eraser.png b/dev/img/icons/tools/tool-eraser.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-eraser.png rename to dev/img/icons/tools/tool-eraser.png diff --git a/clear_before_scale/img/icons/tools/tool-eraser@2x.png b/dev/img/icons/tools/tool-eraser@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-eraser@2x.png rename to dev/img/icons/tools/tool-eraser@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-lasso-select.png b/dev/img/icons/tools/tool-lasso-select.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-lasso-select.png rename to dev/img/icons/tools/tool-lasso-select.png diff --git a/clear_before_scale/img/icons/tools/tool-lasso-select@2x.png b/dev/img/icons/tools/tool-lasso-select@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-lasso-select@2x.png rename to dev/img/icons/tools/tool-lasso-select@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-lighten.png b/dev/img/icons/tools/tool-lighten.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-lighten.png rename to dev/img/icons/tools/tool-lighten.png diff --git a/clear_before_scale/img/icons/tools/tool-lighten@2x.png b/dev/img/icons/tools/tool-lighten@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-lighten@2x.png rename to dev/img/icons/tools/tool-lighten@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-move.png b/dev/img/icons/tools/tool-move.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-move.png rename to dev/img/icons/tools/tool-move.png diff --git a/clear_before_scale/img/icons/tools/tool-move@2x.png b/dev/img/icons/tools/tool-move@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-move@2x.png rename to dev/img/icons/tools/tool-move@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-paint-bucket.png b/dev/img/icons/tools/tool-paint-bucket.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-paint-bucket.png rename to dev/img/icons/tools/tool-paint-bucket.png diff --git a/clear_before_scale/img/icons/tools/tool-paint-bucket@2x.png b/dev/img/icons/tools/tool-paint-bucket@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-paint-bucket@2x.png rename to dev/img/icons/tools/tool-paint-bucket@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-pen.png b/dev/img/icons/tools/tool-pen.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-pen.png rename to dev/img/icons/tools/tool-pen.png diff --git a/clear_before_scale/img/icons/tools/tool-pen@2x.png b/dev/img/icons/tools/tool-pen@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-pen@2x.png rename to dev/img/icons/tools/tool-pen@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-rectangle-select.png b/dev/img/icons/tools/tool-rectangle-select.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-rectangle-select.png rename to dev/img/icons/tools/tool-rectangle-select.png diff --git a/clear_before_scale/img/icons/tools/tool-rectangle-select@2x.png b/dev/img/icons/tools/tool-rectangle-select@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-rectangle-select@2x.png rename to dev/img/icons/tools/tool-rectangle-select@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-rectangle.png b/dev/img/icons/tools/tool-rectangle.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-rectangle.png rename to dev/img/icons/tools/tool-rectangle.png diff --git a/clear_before_scale/img/icons/tools/tool-rectangle@2x.png b/dev/img/icons/tools/tool-rectangle@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-rectangle@2x.png rename to dev/img/icons/tools/tool-rectangle@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-shape-select.png b/dev/img/icons/tools/tool-shape-select.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-shape-select.png rename to dev/img/icons/tools/tool-shape-select.png diff --git a/clear_before_scale/img/icons/tools/tool-shape-select@2x.png b/dev/img/icons/tools/tool-shape-select@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-shape-select@2x.png rename to dev/img/icons/tools/tool-shape-select@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-stroke.png b/dev/img/icons/tools/tool-stroke.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-stroke.png rename to dev/img/icons/tools/tool-stroke.png diff --git a/clear_before_scale/img/icons/tools/tool-stroke@2x.png b/dev/img/icons/tools/tool-stroke@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-stroke@2x.png rename to dev/img/icons/tools/tool-stroke@2x.png diff --git a/clear_before_scale/img/icons/tools/tool-vertical-mirror-pen.png b/dev/img/icons/tools/tool-vertical-mirror-pen.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-vertical-mirror-pen.png rename to dev/img/icons/tools/tool-vertical-mirror-pen.png diff --git a/clear_before_scale/img/icons/tools/tool-vertical-mirror-pen@2x.png b/dev/img/icons/tools/tool-vertical-mirror-pen@2x.png similarity index 100% rename from clear_before_scale/img/icons/tools/tool-vertical-mirror-pen@2x.png rename to dev/img/icons/tools/tool-vertical-mirror-pen@2x.png diff --git a/clear_before_scale/img/icons/transform/tool-center.png b/dev/img/icons/transform/tool-center.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-center.png rename to dev/img/icons/transform/tool-center.png diff --git a/clear_before_scale/img/icons/transform/tool-center@2x.png b/dev/img/icons/transform/tool-center@2x.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-center@2x.png rename to dev/img/icons/transform/tool-center@2x.png diff --git a/clear_before_scale/img/icons/transform/tool-clone.png b/dev/img/icons/transform/tool-clone.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-clone.png rename to dev/img/icons/transform/tool-clone.png diff --git a/clear_before_scale/img/icons/transform/tool-clone@2x.png b/dev/img/icons/transform/tool-clone@2x.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-clone@2x.png rename to dev/img/icons/transform/tool-clone@2x.png diff --git a/dev/img/icons/transform/tool-crop.png b/dev/img/icons/transform/tool-crop.png new file mode 100644 index 0000000000000000000000000000000000000000..f9d3f66eaec21ccd437f4a425395eece3a5c13bb GIT binary patch literal 393 zcmV;40e1e0P)ziZxqh z5O}%2q_lKBsJK?)GOkcO9~Rr=>(uE5hVo1YmzJ&p+=uqJN=NWZ<%UfAC89^Il~6x` zkdnU|hc{>0t7t&c(Wc6Yf@XtDt$8}dhkzd`d0wd_amWGUUPTL_jWY{w)+%Pf&057Q zxLK>11vhIIv*1IlB2}ZDcjS?OI&kT?#?*^^zEP@QBzm>A)4{d&7##=u@zDU<{0m&G noHlMLu2oJOw-nbZr;U39EdfD3KAyD500000NkvXXu0mjfch{{k literal 0 HcmV?d00001 diff --git a/dev/img/icons/transform/tool-crop@2x.png b/dev/img/icons/transform/tool-crop@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7b9df4a6188c7ef796229b5717da3b83b8753a3b GIT binary patch literal 693 zcmV;m0!safP)-_|bp9 zUE6lP(fyJW4tR_l@RLs<3E#A^-Ysc(aJ9$9KA^dy&)Vawn!3L9mZDB5m$3eBHQ0dH zdlpC5VgsH49>E?0JYmi0w|F7ew6+@Tn)^f+AouV{G1u4?vV>KGossB2ryLi8v(6{x z9{N?-zZ>X;aMdb(eQ+gq3i#P~BQE66I(w+Eq_<#auTM^R_JlGvs1|mwR`ks^I$yv) z#A^DzdTIgu4Socf{Rx)AqaP{9_-IQ}QyW>+DP`{y;Nn$uhXoFQu7p zE_R=%TjvgVt6bxCfSX zchB^90l)z-3mhFoT`f$lL&ER!;-eN5BDZ5pehLmN}NL;gpgs zdU8L&ITrHbQxtIb)T`^M$6Zi~Y2b9h2%L$_FyclMi7(VuT8LBii6fQRy_4+dN}4Bg=|;2{+T-}8S2 z8hKykW8uh)8*y%cn|B3pz|8{YawHsZvw*oA2?yLPU@k|(0XGYn%aL%v%>w3fBph(F bfVtcc0Df?LKyK|F00000NkvXXu0mjfXjD#G literal 0 HcmV?d00001 diff --git a/clear_before_scale/img/icons/transform/tool-flip.png b/dev/img/icons/transform/tool-flip.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-flip.png rename to dev/img/icons/transform/tool-flip.png diff --git a/clear_before_scale/img/icons/transform/tool-flip@2x.png b/dev/img/icons/transform/tool-flip@2x.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-flip@2x.png rename to dev/img/icons/transform/tool-flip@2x.png diff --git a/clear_before_scale/img/icons/transform/tool-rotate.png b/dev/img/icons/transform/tool-rotate.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-rotate.png rename to dev/img/icons/transform/tool-rotate.png diff --git a/clear_before_scale/img/icons/transform/tool-rotate@2x.png b/dev/img/icons/transform/tool-rotate@2x.png similarity index 100% rename from clear_before_scale/img/icons/transform/tool-rotate@2x.png rename to dev/img/icons/transform/tool-rotate@2x.png diff --git a/dev/img/icons@2x.png b/dev/img/icons@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..73c17a710d8f88880c560845f510c515b3252963 GIT binary patch literal 25403 zcmb4q1yqz>+b&9X_fXOu3Jg-xNJ)bJM_D9PB!@bK^`@9Jur;^AE< z!Na?DOhN=aVT1?e;Nj^--qlny554xSpL}@*{}Q}^a`MglW{w*y;jffup4rJqr~#TA za;=yo)j;9q8?~-tJOS_9iUcl2+6SHo?(rF#@x;@plhlrqUj6TWL-6WbF{}XiaTxScmInf zf}^Nk5wJcWz`A_zFZ`A%$D>pK^q=xtpzypt)L zuMuH_yHm8gW0MZ>qEhFNjJ_1V-P%q+^v{uaN6yotDlxdBzR6nM%Rd!<%jw=Xm~s=W zy@z~n;9<(KMJri4?%~+L^&WJ{maYRy1VN6A72vh>UjKXWHOfwjr1~aCBeb8t>_bSx zq|bMC$79ZdILK3ab&~aP$qFnBg((MVNWTOa|KkCqY-`CB_&(ZHLH3S3a_UY5ZDq0A zdB6f?>cI^MX7$b5GaN+(;bq${n}x2!rf7S=>%#r{df101 z)?uvo1@(p#RaBZeNpXj+6ziu!?hndIsr&TZ6<)uXbJpm*lY~$2mD5GAcCFEf89O>y zC^yzT?VeonN%nK13#j=Ld3wF~Ns=_>TL$&2N004N<8E~je8IYOmw*42tRYQr-r3YTYFUG$~?Oh($Oc|^-8anRJW$trVvhbaY0J=vP41(Po>ufLrS3_)@EQ_j(b z4dgVlJc6+EWHxd&^sDKK4~2qKv^pnD4Tjt=?pDW~3R78dIat)FeUTM9sv&z%-t!ma zlwcU+;@xo052mn%C>7Gz_>hAT_ne5e*s+{r!|hHK`_gDQ{h^&G?-8EQJxtqB{5&nCUX8G5CNyf;H#sC6Nn<*pTV0EJa*1 zsA#6Q2P!v?GA*`KbQaJSlI6rfK>`?+Bd=RVR$F)BL!u)sJVt%1r$PZXk6xF2Iba{_ zQ(FJYHaGOeb#6eMB~81n+N8SwcB9(g`tq&z6~_9?7wpeh2g0QpG@7MD`g&PPA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E_1EF4YV~q{=GN* zkAy5sFp%UibNo*ug$qyo|L6la)o1<_=f82&)CY*=4mP`Z#pU98LOqZHvQ7UpN%ij@ zFdERC?U2~pH1rAJF?6X(YEVTj7~jjh2qG5J)=;zp>GK@oTSRKB)zSn%-k#s@+rRvD?wOJm;n5A8^?~W6Yfk zfGa)`g&(aXI=vC{ovh*O+4)V+W<#5+8AK{eq)@WQKDL7I0qzM?(8*ZdwL*PaIZcZ; qS6Qehyydd+^?Bebf7Hwu0Z8Ck`Nl2 + rel="tooltip" data-placement="top" >
                                                         
                                                        a"; + + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: ( document.compatMode === "CSS1Compat" ), + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", clickFn = function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent("onclick"); + div.detachEvent( "onclick", clickFn ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + input.setAttribute( "checked", "checked" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: true, + change: true, + focusin: true + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Run tests that need a body at doc ready + jQuery(function() { + var container, div, tds, marginDiv, + divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
                                                        t
                                                        "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // NOTE: To any future maintainer, window.getComputedStyle was used here + // instead of getComputedStyle because it gave a better gzip size. + // The difference between window.getComputedStyle and getComputedStyle is + // 7 bytes + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = document.createElement("div"); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = "block"; + div.style.overflow = "visible"; + div.innerHTML = "
                                                        "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + container.style.zoom = 1; + } + + // Null elements to avoid leaks in IE + body.removeChild( container ); + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + fragment.removeChild( div ); + all = a = select = opt = input = fragment = div = null; + + return support; +})(); +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + deletedIds: [], + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + if ( !queue.length && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery.removeData( elem, type + "queue", true ); + jQuery.removeData( elem, key, true ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, fixSpecified, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea|)$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var removes, className, elem, c, cl, i, l; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + if ( (value && typeof value === "string") || value === undefined ) { + removes = ( value || "" ).split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + if ( elem.nodeType === 1 && elem.className ) { + + className = (" " + elem.className + " ").replace( rclass, " " ); + + // loop over each item in the removal list + for ( c = 0, cl = removes.length; c < cl; c++ ) { + // Remove until there is nothing to remove, + while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { + className = className.replace( " " + removes[ c ] + " " , " " ); + } + } + elem.className = value ? jQuery.trim( className ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( core_rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 + attrFn: {}, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, isBool, + i = 0; + + if ( value && elem.nodeType === 1 ) { + + attrNames = value.split( core_rspace ); + + for ( ; i < attrNames.length; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + isBool = rboolean.test( name ); + + // See #9699 for explanation of this approach (setting first, then removal) + // Do not do this for boolean attributes (see #10870) + if ( !isBool ) { + jQuery.attr( elem, name, "" ); + } + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( isBool && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true, + coords: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.value = value + "" ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, + rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var t, tns, type, origType, namespaces, origCount, + j, events, special, eventType, handleObj, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, "events", true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, + type = event.type || event, + namespaces = []; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + for ( old = elem; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old === (elem.ownerDocument || document) ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, + handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments ), + run_all = !event.exclusive && !event.namespace, + special = jQuery.event.special[ event.type ] || {}, + handlerQueue = []; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) + if ( cur.disabled !== true || event.type !== "click" ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = jqcur.is( sel ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) + event.metaKey = !!event.metaKey; + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 – + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "_submit_attached" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "_submit_attached", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "_change_attached", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var cachedruns, + dirruns, + sortOrder, + siblingCheck, + assertGetIdNotName, + + document = window.document, + docElem = document.documentElement, + + strundefined = "undefined", + hasDuplicate = false, + baseHasDuplicate = true, + done = 0, + slice = [].slice, + push = [].push, + + expando = ( "sizcache" + Math.random() ).replace( ".", "" ), + + // Regex + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", + pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", + combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", + groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcombinators = new RegExp( "^" + combinators ), + + // All simple (non-comma) selectors, excluding insignifant trailing whitespace + rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), + + // A selector, or everything after leading whitespace + // Optionally followed in either case by a ")" for terminating sub-selectors + rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), + + // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive + rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + rendsWithNot = /:not\($/, + + rheader = /h\d/i, + rinputs = /input|select|textarea|button/i, + + rbackslash = /\\(?!\\)/g, + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "POS": new RegExp( pos, "ig" ), + // For use in libraries implementing .is() + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) + }, + + classCache = {}, + cachedClasses = [], + compilerCache = {}, + cachedSelectors = [], + + // Mark a function for use in filtering + markFunction = function( fn ) { + fn.sizzleFilter = true; + return fn; + }, + + // Returns a function to use in pseudos for input types + createInputFunction = function( type ) { + return function( elem ) { + // Check the input's nodeName and type + return elem.nodeName.toLowerCase() === "input" && elem.type === type; + }; + }, + + // Returns a function to use in pseudos for buttons + createButtonFunction = function( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; + }, + + // Used for testing something on an element + assert = function( fn ) { + var pass = false, + div = document.createElement("div"); + try { + pass = fn( div ); + } catch (e) {} + // release memory in IE + div = null; + return pass; + }, + + // Check if attributes should be retrieved by attribute nodes + assertAttributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }), + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + assertUsableName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "
                                                        "; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = document.getElementsByName && + // buggy browsers will return fewer than the correct 2 + document.getElementsByName( expando ).length === + // buggy browsers will return more than the correct 0 + 2 + document.getElementsByName( expando + 0 ).length; + assertGetIdNotName = !document.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }), + + // Check if the browser returns only elements + // when doing getElementsByTagName("*") + assertTagNameNoComments = assert(function( div ) { + div.appendChild( document.createComment("") ); + return div.getElementsByTagName("*").length === 0; + }), + + // Check if getAttribute returns normalized href attributes + assertHrefNotNormalized = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }), + + // Check if getElementsByClassName can be trusted + assertUsableClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return false; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length !== 1; + }); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + var match, elem, xml, m, + nodeType = context.nodeType; + + if ( nodeType !== 1 && nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + xml = isXML( context ); + + if ( !xml && !seed ) { + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + } + + // All others + return select( selector, context, results, seed, xml ); +}; + +var Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + match: matchExpr, + + order: [ "ID", "TAG" ], + + attrHandle: {}, + + createPseudo: markFunction, + + find: { + "ID": assertGetIdNotName ? + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + } : + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }, + + "TAG": assertTagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + var elem, + tmp = [], + i = 0; + + for ( ; (elem = results[i]); i++ ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + } + }, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( rbackslash, "" ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr.CHILD + 1 type (only|nth|...) + 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 3 xn-component of xn+y argument ([+-]?\d*n|) + 4 sign of xn-component + 5 x of xn-component + 6 sign of y-component + 7 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1] === "nth" ) { + // nth-child requires argument + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); + match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); + + // other types prohibit arguments + } else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var argument, + unquoted = match[4]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Relinquish our claim on characters in `unquoted` from a closing parenthesis on + if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { + + match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); + unquoted = argument[0].slice( 0, -1 ); + } + + // Quoted or unquoted, we have the full argument + // Return only captures needed by the pseudo filter method (type and argument) + match.splice( 2, 3, unquoted || match[3] ); + return match; + } + }, + + filter: { + "ID": assertGetIdNotName ? + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + return elem.getAttribute("id") === id; + }; + } : + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === id; + }; + }, + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); + + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className ]; + if ( !pattern ) { + pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); + cachedClasses.push( className ); + // Avoid too large of a cache + if ( cachedClasses.length > Expr.cacheLength ) { + delete classCache[ cachedClasses.shift() ]; + } + } + return function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }; + }, + + "ATTR": function( name, operator, check ) { + if ( !operator ) { + return function( elem ) { + return Sizzle.attr( elem, name ) != null; + }; + } + + return function( elem ) { + var result = Sizzle.attr( elem, name ), + value = result + ""; + + if ( result == null ) { + return operator === "!="; + } + + switch ( operator ) { + case "=": + return value === check; + case "!=": + return value !== check; + case "^=": + return check && value.indexOf( check ) === 0; + case "*=": + return check && value.indexOf( check ) > -1; + case "$=": + return check && value.substr( value.length - check.length ) === check; + case "~=": + return ( " " + value + " " ).indexOf( check ) > -1; + case "|=": + return value === check || value.substr( 0, check.length + 1 ) === check + "-"; + } + }; + }, + + "CHILD": function( type, argument, first, last ) { + + if ( type === "nth" ) { + var doneName = done++; + + return function( elem ) { + var parent, diff, + count = 0, + node = elem; + + if ( first === 1 && last === 0 ) { + return true; + } + + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.sizset = ++count; + if ( node === elem ) { + break; + } + } + } + + parent[ expando ] = doneName; + } + + diff = elem.sizset - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + }; + } + + return function( elem ) { + var node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + } + }; + }, + + "PSEUDO": function( pseudo, argument, context, xml ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; + + if ( !fn ) { + Sizzle.error( "unsupported pseudo: " + pseudo ); + } + + // The user may set fn.sizzleFilter to indicate + // that arguments are needed to create the filter function + // just as Sizzle does + if ( !fn.sizzleFilter ) { + return fn; + } + + return fn( argument, context, xml ); + } + }, + + pseudos: { + "not": markFunction(function( selector, context, xml ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); + return function( elem ) { + return !matcher( elem ); + }; + }), + + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + var nodeType; + elem = elem.firstChild; + while ( elem ) { + if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { + return false; + } + elem = elem.nextSibling; + } + return true; + }, + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "text": function( elem ) { + var type, attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + (type = elem.type) === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); + }, + + // Input types + "radio": createInputFunction("radio"), + "checkbox": createInputFunction("checkbox"), + "file": createInputFunction("file"), + "password": createInputFunction("password"), + "image": createInputFunction("image"), + + "submit": createButtonFunction("submit"), + "reset": createButtonFunction("reset"), + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "focus": function( elem ) { + var doc = elem.ownerDocument; + return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); + }, + + "active": function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + + setFilters: { + "first": function( elements, argument, not ) { + return not ? elements.slice( 1 ) : [ elements[0] ]; + }, + + "last": function( elements, argument, not ) { + var elem = elements.pop(); + return not ? elements : [ elem ]; + }, + + "even": function( elements, argument, not ) { + var results = [], + i = not ? 1 : 0, + len = elements.length; + for ( ; i < len; i = i + 2 ) { + results.push( elements[i] ); + } + return results; + }, + + "odd": function( elements, argument, not ) { + var results = [], + i = not ? 0 : 1, + len = elements.length; + for ( ; i < len; i = i + 2 ) { + results.push( elements[i] ); + } + return results; + }, + + "lt": function( elements, argument, not ) { + return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); + }, + + "gt": function( elements, argument, not ) { + return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); + }, + + "eq": function( elements, argument, not ) { + var elem = elements.splice( +argument, 1 ); + return not ? elements : elem; + } + } +}; + +// Deprecated +Expr.setFilters["nth"] = Expr.setFilters["eq"]; + +// Back-compat +Expr.filters = Expr.pseudos; + +// IE6/7 return a modified href +if ( !assertHrefNotNormalized ) { + Expr.attrHandle = { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; +} + +// Add getElementsByName if usable +if ( assertUsableName ) { + Expr.order.push("NAME"); + Expr.find["NAME"] = function( name, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; +} + +// Add getElementsByClassName if usable +if ( assertUsableClassName ) { + Expr.order.splice( 1, 0, "CLASS" ); + Expr.find["CLASS"] = function( className, context, xml ) { + if ( typeof context.getElementsByClassName !== strundefined && !xml ) { + return context.getElementsByClassName( className ); + } + }; +} + +// If slice is not available, provide a backup +try { + slice.call( docElem.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, results = []; + for ( ; (elem = this[i]); i++ ) { + results.push( elem ); + } + return results; + }; +} + +var isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Element contains another +var contains = Sizzle.contains = docElem.compareDocumentPosition ? + function( a, b ) { + return !!( a.compareDocumentPosition( b ) & 16 ); + } : + docElem.contains ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); + } : + function( a, b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + return false; + }; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + } else { + + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } + return ret; +}; + +Sizzle.attr = function( elem, name ) { + var attr, + xml = isXML( elem ); + + if ( !xml ) { + name = name.toLowerCase(); + } + if ( Expr.attrHandle[ name ] ) { + return Expr.attrHandle[ name ]( elem ); + } + if ( assertAttributes || xml ) { + return elem.getAttribute( name ); + } + attr = elem.getAttributeNode( name ); + return attr ? + typeof elem[ name ] === "boolean" ? + elem[ name ] ? name : null : + attr.specified ? attr.value : null : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + return (baseHasDuplicate = 0); +}); + + +if ( docElem.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? + a.compareDocumentPosition : + a.compareDocumentPosition(b) & 4 + ) ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + i = 1; + + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +function multipleContexts( selector, contexts, results, seed ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results, seed ); + } +} + +function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { + var results, + fn = Expr.setFilters[ posfilter.toLowerCase() ]; + + if ( !fn ) { + Sizzle.error( posfilter ); + } + + if ( selector || !(results = seed) ) { + multipleContexts( selector || "*", contexts, (results = []), seed ); + } + + return results.length > 0 ? fn( results, argument, not ) : []; +} + +function handlePOS( selector, context, results, seed, groups ) { + var match, not, anchor, ret, elements, currentContexts, part, lastIndex, + i = 0, + len = groups.length, + rpos = matchExpr["POS"], + // This is generated here in case matchExpr["POS"] is extended + rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), + // This is for making sure non-participating + // matching groups are represented cross-browser (IE6-8) + setUndefined = function() { + var i = 1, + len = arguments.length - 2; + for ( ; i < len; i++ ) { + if ( arguments[i] === undefined ) { + match[i] = undefined; + } + } + }; + + for ( ; i < len; i++ ) { + // Reset regex index to 0 + rpos.exec(""); + selector = groups[i]; + ret = []; + anchor = 0; + elements = seed; + while ( (match = rpos.exec( selector )) ) { + lastIndex = rpos.lastIndex = match.index + match[0].length; + if ( lastIndex > anchor ) { + part = selector.slice( anchor, match.index ); + anchor = lastIndex; + currentContexts = [ context ]; + + if ( rcombinators.test(part) ) { + if ( elements ) { + currentContexts = elements; + } + elements = seed; + } + + if ( (not = rendsWithNot.test( part )) ) { + part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); + } + + if ( match.length > 1 ) { + match[0].replace( rposgroups, setUndefined ); + } + elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); + } + } + + if ( elements ) { + ret = ret.concat( elements ); + + if ( (part = selector.slice( anchor )) && part !== ")" ) { + if ( rcombinators.test(part) ) { + multipleContexts( part, ret, results, seed ); + } else { + Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); + } + } else { + push.apply( results, ret ); + } + } else { + Sizzle( selector, context, results, seed ); + } + } + + // Do not sort if this is a single filter + return len === 1 ? results : Sizzle.uniqueSort( results ); +} + +function tokenize( selector, context, xml ) { + var tokens, soFar, type, + groups = [], + i = 0, + + // Catch obvious selector issues: terminal ")"; nonempty fallback match + // rselector never fails to match *something* + match = rselector.exec( selector ), + matched = !match.pop() && !match.pop(), + selectorGroups = matched && selector.match( rgroups ) || [""], + + preFilters = Expr.preFilter, + filters = Expr.filter, + checkContext = !xml && context !== document; + + for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { + groups.push( tokens = [] ); + + // Need to make sure we're within a narrower context if necessary + // Adding a descendant combinator will generate what is needed + if ( checkContext ) { + soFar = " " + soFar; + } + + while ( soFar ) { + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + soFar = soFar.slice( match[0].length ); + + // Cast descendant combinators to space + matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); + } + + // Filters + for ( type in filters ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match, context, xml )) ) ) { + + soFar = soFar.slice( match.shift().length ); + matched = tokens.push({ part: type, captures: match }); + } + } + + if ( !matched ) { + break; + } + } + } + + if ( !matched ) { + Sizzle.error( selector ); + } + + return groups; +} + +function addCombinator( matcher, combinator, context ) { + var dir = combinator.dir, + doneName = done++; + + if ( !matcher ) { + // If there is no matcher to check, check against the context + matcher = function( elem ) { + return elem === context; + }; + } + return combinator.first ? + function( elem, context ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 ) { + return matcher( elem, context ) && elem; + } + } + } : + function( elem, context ) { + var cache, + dirkey = doneName + "." + dirruns, + cachedkey = dirkey + "." + cachedruns; + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 ) { + if ( (cache = elem[ expando ]) === cachedkey ) { + return elem.sizset; + } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { + if ( elem.sizset ) { + return elem; + } + } else { + elem[ expando ] = cachedkey; + if ( matcher( elem, context ) ) { + elem.sizset = true; + return elem; + } + elem.sizset = false; + } + } + } + }; +} + +function addMatcher( higher, deeper ) { + return higher ? + function( elem, context ) { + var result = deeper( elem, context ); + return result && higher( result === true ? elem : result, context ); + } : + deeper; +} + +// ["TAG", ">", "ID", " ", "CLASS"] +function matcherFromTokens( tokens, context, xml ) { + var token, matcher, + i = 0; + + for ( ; (token = tokens[i]); i++ ) { + if ( Expr.relative[ token.part ] ) { + matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); + } else { + token.captures.push( context, xml ); + matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); + } + } + + return matcher; +} + +function matcherFromGroupMatchers( matchers ) { + return function( elem, context ) { + var matcher, + j = 0; + for ( ; (matcher = matchers[j]); j++ ) { + if ( matcher(elem, context) ) { + return true; + } + } + return false; + }; +} + +var compile = Sizzle.compile = function( selector, context, xml ) { + var tokens, group, i, + cached = compilerCache[ selector ]; + + // Return a cached group function if already generated (context dependent) + if ( cached && cached.context === context ) { + return cached; + } + + // Generate a function of recursive functions that can be used to check each element + group = tokenize( selector, context, xml ); + for ( i = 0; (tokens = group[i]); i++ ) { + group[i] = matcherFromTokens( tokens, context, xml ); + } + + // Cache the compiled function + cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); + cached.context = context; + cached.runs = cached.dirruns = 0; + cachedSelectors.push( selector ); + // Ensure only the most recent are cached + if ( cachedSelectors.length > Expr.cacheLength ) { + delete compilerCache[ cachedSelectors.shift() ]; + } + return cached; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + return Sizzle( expr, null, null, [ elem ] ).length > 0; +}; + +var select = function( selector, context, results, seed, xml ) { + // Remove excessive whitespace + selector = selector.replace( rtrim, "$1" ); + var elements, matcher, i, len, elem, token, + type, findContext, notTokens, + match = selector.match( rgroups ), + tokens = selector.match( rtokens ), + contextNodeType = context.nodeType; + + // POS handling + if ( matchExpr["POS"].test(selector) ) { + return handlePOS( selector, context, results, seed, match ); + } + + if ( seed ) { + elements = slice.call( seed, 0 ); + + // To maintain document order, only narrow the + // set if there is one group + } else if ( match && match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + if ( tokens.length > 1 && contextNodeType === 9 && !xml && + (match = matchExpr["ID"].exec( tokens[0] )) ) { + + context = Expr.find["ID"]( match[1], context, xml )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().length ); + } + + findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; + + // Get the last token, excluding :not + notTokens = tokens.pop(); + token = notTokens.split(":not")[0]; + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = matchExpr[ type ].exec( token )) ) { + elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); + + if ( elements == null ) { + continue; + } + + if ( token === notTokens ) { + selector = selector.slice( 0, selector.length - notTokens.length ) + + token.replace( matchExpr[ type ], "" ); + + if ( !selector ) { + push.apply( results, slice.call(elements, 0) ); + } + } + break; + } + } + } + + // Only loop over the given elements once + // If selector is empty, we're already done + if ( selector ) { + matcher = compile( selector, context, xml ); + dirruns = matcher.dirruns++; + + if ( elements == null ) { + elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); + } + for ( i = 0; (elem = elements[i]); i++ ) { + cachedruns = matcher.runs++; + if ( matcher(elem, context) ) { + results.push( elem ); + } + } + } + + return results; +}; + +if ( document.querySelectorAll ) { + (function() { + var disconnectedMatch, + oldSelect = select, + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + rbuggyQSA = [], + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + // A support test would require too much code (would include document ready) + // just skip matchesSelector for :active + rbuggyMatches = [":active"], + matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector; + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here (do not put tests after this one) + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE9 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = "

                                                        "; + if ( div.querySelectorAll("[test^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here (do not put tests after this one) + div.innerHTML = ""; + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push(":enabled", ":disabled"); + } + }); + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + + select = function( selector, context, results, seed, xml ) { + // Only use querySelectorAll when not filtering, + // when this is not xml, + // and when no QSA bugs apply + if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + if ( context.nodeType === 9 ) { + try { + push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); + return results; + } catch(qsaError) {} + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var old = context.getAttribute("id"), + nid = old || expando, + newContext = rsibling.test( selector ) && context.parentNode || context; + + if ( old ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + + try { + push.apply( results, slice.call( newContext.querySelectorAll( + selector.replace( rgroups, "[id='" + nid + "'] $&" ) + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + + return oldSelect( selector, context, results, seed, xml ); + }; + + if ( matches ) { + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + try { + matches.call( div, "[test!='']:sizzle" ); + rbuggyMatches.push( Expr.match.PSEUDO ); + } catch ( e ) {} + }); + + // rbuggyMatches always contains :active, so no need for a length check + rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); + + Sizzle.matchesSelector = function( elem, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyMatches always contains :active, so no need for an existence check + if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, null, null, [ elem ] ).length > 0; + }; + } + })(); +} + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, l, length, n, r, ret, + self = this; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + ret = this.pushStack( "", "find", selector ); + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /]", "i"), + rcheckableType = /^(?:checkbox|radio)$/, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*\s*$/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
                                                        ", "
                                                        " ], + thead: [ 1, "", "
                                                        " ], + tr: [ 2, "", "
                                                        " ], + td: [ 3, "", "
                                                        " ], + col: [ 2, "", "
                                                        " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, +// unless wrapped in a div with non-breaking characters in front of it. +if ( !jQuery.support.htmlSerialize ) { + wrapMap._default = [ 1, "X
                                                        ", "
                                                        " ]; +} + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); + } + }, + + after: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); + } + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + jQuery.cleanData( [ elem ] ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName( "*" ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + if ( !isDisconnected( this[0] ) ) { + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this), old = self.html(); + self.replaceWith( value.call( this, i, old ) ); + }); + } + + if ( typeof value !== "string" ) { + value = jQuery( value ).detach(); + } + + return this.each(function() { + var next = this.nextSibling, + parent = this.parentNode; + + jQuery( this ).remove(); + + if ( next ) { + jQuery(next).before( value ); + } else { + jQuery(parent).append( value ); + } + }); + } + + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = [].concat.apply( [], args ); + + var results, first, fragment, iNoClone, + i = 0, + value = args[0], + scripts = [], + l = this.length; + + // We can't cloneNode fragments that contain checked, in WebKit + if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { + return this.each(function() { + jQuery(this).domManip( args, table, callback ); + }); + } + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + args[0] = value.call( this, i, table ? self.html() : undefined ); + self.domManip( args, table, callback ); + }); + } + + if ( this[0] ) { + results = jQuery.buildFragment( args, this, scripts ); + fragment = results.fragment; + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + // Fragments from the fragment cache must always be cloned and never used in place. + for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + i === iNoClone ? + fragment : + jQuery.clone( fragment, true, true ) + ); + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + + if ( scripts.length ) { + jQuery.each( scripts, function( i, elem ) { + if ( elem.src ) { + if ( jQuery.ajax ) { + jQuery.ajax({ + url: elem.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.error("no ajax"); + } + } else { + jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + }); + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function cloneFixAttributes( src, dest ) { + var nodeName; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + // clearAttributes removes the attributes, which we don't want, + // but also removes the attachEvent events, which we *do* want + if ( dest.clearAttributes ) { + dest.clearAttributes(); + } + + // mergeAttributes, in contrast, only merges back on the + // original attributes, not the events + if ( dest.mergeAttributes ) { + dest.mergeAttributes( src ); + } + + nodeName = dest.nodeName.toLowerCase(); + + if ( nodeName === "object" ) { + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + + // IE blanks contents when cloning scripts + } else if ( nodeName === "script" && dest.text !== src.text ) { + dest.text = src.text; + } + + // Event data gets referenced instead of copied if the expando + // gets copied too + dest.removeAttribute( jQuery.expando ); +} + +jQuery.buildFragment = function( args, context, scripts ) { + var fragment, cacheable, cachehit, + first = args[ 0 ]; + + // Set context from what may come in as undefined or a jQuery collection or a node + context = context || document; + context = (context[0] || context).ownerDocument || context[0] || context; + + // Ensure that an attr object doesn't incorrectly stand in as a document object + // Chrome and Firefox seem to allow this to occur and will throw exception + // Fixes #8950 + if ( typeof context.createDocumentFragment === "undefined" ) { + context = document; + } + + // Only cache "small" (1/2 KB) HTML strings that are associated with the main document + // Cloning options loses the selected state, so don't cache them + // IE 6 doesn't like it when you put or elements in a fragment + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache + // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 + if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && + first.charAt(0) === "<" && !rnocache.test( first ) && + (jQuery.support.checkClone || !rchecked.test( first )) && + (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { + + // Mark cacheable and look for a hit + cacheable = true; + fragment = jQuery.fragments[ first ]; + cachehit = fragment !== undefined; + } + + if ( !fragment ) { + fragment = context.createDocumentFragment(); + jQuery.clean( args, context, fragment, scripts ); + + // Update the cache, but only store false + // unless this is a second parsing of the same content + if ( cacheable ) { + jQuery.fragments[ first ] = cachehit && fragment; + } + } + + return { fragment: fragment, cacheable: cacheable }; +}; + +jQuery.fragments = {}; + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + l = insert.length, + parent = this.length === 1 && this[0].parentNode; + + if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { + insert[ original ]( this[0] ); + return this; + } else { + for ( ; i < l; i++ ) { + elems = ( i > 0 ? this.clone(true) : this ).get(); + jQuery( insert[i] )[ original ]( elems ); + ret = ret.concat( elems ); + } + + return this.pushStack( ret, name, insert.selector ); + } + }; +}); + +function getAll( elem ) { + if ( typeof elem.getElementsByTagName !== "undefined" ) { + return elem.getElementsByTagName( "*" ); + + } else if ( typeof elem.querySelectorAll !== "undefined" ) { + return elem.querySelectorAll( "*" ); + + } else { + return []; + } +} + +// Used in clean, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var srcElements, + destElements, + i, + clone; + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + // IE copies events bound via attachEvent when using cloneNode. + // Calling detachEvent on the clone will also remove the events + // from the original. In order to get around this, we use some + // proprietary methods to clear the events. Thanks to MooTools + // guys for this hotness. + + cloneFixAttributes( elem, clone ); + + // Using Sizzle here is crazy slow, so we use getElementsByTagName instead + srcElements = getAll( elem ); + destElements = getAll( clone ); + + // Weird iteration because IE will replace the length property + // with an element if you are cloning the body and one of the + // elements on the page has a name or id of "length" + for ( i = 0; srcElements[i]; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + cloneFixAttributes( srcElements[i], destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + cloneCopyEvent( elem, clone ); + + if ( deepDataAndEvents ) { + srcElements = getAll( elem ); + destElements = getAll( clone ); + + for ( i = 0; srcElements[i]; ++i ) { + cloneCopyEvent( srcElements[i], destElements[i] ); + } + } + } + + srcElements = destElements = null; + + // Return the cloned set + return clone; + }, + + clean: function( elems, context, fragment, scripts ) { + var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, + i = 0, + ret = []; + + // Ensure that context is a document + if ( !context || typeof context.createDocumentFragment === "undefined" ) { + context = document; + } + + // Use the already-created safe fragment if context permits + for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { + if ( typeof elem === "number" ) { + elem += ""; + } + + if ( !elem ) { + continue; + } + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + if ( !rhtml.test( elem ) ) { + elem = context.createTextNode( elem ); + } else { + // Ensure a safe container in which to render the html + safe = safe || createSafeFragment( context ); + div = div || safe.appendChild( context.createElement("div") ); + + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(rxhtmlTag, "<$1>"); + + // Go to html and back, then peel off extra wrappers + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + depth = wrap[0]; + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( depth-- ) { + div = div.lastChild; + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + hasBody = rtbody.test(elem); + tbody = tag === "table" && !hasBody ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare or + wrap[1] === "
                                                        " && !hasBody ? + div.childNodes : + []; + + for ( j = tbody.length - 1; j >= 0 ; --j ) { + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + } + } + } + + // IE completely kills leading whitespace when innerHTML is used + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); + } + + elem = div.childNodes; + + // Remember the top-level container for proper cleanup + div = safe.lastChild; + } + } + + if ( elem.nodeType ) { + ret.push( elem ); + } else { + ret = jQuery.merge( ret, elem ); + } + } + + // Fix #11356: Clear elements from safeFragment + if ( div ) { + safe.removeChild( div ); + elem = div = safe = null; + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + for ( i = 0; (elem = ret[i]) != null; i++ ) { + if ( jQuery.nodeName( elem, "input" ) ) { + fixDefaultChecked( elem ); + } else if ( typeof elem.getElementsByTagName !== "undefined" ) { + jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); + } + } + } + + // Append elements to a provided document fragment + if ( fragment ) { + // Special handling of each script element + handleScript = function( elem ) { + // Check if we consider it executable + if ( !elem.type || rscriptType.test( elem.type ) ) { + // Detach the script and store it in the scripts array (if provided) or the fragment + // Return truthy to indicate that it has been handled + return scripts ? + scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : + fragment.appendChild( elem ); + } + }; + + for ( i = 0; (elem = ret[i]) != null; i++ ) { + // Check if we're done after handling an executable script + if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { + // Append to fragment and handle embedded scripts + fragment.appendChild( elem ); + if ( typeof elem.getElementsByTagName !== "undefined" ) { + // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration + jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); + + // Splice the scripts into ret after their former ancestor and advance our index beyond them + ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); + i += jsTags.length; + } + } + } + } + + return ret; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var data, id, elem, type, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + jQuery.deletedIds.push( id ); + } + } + } + } + } +}); +// Limit scope pollution from any deprecated API +(function() { + +var matched, browser; + +// Use of jQuery.browser is frowned upon. +// More details: http://api.jquery.com/jQuery.browser +// jQuery.uaMatch maintained for back-compat +jQuery.uaMatch = function( ua ) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || + /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; +}; + +matched = jQuery.uaMatch( navigator.userAgent ); +browser = {}; + +if ( matched.browser ) { + browser[ matched.browser ] = true; + browser.version = matched.version; +} + +// Deprecated, use jQuery.browser.webkit instead +// Maintained for back-compat only +if ( browser.webkit ) { + browser.safari = true; +} + +jQuery.browser = browser; + +jQuery.sub = function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; +}; + +})(); +var curCSS, iframe, iframeDoc, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity=([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), + elemdisplay = {}, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400, + lineHeight: 1 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], + + eventsToggle = jQuery.fn.toggle; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var elem, display, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + values[ index ] = jQuery._data( elem, "olddisplay" ); + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && elem.style.display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + display = curCSS( elem, "display" ); + + if ( !values[ index ] && display !== "none" ) { + jQuery._data( elem, "olddisplay", display ); + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state, fn2 ) { + var bool = typeof state === "boolean"; + + if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { + return eventsToggle.apply( this, arguments ); + } + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, numeric, extra ) { + var val, num, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( numeric || extra !== undefined ) { + num = parseFloat( val ); + return numeric || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: To any future maintainer, we've used both window.getComputedStyle +// and getComputedStyle here to produce a better gzip size +if ( window.getComputedStyle ) { + curCSS = function( elem, name ) { + var ret, width, minWidth, maxWidth, + computed = getComputedStyle( elem, null ), + style = elem.style; + + if ( computed ) { + + ret = computed[ name ]; + if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + curCSS = function( elem, name ) { + var left, rsLeft, + ret = elem.currentStyle && elem.currentStyle[ name ], + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + elem.runtimeStyle.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + elem.runtimeStyle.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + // we use jQuery.css instead of curCSS here + // because of the reliableMarginRight CSS hook! + val += jQuery.css( elem, extra + cssExpand[ i ], true ); + } + + // From this point on we use curCSS for maximum performance (relevant in animations) + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } else { + // at this point, extra isn't content, so add padding + val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + valueIsBorderBox = true, + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; + + if ( val <= 0 ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox + ) + ) + "px"; +} + + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + if ( elemdisplay[ nodeName ] ) { + return elemdisplay[ nodeName ]; + } + + var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), + display = elem.css("display"); + elem.remove(); + + // If the simple way fails, + // get element's real default display by attaching it to a temp iframe + if ( display === "none" || display === "" ) { + // Use the already-created iframe if possible + iframe = document.body.appendChild( + iframe || jQuery.extend( document.createElement("iframe"), { + frameBorder: 0, + width: 0, + height: 0 + }) + ); + + // Create a cacheable copy of the iframe document on first call. + // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML + // document to it; WebKit & Firefox won't allow reusing the iframe document. + if ( !iframeDoc || !iframe.createElement ) { + iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; + iframeDoc.write(""); + iframeDoc.close(); + } + + elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); + + display = curCSS( elem, "display" ); + document.body.removeChild( iframe ); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { + return getWidthOrHeight( elem, name, extra ); + } else { + return jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }); + } + } + }, + + set: function( elem, value, extra ) { + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there there is no filter style applied in a css rule, we are done + if ( currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, function() { + if ( computed ) { + return curCSS( elem, "marginRight" ); + } + }); + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + var ret = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ], + expanded = {}; + + for ( i = 0; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + rselectTextarea = /^(?:select|textarea)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + return this.elements ? jQuery.makeArray( this.elements ) : this; + }) + .filter(function(){ + return this.name && !this.disabled && + ( this.checked || rselectTextarea.test( this.nodeName ) || + rinput.test( this.type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val, i ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // If array item is non-scalar (array or object), encode its + // numeric index to resolve deserialization ambiguity issues. + // Note that rack (as of 1.0.0) can't currently deserialize + // nested arrays properly, and attempting to do so may cause + // a server error. Possible fixes are to modify rack's + // deserialization algorithm or to provide an option or flag + // to force array serialization to be shallow. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +var // Document location + ajaxLocation, + // Document location segments + ajaxLocParts, + + rhash = /#.*$/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rquery = /\?/, + rscript = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
                                                        ") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = "" + ( nativeStatusText || statusText ); + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // Determine if a cross-domain request is in order + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( _ ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, prevScale, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value ), + target = tween.cur(), + start = +target || 0, + scale = 1; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + prevScale = scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zeroes from tween.cur() + scale = tween.cur() / target; + + // Stop looping if we've hit the mark or scale is unchanged + } while ( scale !== 1 && scale !== prevScale ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + percent = 1 - ( remaining / animation.duration || 0 ), + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure we're not dealing with a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return { top: 0, left: 0 }; + } + + box = elem.getBoundingClientRect(); + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + top = box.top + scrollTop - clientTop; + left = box.left + scrollLeft - clientLeft; + + return { top: top, left: left }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); \ No newline at end of file diff --git a/dev/js/lib/jquery-ui-1.10.3.custom.js b/dev/js/lib/jquery-ui-1.10.3.custom.js new file mode 100644 index 00000000..4bc322f8 --- /dev/null +++ b/dev/js/lib/jquery-ui-1.10.3.custom.js @@ -0,0 +1,2252 @@ +/*! jQuery UI - v1.10.3 - 2013-06-12 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +(function( $, undefined ) { + +var uuid = 0, + runiqueId = /^ui-id-\d+$/; + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: "1.10.3", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + scrollParent: function() { + var scrollParent; + if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } + + return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + //
                                                        + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + }, + + uniqueId: function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + (++uuid); + } + }); + }, + + removeUniqueId: function() { + return this.each(function() { + if ( runiqueId.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap=#" + mapName + "]" )[0]; + return !!img && visible( img ); + } + return ( /input|select|textarea|button|object/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + + + + + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.support.selectstart = "onselectstart" in document.createElement( "div" ); +$.fn.extend({ + disableSelection: function() { + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }, + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + } +}); + +$.extend( $.ui, { + // $.ui.plugin is deprecated. Use $.widget() extensions instead. + plugin: { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args ) { + var i, + set = instance.plugins[ name ]; + if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } + }, + + // only used by resizable + hasScroll: function( el, a ) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + } +}); + +})( jQuery ); +(function( $, undefined ) { + +var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; +$.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); +}; + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); +}; + +$.widget.extend = function( target ) { + var input = slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
                                                        ", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( value === undefined ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( value === undefined ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +})( jQuery ); +(function( $, undefined ) { + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +$.widget("ui.mouse", { + version: "1.10.3", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown."+this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click."+this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("."+this.widgetName); + if ( this._mouseMoveDelegate ) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if( mouseHandled ) { return; } + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + $(document) + .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .bind("mouseup."+this.widgetName, this._mouseUpDelegate); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(/* event */) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + +})(jQuery); +(function( $, undefined ) { + +/*jshint loopfunc: true */ + +function isOverAxis( x, reference, size ) { + return ( x > reference ) && ( x < ( reference + size ) ); +} + +function isFloating(item) { + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); +} + +$.widget("ui.sortable", $.ui.mouse, { + version: "1.10.3", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000, + + // callbacks + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + _create: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are being displayed horizontally + this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + //We're ready to go + this.ready = true; + + }, + + _destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) { + this.items[i].item.removeData(this.widgetName + "-item"); + } + + return this; + }, + + _setOption: function(key, value){ + if ( key === "disabled" ) { + this.options[ key ] = value; + + this.widget().toggleClass( "ui-sortable-disabled", !!value ); + } else { + // Don't call widget base _setOption for disable as it adds ui-state-disabled class + $.Widget.prototype._setOption.apply(this, arguments); + } + }, + + _mouseCapture: function(event, overrideHandle) { + var currentItem = null, + validHandle = false, + that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type === "static") { + return false; + } + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + $(event.target).parents().each(function() { + if($.data(this, that.widgetName + "-item") === that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + "-item") === that) { + currentItem = $(event.target); + } + + if(!currentItem) { + return false; + } + if(this.options.handle && !overrideHandle) { + $(this.options.handle, currentItem).find("*").addBack().each(function() { + if(this === event.target) { + validHandle = true; + } + }); + if(!validHandle) { + return false; + } + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var i, body, + o = this.options; + + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] !== this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) { + this._setContainment(); + } + + if( o.cursor && o.cursor !== "auto" ) { // cursor option + body = this.document.find( "body" ); + + // support: IE + this.storedCursor = body.css( "cursor" ); + body.css( "cursor", o.cursor ); + + this.storedStylesheet = $( "" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items form other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this moving items in "sub-sortables" can cause the placeholder to jitter + // beetween the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each(function() { + items.push(this); + }); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tr" ) { + that.currentItem.children().each(function() { + $( "
                                                        ", that.document[0] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( element ); + }); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + base = this.positionAbs[posProperty] + this.offset.click[posProperty]; + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { + continue; + } + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ + nearBottom = true; + cur += this.items[j][sizeProperty]; + } + + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + for (i = this.containers.length - 1; i >= 0; i--){ + if(!noPropagation) { + delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + if(this.cancelHelperRemoval) { + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return false; + } + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.helper[0] !== this.currentItem[0]) { + this.helper.remove(); + } + this.helper = null; + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return true; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + +})(jQuery); diff --git a/dev/js/lib/jszip/jszip.min.js b/dev/js/lib/jszip/jszip.min.js new file mode 100644 index 00000000..ae4aa7cb --- /dev/null +++ b/dev/js/lib/jszip/jszip.min.js @@ -0,0 +1,14 @@ +/*! + +JSZip - A Javascript class for generating and reading zip files + + +(c) 2009-2014 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library zlib.js released under the following license : +zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License +*/ +!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ +(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ +(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}); \ No newline at end of file diff --git a/dev/js/lib/pubsub.js b/dev/js/lib/pubsub.js new file mode 100644 index 00000000..b1569894 --- /dev/null +++ b/dev/js/lib/pubsub.js @@ -0,0 +1,25 @@ +/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 + * http://benalman.com/ + * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ + +(function($) { + + var o = $({}); + + $.subscribe = function() { + //console.log("SUBSCRIBE: " + arguments[0]); + o.on.apply(o, arguments); + }; + + $.unsubscribe = function() { + o.off.apply(o, arguments); + }; + + $.publish = function() { + //console.log("PUBLISH: " + arguments[0]); + o.trigger.apply(o, arguments); + }; + +}(jQuery)); + + diff --git a/dev/js/lib/q.js b/dev/js/lib/q.js new file mode 100644 index 00000000..710fdf4b --- /dev/null +++ b/dev/js/lib/q.js @@ -0,0 +1,1986 @@ +// vim:ts=4:sts=4:sw=4: +/*! + * + * Copyright 2009-2012 Kris Kowal under the terms of the MIT + * license found at http://github.com/kriskowal/q/raw/master/LICENSE + * + * With parts by Tyler Close + * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found + * at http://www.opensource.org/licenses/mit-license.html + * Forked at ref_send.js version: 2009-05-11 + * + * With parts by Mark Miller + * Copyright (C) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +(function (definition) { + "use strict"; + + // This file will function properly as a - - - -
                                                        -
                                                        -
                                                        -
                                                        -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          1x
                                                          -
                                                          -
                                                          Full
                                                          -
                                                          -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          - - -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          -

                                                          Layers -
                                                          -

                                                          -
                                                          - - - - - - - - - - - - -
                                                          - -
                                                            - - -
                                                            - -
                                                            -

                                                            Transform

                                                            -
                                                              -
                                                              -
                                                              -

                                                              Palettes

                                                              -
                                                              - - - -
                                                              -
                                                              - - - - -
                                                              - - - -
                                                              -
                                                              -
                                                              - -
                                                              -
                                                              -
                                                              -
                                                              -
                                                              - -
                                                              -
                                                              - -
                                                              -
                                                              - -
                                                              -
                                                              - -
                                                              -
                                                              - -
                                                              -
                                                              -
                                                              -
                                                              -
                                                              -
                                                              -
                                                              - - -
                                                              -
                                                              -
                                                              -
                                                              - -
                                                              - - - - - - - - - - -
                                                              -
                                                              - -
                                                              - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fix_v1/js/lib/gif/gif.ie.worker.js b/fix_v1/js/lib/gif/gif.ie.worker.js deleted file mode 100644 index b6150c93..00000000 --- a/fix_v1/js/lib/gif/gif.ie.worker.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1< to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.0", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = "
                                                               
                                                              a"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
                                                              t
                                                              "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, window.getComputedStyle was used here - // instead of getComputedStyle because it gave a better gzip size. - // The difference between window.getComputedStyle and getComputedStyle is - // 7 bytes - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
                                                              "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - if ( !queue.length && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = jqcur.is( sel ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - dirruns, - sortOrder, - siblingCheck, - assertGetIdNotName, - - document = window.document, - docElem = document.documentElement, - - strundefined = "undefined", - hasDuplicate = false, - baseHasDuplicate = true, - done = 0, - slice = [].slice, - push = [].push, - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", - pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", - combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", - groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcombinators = new RegExp( "^" + combinators ), - - // All simple (non-comma) selectors, excluding insignifant trailing whitespace - rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), - - // A selector, or everything after leading whitespace - // Optionally followed in either case by a ")" for terminating sub-selectors - rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), - - // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive - rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "POS": new RegExp( pos, "ig" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - classCache = {}, - cachedClasses = [], - compilerCache = {}, - cachedSelectors = [], - - // Mark a function for use in filtering - markFunction = function( fn ) { - fn.sizzleFilter = true; - return fn; - }, - - // Returns a function to use in pseudos for input types - createInputFunction = function( type ) { - return function( elem ) { - // Check the input's nodeName and type - return elem.nodeName.toLowerCase() === "input" && elem.type === type; - }; - }, - - // Returns a function to use in pseudos for buttons - createButtonFunction = function( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; - }, - - // Used for testing something on an element - assert = function( fn ) { - var pass = false, - div = document.createElement("div"); - try { - pass = fn( div ); - } catch (e) {} - // release memory in IE - div = null; - return pass; - }, - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
                                                              "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === - // buggy browsers will return more than the correct 0 - 2 + document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }), - - // Check if the browser returns only elements - // when doing getElementsByTagName("*") - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return div.getElementsByTagName("*").length === 0; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return false; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length !== 1; - }); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector, context, results, seed, xml ); -}; - -var Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - match: matchExpr, - - order: [ "ID", "TAG" ], - - attrHandle: {}, - - createPseudo: markFunction, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr.CHILD - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var argument, - unquoted = match[4]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Relinquish our claim on characters in `unquoted` from a closing parenthesis on - if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { - - match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); - unquoted = argument[0].slice( 0, -1 ); - } - - // Quoted or unquoted, we have the full argument - // Return only captures needed by the pseudo filter method (type and argument) - match.splice( 2, 3, unquoted || match[3] ); - return match; - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className ]; - if ( !pattern ) { - pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); - cachedClasses.push( className ); - // Avoid too large of a cache - if ( cachedClasses.length > Expr.cacheLength ) { - delete classCache[ cachedClasses.shift() ]; - } - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - if ( !operator ) { - return function( elem ) { - return Sizzle.attr( elem, name ) != null; - }; - } - - return function( elem ) { - var result = Sizzle.attr( elem, name ), - value = result + ""; - - if ( result == null ) { - return operator === "!="; - } - - switch ( operator ) { - case "=": - return value === check; - case "!=": - return value !== check; - case "^=": - return check && value.indexOf( check ) === 0; - case "*=": - return check && value.indexOf( check ) > -1; - case "$=": - return check && value.substr( value.length - check.length ) === check; - case "~=": - return ( " " + value + " " ).indexOf( check ) > -1; - case "|=": - return value === check || value.substr( 0, check.length + 1 ) === check + "-"; - } - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - var doneName = done++; - - return function( elem ) { - var parent, diff, - count = 0, - node = elem; - - if ( first === 1 && last === 0 ) { - return true; - } - - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.sizset = ++count; - if ( node === elem ) { - break; - } - } - } - - parent[ expando ] = doneName; - } - - diff = elem.sizset - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument, context, xml ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( "unsupported pseudo: " + pseudo ); - } - - // The user may set fn.sizzleFilter to indicate - // that arguments are needed to create the filter function - // just as Sizzle does - if ( !fn.sizzleFilter ) { - return fn; - } - - return fn( argument, context, xml ); - } - }, - - pseudos: { - "not": markFunction(function( selector, context, xml ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); - return function( elem ) { - return !matcher( elem ); - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputFunction("radio"), - "checkbox": createInputFunction("checkbox"), - "file": createInputFunction("file"), - "password": createInputFunction("password"), - "image": createInputFunction("image"), - - "submit": createButtonFunction("submit"), - "reset": createButtonFunction("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - - setFilters: { - "first": function( elements, argument, not ) { - return not ? elements.slice( 1 ) : [ elements[0] ]; - }, - - "last": function( elements, argument, not ) { - var elem = elements.pop(); - return not ? elements : [ elem ]; - }, - - "even": function( elements, argument, not ) { - var results = [], - i = not ? 1 : 0, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "odd": function( elements, argument, not ) { - var results = [], - i = not ? 0 : 1, - len = elements.length; - for ( ; i < len; i = i + 2 ) { - results.push( elements[i] ); - } - return results; - }, - - "lt": function( elements, argument, not ) { - return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); - }, - - "gt": function( elements, argument, not ) { - return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); - }, - - "eq": function( elements, argument, not ) { - var elem = elements.splice( +argument, 1 ); - return not ? elements : elem; - } - } -}; - -// Deprecated -Expr.setFilters["nth"] = Expr.setFilters["eq"]; - -// Back-compat -Expr.filters = Expr.pseudos; - -// IE6/7 return a modified href -if ( !assertHrefNotNormalized ) { - Expr.attrHandle = { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; -} - -// Add getElementsByName if usable -if ( assertUsableName ) { - Expr.order.push("NAME"); - Expr.find["NAME"] = function( name, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; -} - -// Add getElementsByClassName if usable -if ( assertUsableClassName ) { - Expr.order.splice( 1, 0, "CLASS" ); - Expr.find["CLASS"] = function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - }; -} - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -var isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -var contains = Sizzle.contains = docElem.compareDocumentPosition ? - function( a, b ) { - return !!( a.compareDocumentPosition( b ) & 16 ); - } : - docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -Sizzle.attr = function( elem, name ) { - var attr, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( Expr.attrHandle[ name ] ) { - return Expr.attrHandle[ name ]( elem ); - } - if ( assertAttributes || xml ) { - return elem.getAttribute( name ); - } - attr = elem.getAttributeNode( name ); - return attr ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - attr.specified ? attr.value : null : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - return (baseHasDuplicate = 0); -}); - - -if ( docElem.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } -} - -function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { - var results, - fn = Expr.setFilters[ posfilter.toLowerCase() ]; - - if ( !fn ) { - Sizzle.error( posfilter ); - } - - if ( selector || !(results = seed) ) { - multipleContexts( selector || "*", contexts, (results = []), seed ); - } - - return results.length > 0 ? fn( results, argument, not ) : []; -} - -function handlePOS( selector, context, results, seed, groups ) { - var match, not, anchor, ret, elements, currentContexts, part, lastIndex, - i = 0, - len = groups.length, - rpos = matchExpr["POS"], - // This is generated here in case matchExpr["POS"] is extended - rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), - // This is for making sure non-participating - // matching groups are represented cross-browser (IE6-8) - setUndefined = function() { - var i = 1, - len = arguments.length - 2; - for ( ; i < len; i++ ) { - if ( arguments[i] === undefined ) { - match[i] = undefined; - } - } - }; - - for ( ; i < len; i++ ) { - // Reset regex index to 0 - rpos.exec(""); - selector = groups[i]; - ret = []; - anchor = 0; - elements = seed; - while ( (match = rpos.exec( selector )) ) { - lastIndex = rpos.lastIndex = match.index + match[0].length; - if ( lastIndex > anchor ) { - part = selector.slice( anchor, match.index ); - anchor = lastIndex; - currentContexts = [ context ]; - - if ( rcombinators.test(part) ) { - if ( elements ) { - currentContexts = elements; - } - elements = seed; - } - - if ( (not = rendsWithNot.test( part )) ) { - part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); - } - - if ( match.length > 1 ) { - match[0].replace( rposgroups, setUndefined ); - } - elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); - } - } - - if ( elements ) { - ret = ret.concat( elements ); - - if ( (part = selector.slice( anchor )) && part !== ")" ) { - if ( rcombinators.test(part) ) { - multipleContexts( part, ret, results, seed ); - } else { - Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); - } - } else { - push.apply( results, ret ); - } - } else { - Sizzle( selector, context, results, seed ); - } - } - - // Do not sort if this is a single filter - return len === 1 ? results : Sizzle.uniqueSort( results ); -} - -function tokenize( selector, context, xml ) { - var tokens, soFar, type, - groups = [], - i = 0, - - // Catch obvious selector issues: terminal ")"; nonempty fallback match - // rselector never fails to match *something* - match = rselector.exec( selector ), - matched = !match.pop() && !match.pop(), - selectorGroups = matched && selector.match( rgroups ) || [""], - - preFilters = Expr.preFilter, - filters = Expr.filter, - checkContext = !xml && context !== document; - - for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { - groups.push( tokens = [] ); - - // Need to make sure we're within a narrower context if necessary - // Adding a descendant combinator will generate what is needed - if ( checkContext ) { - soFar = " " + soFar; - } - - while ( soFar ) { - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - soFar = soFar.slice( match[0].length ); - - // Cast descendant combinators to space - matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); - } - - // Filters - for ( type in filters ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match, context, xml )) ) ) { - - soFar = soFar.slice( match.shift().length ); - matched = tokens.push({ part: type, captures: match }); - } - } - - if ( !matched ) { - break; - } - } - } - - if ( !matched ) { - Sizzle.error( selector ); - } - - return groups; -} - -function addCombinator( matcher, combinator, context ) { - var dir = combinator.dir, - doneName = done++; - - if ( !matcher ) { - // If there is no matcher to check, check against the context - matcher = function( elem ) { - return elem === context; - }; - } - return combinator.first ? - function( elem, context ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - return matcher( elem, context ) && elem; - } - } - } : - function( elem, context ) { - var cache, - dirkey = doneName + "." + dirruns, - cachedkey = dirkey + "." + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - }; -} - -function addMatcher( higher, deeper ) { - return higher ? - function( elem, context ) { - var result = deeper( elem, context ); - return result && higher( result === true ? elem : result, context ); - } : - deeper; -} - -// ["TAG", ">", "ID", " ", "CLASS"] -function matcherFromTokens( tokens, context, xml ) { - var token, matcher, - i = 0; - - for ( ; (token = tokens[i]); i++ ) { - if ( Expr.relative[ token.part ] ) { - matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); - } else { - token.captures.push( context, xml ); - matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); - } - } - - return matcher; -} - -function matcherFromGroupMatchers( matchers ) { - return function( elem, context ) { - var matcher, - j = 0; - for ( ; (matcher = matchers[j]); j++ ) { - if ( matcher(elem, context) ) { - return true; - } - } - return false; - }; -} - -var compile = Sizzle.compile = function( selector, context, xml ) { - var tokens, group, i, - cached = compilerCache[ selector ]; - - // Return a cached group function if already generated (context dependent) - if ( cached && cached.context === context ) { - return cached; - } - - // Generate a function of recursive functions that can be used to check each element - group = tokenize( selector, context, xml ); - for ( i = 0; (tokens = group[i]); i++ ) { - group[i] = matcherFromTokens( tokens, context, xml ); - } - - // Cache the compiled function - cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); - cached.context = context; - cached.runs = cached.dirruns = 0; - cachedSelectors.push( selector ); - // Ensure only the most recent are cached - if ( cachedSelectors.length > Expr.cacheLength ) { - delete compilerCache[ cachedSelectors.shift() ]; - } - return cached; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -var select = function( selector, context, results, seed, xml ) { - // Remove excessive whitespace - selector = selector.replace( rtrim, "$1" ); - var elements, matcher, i, len, elem, token, - type, findContext, notTokens, - match = selector.match( rgroups ), - tokens = selector.match( rtokens ), - contextNodeType = context.nodeType; - - // POS handling - if ( matchExpr["POS"].test(selector) ) { - return handlePOS( selector, context, results, seed, match ); - } - - if ( seed ) { - elements = slice.call( seed, 0 ); - - // To maintain document order, only narrow the - // set if there is one group - } else if ( match && match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - if ( tokens.length > 1 && contextNodeType === 9 && !xml && - (match = matchExpr["ID"].exec( tokens[0] )) ) { - - context = Expr.find["ID"]( match[1], context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; - - // Get the last token, excluding :not - notTokens = tokens.pop(); - token = notTokens.split(":not")[0]; - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = matchExpr[ type ].exec( token )) ) { - elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); - - if ( elements == null ) { - continue; - } - - if ( token === notTokens ) { - selector = selector.slice( 0, selector.length - notTokens.length ) + - token.replace( matchExpr[ type ], "" ); - - if ( !selector ) { - push.apply( results, slice.call(elements, 0) ); - } - } - break; - } - } - } - - // Only loop over the given elements once - // If selector is empty, we're already done - if ( selector ) { - matcher = compile( selector, context, xml ); - dirruns = matcher.dirruns++; - - if ( elements == null ) { - elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); - } - for ( i = 0; (elem = elements[i]); i++ ) { - cachedruns = matcher.runs++; - if ( matcher(elem, context) ) { - results.push( elem ); - } - } - } - - return results; -}; - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - rbuggyQSA = [], - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [":active"], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "

                                                              "; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = ""; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - if ( context.nodeType === 9 ) { - try { - push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); - return results; - } catch(qsaError) {} - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute("id"), - nid = old || expando, - newContext = rsibling.test( selector ) && context.parentNode || context; - - if ( old ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - - try { - push.apply( results, slice.call( newContext.querySelectorAll( - selector.replace( rgroups, "[id='" + nid + "'] $&" ) - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( Expr.match.PSEUDO ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*\s*$/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
                                                              ", "
                                                              " ], - thead: [ 1, "", "
                                                              " ], - tr: [ 2, "", "
                                                              " ], - td: [ 3, "", "
                                                              " ], - col: [ 2, "", "
                                                              " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X
                                                              ", "
                                                              " ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - context = context || document; - context = (context[0] || context).ownerDocument || context[0] || context; - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put or elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - i = 0, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = div || safe.appendChild( context.createElement("div") ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare or - wrap[1] === "
                                                              " && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Remember the top-level container for proper cleanup - div = safe.lastChild; - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - safe.removeChild( div ); - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Deprecated, use jQuery.browser.webkit instead -// Maintained for back-compat only -if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400, - lineHeight: 1 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've used both window.getComputedStyle -// and getComputedStyle here to produce a better gzip size -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - if ( val <= 0 ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write(""); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { - return getWidthOrHeight( elem, name, extra ); - } else { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var // Document location - ajaxLocation, - // Document location segments - ajaxLocParts, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("
                                                              ") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, prevScale, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - prevScale = scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zeroes from tween.cur() - scale = tween.cur() / target; - - // Stop looping if we've hit the mark or scale is unchanged - } while ( scale !== 1 && scale !== prevScale ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return { top: 0, left: 0 }; - } - - box = elem.getBoundingClientRect(); - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - top = box.top + scrollTop - clientTop; - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window );;/*! jQuery UI - v1.10.3 - 2013-06-12 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
                                                              - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
                                                              ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -/*jshint loopfunc: true */ - -function isOverAxis( x, reference, size ) { - return ( x > reference ) && ( x < ( reference + size ) ); -} - -function isFloating(item) { - return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); -} - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: "auto", - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: "> *", - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000, - - // callbacks - activate: null, - beforeStop: null, - change: null, - deactivate: null, - out: null, - over: null, - receive: null, - remove: null, - sort: null, - start: null, - stop: null, - update: null - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true; - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) { - this.items[i].item.removeData(this.widgetName + "-item"); - } - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var currentItem = null, - validHandle = false, - that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type === "static") { - return false; - } - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - $(event.target).parents().each(function() { - if($.data(this, that.widgetName + "-item") === that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + "-item") === that) { - currentItem = $(event.target); - } - - if(!currentItem) { - return false; - } - if(this.options.handle && !overrideHandle) { - $(this.options.handle, currentItem).find("*").addBack().each(function() { - if(this === event.target) { - validHandle = true; - } - }); - if(!validHandle) { - return false; - } - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var i, body, - o = this.options; - - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] !== this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } - - if( o.cursor && o.cursor !== "auto" ) { // cursor option - body = this.document.find( "body" ); - - // support: IE - this.storedCursor = body.css( "cursor" ); - body.css( "cursor", o.cursor ); - - this.storedStylesheet = $( "" ).appendTo( body ); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) { - this._storedOpacity = this.helper.css("opacity"); - } - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) { - this._storedZIndex = this.helper.css("zIndex"); - } - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - this.overflowOffset = this.scrollParent.offset(); - } - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) { - this._cacheHelperProportions(); - } - - - //Post "activate" events to possible containers - if( !noActivation ) { - for ( i = this.containers.length - 1; i >= 0; i-- ) { - this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); - } - } - - //Prepare possible droppables - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; - } - - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - var i, item, itemElement, intersection, - o = this.options, - scrolled = false; - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); - } - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - - //Rearrange - for (i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - item = this.items[i]; - itemElement = item.item[0]; - intersection = this._intersectsWithPointer(item); - if (!intersection) { - continue; - } - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) { - continue; - } - - // cannot intersect with itself - // no useless actions that have been done before - // no action if the item moved is the parent of the item checked - if (itemElement !== this.currentItem[0] && - this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && - !$.contains(this.placeholder[0], itemElement) && - (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) - ) { - - this.direction = intersection === 1 ? "down" : "up"; - - if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); - } - - //Call callbacks - this._trigger("sort", event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) { - return; - } - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) { - $.ui.ddmanager.drop(this, event); - } - - if(this.options.revert) { - var that = this, - cur = this.placeholder.offset(), - axis = this.options.axis, - animation = {}; - - if ( !axis || axis === "x" ) { - animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); - } - if ( !axis || axis === "y" ) { - animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); - } - this.reverting = true; - $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper === "original") { - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) { - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - } - if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { - this.helper.remove(); - } - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - str = []; - o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); - if (res) { - str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); - } - }); - - if(!str.length && o.key) { - str.push(o.key + "="); - } - - return str.join("&"); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected), - ret = []; - - o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height, - l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height, - dyClick = this.offset.click.top, - dxClick = this.offset.click.left, - isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), - isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), - isOverElement = isOverElementHeight && isOverElementWidth; - - if ( this.options.tolerance === "pointer" || - this.options.forcePointerForContainers || - (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) && // Right Half - x2 - (this.helperProportions.width / 2) < r && // Left Half - t < y1 + (this.helperProportions.height / 2) && // Bottom Half - y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) { - return false; - } - - return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta !== 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta !== 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var i, j, cur, inst, - items = [], - queries = [], - connectWith = this._connectWith(); - - if(connectWith && connected) { - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for ( j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); - } - } - } - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - - for (i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - } - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] === item.item[0]) { - return false; - } - } - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - - var i, j, cur, inst, targetData, _queries, item, queriesLength, - items = this.items, - queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], - connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (i = connectWith.length - 1; i >= 0; i--){ - cur = $(connectWith[i]); - for (j = cur.length - 1; j >= 0; j--){ - inst = $.data(cur[j], this.widgetFullName); - if(inst && inst !== this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - } - } - } - - for (i = queries.length - 1; i >= 0; i--) { - targetData = queries[i][1]; - _queries = queries[i][0]; - - for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { - item = $(_queries[j]); - - item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - } - } - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - var i, item, t, p; - - for (i = this.items.length - 1; i >= 0; i--){ - item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { - continue; - } - - t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - p = t.offset(); - item.left = p.left; - item.top = p.top; - } - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (i = this.containers.length - 1; i >= 0; i--){ - p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - } - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var className, - o = that.options; - - if(!o.placeholder || o.placeholder.constructor === String) { - className = o.placeholder; - o.placeholder = { - element: function() { - - var nodeName = that.currentItem[0].nodeName.toLowerCase(), - element = $( "<" + nodeName + ">", that.document[0] ) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper"); - - if ( nodeName === "tr" ) { - that.currentItem.children().each(function() { - $( "
                                                              ", that.document[0] ) - .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) - .appendTo( element ); - }); - } else if ( nodeName === "img" ) { - element.attr( "src", that.currentItem.attr( "src" ) ); - } - - if ( !className ) { - element.css( "visibility", "hidden" ); - } - - return element; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) { - return; - } - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) { - return; - } - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } - - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } - - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); - - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } - - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - } - - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - } - - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; - } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } - - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter === this.counter) { - this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - } - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var i, - delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) { - this.placeholder.before(this.currentItem); - } - this._noFinalSort = null; - - if(this.helper[0] === this.currentItem[0]) { - for(i in this._storedCSS) { - if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { - this._storedCSS[i] = ""; - } - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - } - if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { - delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - } - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - } - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if ( this.storedCursor ) { - this.document.find( "body" ).css( "cursor", this.storedCursor ); - this.storedStylesheet.remove(); - } - if(this._storedOpacity) { - this.helper.css("opacity", this._storedOpacity); - } - if(this._storedZIndex) { - this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); - } - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - } - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] !== this.currentItem[0]) { - this.helper.remove(); - } - this.helper = null; - - if(!noPropagation) { - for (i=0; i < delayedTriggers.length; i++) { - delayedTriggers[i].call(this, event); - } //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -;/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 - * http://benalman.com/ - * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ - -(function($) { - - var o = $({}); - - $.subscribe = function() { - //console.log("SUBSCRIBE: " + arguments[0]); - o.on.apply(o, arguments); - }; - - $.unsubscribe = function() { - o.off.apply(o, arguments); - }; - - $.publish = function() { - //console.log("PUBLISH: " + arguments[0]); - o.trigger.apply(o, arguments); - }; - -}(jQuery)); - - -;/* =========================================================== - * bootstrap-tooltip.js v2.1.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips - * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ - - var Tooltip = function (element, options) { - this.init('tooltip', element, options) - } - - Tooltip.prototype = { - - constructor: Tooltip - - , init: function (type, element, options) { - var eventIn - , eventOut - - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.enabled = true - - if (this.options.trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (this.options.trigger != 'manual') { - eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' - eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay - , hide: options.delay - } - } - - return options - } - - , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (!self.options.delay || !self.options.delay.show) return self.show() - - clearTimeout(this.timeout) - self.hoverState = 'in' - this.timeout = setTimeout(function() { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - , leave: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) - - if (this.timeout) clearTimeout(this.timeout) - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.hoverState = 'out' - this.timeout = setTimeout(function() { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - , show: function () { - var $tip - , inside - , pos - , actualWidth - , actualHeight - , placement - , tp - - if (this.hasContent() && this.enabled) { - $tip = this.tip() - this.setContent() - - if (this.options.animation) { - $tip.addClass('fade') - } - - placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - inside = /in/.test(placement) - - $tip - .remove() - .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) - - pos = this.getPosition(inside) - - actualWidth = $tip[0].offsetWidth - actualHeight = $tip[0].offsetHeight - - switch (inside ? placement.split(' ')[1] : placement) { - case 'bottom': - tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'top': - tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} - break - case 'left': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} - break - case 'right': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} - break - } - - $tip - .css(tp) - .addClass(placement) - .addClass('in') - } - } - - , setContent: function () { - var $tip = this.tip() - , title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - , hide: function () { - var that = this - , $tip = this.tip() - - $tip.removeClass('in') - - function removeWithAnimation() { - var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() - }, 500) - - $tip.one($.support.transition.end, function () { - clearTimeout(timeout) - $tip.remove() - }) - } - - $.support.transition && this.$tip.hasClass('fade') ? - removeWithAnimation() : - $tip.remove() - - return this - } - - , fixTitle: function () { - var $e = this.$element - if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') - } - } - - , hasContent: function () { - return this.getTitle() - } - - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) - } - - , getTitle: function () { - var title - , $e = this.$element - , o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - , tip: function () { - return this.$tip = this.$tip || $(this.options.template) - } - - , validate: function () { - if (!this.$element[0].parentNode) { - this.hide() - this.$element = null - this.options = null - } - } - - , enable: function () { - this.enabled = true - } - - , disable: function () { - this.enabled = false - } - - , toggleEnabled: function () { - this.enabled = !this.enabled - } - - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() - } - - , destroy: function () { - this.hide().$element.off('.' + this.type).removeData(this.type) - } - - } - - - /* TOOLTIP PLUGIN DEFINITION - * ========================= */ - - $.fn.tooltip = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('tooltip') - , options = typeof option == 'object' && option - if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.tooltip.Constructor = Tooltip - - $.fn.tooltip.defaults = { - animation: true - , placement: 'top' - , selector: false - , template: '
                                                              ' - , trigger: 'hover' - , title: '' - , delay: 0 - , html: true - } - -}(window.jQuery); -;// TODO(grosbouddha): put under pskl namespace. -var Constants = { - DEFAULT : { - HEIGHT : 32, - WIDTH : 32, - FPS : 12, - LAYER_OPACITY : 0.2 - }, - - MODEL_VERSION : 2, - - MAX_HEIGHT : 1024, - MAX_WIDTH : 1024, - - MAX_PALETTE_COLORS : 100, - // allow current colors service to get up to 256 colors. - // GIF generation is different if the color count goes over 256. - MAX_WORKER_COLORS : 256, - - PREVIEW_FILM_SIZE : 96, - ANIMATED_PREVIEW_WIDTH : 200, - - DEFAULT_PEN_COLOR : '#000000', - TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)', - SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0)', - - CURRENT_COLORS_PALETTE_ID : '__current-colors', - - /* - * Fake semi-transparent color used to highlight transparent - * strokes and rectangles: - */ - SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)', - - /* - * When a tool is hovering the drawing canvas, we highlight the eventual - * pixel target with this color: - */ - TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)', - TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)', - - ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0', - - LEFT_BUTTON : 0, - MIDDLE_BUTTON : 1, - RIGHT_BUTTON : 2, - MOUSEMOVE_THROTTLING : 10, - - ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}, - EMPTY_FUNCTION : function () {}, - - // TESTS - DRAWING_TEST_FOLDER : 'drawing', - - // Maximum size of a sprite that can be saved on piskelapp datastore. - // This size will be compared to the length of the stringified serialization of the sprite. - // This is an approximation at best but gives correct results in most cases. - // The datastore limit is 1 MiB, which we roughly approximate to 1 million characters. - APPENGINE_SAVE_LIMIT : 1 * 1024 * 1024, - - // SERVICE URLS - APPENGINE_SAVE_URL : 'save', - IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload', - IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/' -}; -;// TODO(grosbouddha): put under pskl namespace. -var Events = { - - TOOL_SELECTED : 'TOOL_SELECTED', - SELECT_TOOL : 'SELECT_TOOL', - - TOOL_RELEASED : 'TOOL_RELEASED', - TOOL_PRESSED : 'TOOL_PRESSED', - SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR', - SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR', - PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED', - SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED', - - CURSOR_MOVED : 'CURSOR_MOVED', - DRAG_START : 'DRAG_START', - DRAG_END : 'DRAG_END', - - DIALOG_DISPLAY : 'DIALOG_DISPLAY', - DIALOG_HIDE : 'DIALOG_HIDE', - - PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED', - - /** - * Fired each time a user setting change. - * The payload will be: - * 1st argument: Name of the settings - * 2nd argument: New value - */ - USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED', - SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED', - - CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER', - - /** - * The framesheet was reseted and is now probably drastically different. - * Number of frames, content of frames, color used for the palette may have changed. - */ - PISKEL_RESET: 'PISKEL_RESET', - PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE', - PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED', - PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE', - - HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED', - HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED', - - PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED', - - /** - * Fired when a Piskel is successfully saved - */ - PISKEL_SAVED: 'PISKEL_SAVED', - /** - * Fired when a save action starts - */ - BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL', - /** - * Fired when a save action ends. Always fires, even if saving was not successful - */ - AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL', - - FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED', - FPS_CHANGED : 'FPS_CHANGED', - - SELECTION_CREATED: 'SELECTION_CREATED', - SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST', - SELECTION_DISMISSED: 'SELECTION_DISMISSED', - SELECTION_COPY: 'SELECTION_COPY', - SELECTION_CUT: 'SELECTION_CUT', - SELECTION_PASTE: 'SELECTION_PASTE', - - SHOW_NOTIFICATION: 'SHOW_NOTIFICATION', - HIDE_NOTIFICATION: 'HIDE_NOTIFICATION', - - SHOW_PROGRESS: 'SHOW_PROGRESS', - UPDATE_PROGRESS: 'UPDATE_PROGRESS', - HIDE_PROGRESS: 'HIDE_PROGRESS', - - ZOOM_CHANGED : 'ZOOM_CHANGED', - EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED', - - CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED', - - PERFORMANCE_REPORT_CHANGED : 'PERFORMANCE_REPORT_CHANGED', - - PISKEL_FILE_IMPORT_FAILED : 'PISKEL_FILE_IMPORT_FAILED', - - // Tests - MOUSE_EVENT : 'MOUSE_EVENT', - KEYBOARD_EVENT : 'KEYBOARD_EVENT', - TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT', - TEST_RECORD_END : 'TEST_RECORD_END', - TEST_CASE_END : 'TEST_CASE_END', - TEST_SUITE_END : 'TEST_SUITE_END' -}; -;jQuery.namespace = function() { - var a = arguments; - var o = null; - for (var i = 0; i < a.length ; i++) { - var d = a[i].split('.'); - o = window; - for (var j = 0 ; j < d.length ; j++) { - o[d[j]] = o[d[j]] || {}; - o = o[d[j]]; - } - } - return o; -}; - -/** - * Need a polyfill for PhantomJS - */ -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var bindArgs = Array.prototype.slice.call(arguments, 1); - var fToBind = this; - var FNOP = function () {}; - var fBound = function () { - var args = bindArgs.concat(Array.prototype.slice.call(arguments)); - return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, args); - }; - - FNOP.prototype = this.prototype; - fBound.prototype = new FNOP(); - - return fBound; - }; -} - -/** - * Polyfill for typedarrays' fill method for PhantomJS - */ -if (!Uint32Array.prototype.fill) { - Uint32Array.prototype.fill = function (value, start, end) { - start = typeof start === 'undefined' ? 0 : start; - end = typeof end === 'undefined' ? this.length : end; - - if (start < 0) { - start = this.length + start; - } - - if (end < 0) { - end = this.length + end; - } - - for (var i = start; i < end; i++) { - this[i] = value; - } - }; -} - -/** - * @provide pskl.utils - * - * @require Constants - */ -(function() { // namespace: pskl.utils - - var ns = $.namespace('pskl.utils'); - - /** - * Convert a rgb(Number, Number, Number) color to hexadecimal representation - * @param {Number} r red value, between 0 and 255 - * @param {Number} g green value, between 0 and 255 - * @param {Number} b blue value, between 0 and 255 - * @return {String} hex representation of the color '#ABCDEF' - */ - ns.rgbToHex = function (r, g, b) { - return '#' + pskl.utils.componentToHex(r) + pskl.utils.componentToHex(g) + pskl.utils.componentToHex(b); - }; - - /** - * Convert a color component (as a Number between 0 and 255) to its string hexa representation - * @param {Number} c component value, between 0 and 255 - * @return {String} eg. '0A' - */ - ns.componentToHex = function (c) { - var hex = c.toString(16); - return hex.length == 1 ? '0' + hex : hex; - }; - - var intHexCache = {}; - ns.intToHex = function(int) { - if (intHexCache[int]) { - return intHexCache[int]; - } - - var hex = ns.rgbToHex(int & 0xff, int >> 8 & 0xff, int >> 16 & 0xff); - intHexCache[int] = hex; - return hex; - }; - - ns.normalize = function (value, def) { - if (typeof value === 'undefined' || value === null) { - return def; - } else { - return value; - } - }; - - ns.inherit = function(extendedObject, inheritFrom) { - extendedObject.prototype = Object.create(inheritFrom.prototype); - extendedObject.prototype.constructor = extendedObject; - extendedObject.prototype.superclass = inheritFrom.prototype; - }; - - ns.wrap = function (wrapper, wrappedObject) { - for (var prop in wrappedObject) { - if (typeof wrappedObject[prop] === 'function' && typeof wrapper[prop] === 'undefined') { - wrapper[prop] = wrappedObject[prop].bind(wrappedObject); - } - } - }; - - ns.hashCode = function(str) { - var hash = 0; - if (str.length === 0) { - return hash; - } - - for (var i = 0, len = str.length, chr; i < len; i++) { - chr = str.charCodeAt(i); - hash = hash * 31 + chr; - hash |= 0; // Convert to 32bit integer - } - - return hash; - }; - - ns.copy = function (object) { - return JSON.parse(JSON.stringify(object)); - }; - - var entityMap = { - '&' : '&', - '<' : '<', - '>' : '>', - '"' : '"', - '\'': ''', - '/' : '/' - }; - ns.escapeHtml = function (string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - }; - - var colorCache = {}; - var colorCacheReverse = {}; - ns.colorToInt = function (color) { - if (typeof color === 'number') { - return color; - } - - if (typeof colorCache[color] !== 'undefined') { - return colorCache[color]; - } - - var tc = window.tinycolor(color); - if (tc && tc.ok) { - var rgb = tc.toRgb(); - var a = Math.round(rgb.a * 255); - var intValue = (a << 24 >>> 0) + (rgb.b << 16) + (rgb.g << 8) + rgb.r; - if (a === 0) { - // assign all 'transparent' colors to 0, theoretically mapped to rgba(0,0,0,0) only - intValue = 0; - } - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return intValue; - } else { - // If tinycolor failed, determine color by using the browser - var d = document.createElement('div'); - d.style.color = color; - document.body.appendChild(d); - - // Color in RGB - color = window.getComputedStyle(d).color; - document.body.removeChild(d); - - return pskl.utils.colorToInt(color); - } - }; - - ns.intToColor = function(intValue) { - if (typeof intValue === 'string') { - return intValue; - } - - if (typeof colorCacheReverse[intValue] !== 'undefined') { - return colorCacheReverse[intValue]; - } - - var r = intValue & 0xff; - var g = intValue >> 8 & 0xff; - var b = intValue >> 16 & 0xff; - var a = (intValue >> 24 >>> 0 & 0xff) / 255; - var color = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - colorCache[color] = intValue; - colorCacheReverse[intValue] = color; - return color; - }; - - var reEntityMap = {}; - ns.unescapeHtml = function (string) { - Object.keys(entityMap).forEach(function(key) { - reEntityMap[key] = reEntityMap[key] || new RegExp(entityMap[key], 'g'); - string = string.replace(reEntityMap[key], key); - }); - return string; - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var ua = navigator.userAgent; - - var hasChrome = - - ns.UserAgent = { - isIE : /MSIE/i.test(ua), - isIE11 : /trident/i.test(ua), - isEdge : /edge\//i.test(ua), - isFirefox : /Firefox/i.test(ua), - isMac : /Mac/.test(ua), - isOpera : /OPR\//.test(ua), - // Shared user agent strings, sadly found in many useragent strings - hasChrome : /Chrome/i.test(ua), - hasSafari : /Safari\//.test(ua), - }; - - ns.UserAgent.isChrome = ns.UserAgent.hasChrome && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - ns.UserAgent.isSafari = ns.UserAgent.hasSafari && !ns.UserAgent.isOpera && !ns.UserAgent.isEdge; - - ns.UserAgent.supportedUserAgents = [ - 'isIE11', - 'isEdge', - 'isChrome', - 'isFirefox' - ]; - - ns.UserAgent.version = (function () { - if (pskl.utils.UserAgent.isIE) { - return parseInt(/MSIE\s?(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isChrome) { - return parseInt(/Chrome\/(\d+)/i.exec(ua)[1], 10); - } else if (pskl.utils.UserAgent.isFirefox) { - return parseInt(/Firefox\/(\d+)/i.exec(ua)[1], 10); - } - })(); - - ns.UserAgent.isUnsupported = function () { - // Check that none of the supported UAs are set to true. - return ns.UserAgent.supportedUserAgents.every(function (uaTest) { - return !ns.UserAgent[uaTest]; - }); - }; - - ns.UserAgent.getDisplayName = function () { - if (ns.UserAgent.isIE) { - return 'Internet Explorer'; - } else if (ns.UserAgent.isChrome) { - return 'Chrome'; - } else if (ns.UserAgent.isFirefox) { - return 'Firefox'; - } else if (ns.UserAgent.isSafari) { - return 'Safari'; - } else if (ns.UserAgent.isOpera) { - return 'Opera'; - } else { - return ua; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Array = { - find : function (array, filterFn) { - var match = null; - array = Array.isArray(array) ? array : []; - var filtered = array.filter(filterFn); - if (filtered.length) { - match = filtered[0]; - } - return match; - }, - - /** - * Split a provided array in a given amount of chunks. - * For instance [1,2,3,4] chunked in 2 parts will be [1,2] & [3,4]. - * @param {Array} array the array to chunk - * @param {Number} chunksCount the number of chunks to create - * @return {Array} array of arrays containing the items of the original array - */ - chunk : function (array, chunksCount) { - var chunks = []; - - // We cannot have more chunks than array items. - chunksCount = Math.min(chunksCount, array.length); - - // chunksCount should be at least 1 - chunksCount = Math.max(1, chunksCount); - - var step = Math.round(array.length / chunksCount); - for (var i = 0 ; i < chunksCount ; i++) { - var isLast = i == chunksCount - 1; - var end = isLast ? array.length : (i + 1) * step; - chunks.push(array.slice(i * step, end)); - } - return chunks; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var base64Ranks; - if (Uint8Array) { - base64Ranks = new Uint8Array([ - 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, - -1, -1, 0, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 - ]); - } - - ns.Base64 = { - toText : function (base64) { - return window.atob(base64.replace(/data\:.*?\;base64\,/, '')); - }, - - decode : function(base64) { - var outptr = 0; - var last = [0, 0]; - var state = 0; - var save = 0; - - var undef; - var len = base64.length; - var i = 0; - var buffer = new Uint8Array(len / 4 * 3 | 0); - while (len--) { - var code = base64.charCodeAt(i++); - var rank = base64Ranks[code - 43]; - if (rank !== 255 && rank !== undef) { - last[1] = last[0]; - last[0] = code; - save = (save << 6) | rank; - state++; - if (state === 4) { - buffer[outptr++] = save >>> 16; - if (last[1] !== 61 /* padding character */) { - buffer[outptr++] = save >>> 8; - } - if (last[0] !== 61 /* padding character */) { - buffer[outptr++] = save; - } - state = 0; - } - } - } - // 2/3 chance there's going to be some null bytes at the end, but that - // doesn't really matter with most image formats. - // If it somehow matters for you, truncate the buffer up outptr. - return buffer.buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var BASE64_REGEX = /\s*;\s*base64\s*(?:;|$)/i; - - ns.BlobUtils = { - dataToBlob : function(dataURI, type, callback) { - var headerEnd = dataURI.indexOf(','); - var data = dataURI.substring(headerEnd + 1); - var isBase64 = BASE64_REGEX.test(dataURI.substring(0, headerEnd)); - var blob; - - if (Blob.fake) { - // no reason to decode a data: URI that's just going to become a data URI again - blob = new Blob(); - blob.encoding = isBase64 ? 'base64' : 'URI'; - blob.data = data; - blob.size = data.length; - } else if (Uint8Array) { - var blobData = isBase64 ? pskl.utils.Base64.decode(data) : decodeURIComponent(data); - blob = new Blob([blobData], {type: type}); - } - callback(blob); - }, - - canvasToBlob : function (canvas, callback, type /*, ...args*/) { - type = type || 'image/png'; - - if (canvas.mozGetAsFile) { - callback(canvas.mozGetAsFile('canvas', type)); - } else { - var args = Array.prototype.slice.call(arguments, 2); - var dataURI = canvas.toDataURL.apply(canvas, args); - pskl.utils.BlobUtils.dataToBlob(dataURI, type, callback); - } - }, - - stringToBlob : function (string, callback, type) { - type = type || 'text/plain'; - pskl.utils.BlobUtils.dataToBlob('data:' + type + ',' + string, type, callback); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.CanvasUtils = { - createCanvas : function (width, height, classList) { - var canvas = document.createElement('canvas'); - canvas.setAttribute('width', width); - canvas.setAttribute('height', height); - - if (typeof classList == 'string') { - classList = [classList]; - } - if (Array.isArray(classList)) { - for (var i = 0 ; i < classList.length ; i++) { - canvas.classList.add(classList[i]); - } - } - - return canvas; - }, - - createFromImageData : function (imageData) { - var canvas = pskl.utils.CanvasUtils.createCanvas(imageData.width, imageData.height); - var context = canvas.getContext('2d'); - context.putImageData(imageData, 0, 0); - return canvas; - }, - - createFromImage : function (image) { - var canvas = pskl.utils.CanvasUtils.createCanvas(image.width, image.height); - var context = canvas.getContext('2d'); - context.drawImage(image, 0, 0); - return canvas; - }, - - /** - * Splits the specified image into several new canvas elements based on the - * supplied offset and frame sizes - * @param image The source image that will be split - * @param {Number} offsetX The padding from the left side of the source image - * @param {Number} offsetY The padding from the top side of the source image - * @param {Number} width The width of an individual frame - * @param {Number} height The height of an individual frame - * @param {Boolean} useHorizonalStrips True if the frames should be layed out from left to - * right, False if it should use top to bottom - * @param {Boolean} ignoreEmptyFrames True to ignore empty frames, false to keep them - * @returns {Array} An array of canvas elements that contain the split frames - */ - createFramesFromImage : function (image, offsetX, offsetY, width, height, useHorizonalStrips, ignoreEmptyFrames) { - var canvasArray = []; - var x = offsetX; - var y = offsetY; - var blankData = pskl.utils.CanvasUtils.createCanvas(width, height).toDataURL(); - - while (x + width <= image.width && y + height <= image.height) { - // Create a new canvas element - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - var context = canvas.getContext('2d'); - - // Blit the correct part of the source image into the new canvas - context.drawImage( - image, - x, - y, - width, - height, - 0, - 0, - width, - height); - - if (!ignoreEmptyFrames || canvas.toDataURL() !== blankData) { - canvasArray.push(canvas); - } - - if (useHorizonalStrips) { - // Move from left to right - x += width; - if (x + width > image.width) { - x = offsetX; - y += height; - } - } else { - // Move from top to bottom - y += height; - if (y + height > image.height) { - x += width; - y = offsetY; - } - } - } - - return canvasArray; - }, - - /** - * By default, all scaling operations on a Canvas 2D Context are performed using antialiasing. - * Resizing a 32x32 image to 320x320 will lead to a blurry output. - * On Chrome, FF and IE>=11, this can be disabled by setting a property on the Canvas 2D Context. - * In this case the browser will use a nearest-neighbor scaling. - * @param {Canvas} canvas - */ - disableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, false); - }, - - enableImageSmoothing : function (canvas) { - pskl.utils.CanvasUtils.setImageSmoothing(canvas, true); - }, - - setImageSmoothing : function (canvas, smoothing) { - var context = canvas.getContext('2d'); - context.imageSmoothingEnabled = smoothing; - context.mozImageSmoothingEnabled = smoothing; - context.oImageSmoothingEnabled = smoothing; - context.webkitImageSmoothingEnabled = smoothing; - context.msImageSmoothingEnabled = smoothing; - }, - - clear : function (canvas) { - if (canvas) { - canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); - } - }, - - clone : function (canvas) { - var clone = pskl.utils.CanvasUtils.createCanvas(canvas.width, canvas.height); - - //apply the old canvas to the new one - clone.getContext('2d').drawImage(canvas, 0, 0); - - //return the new canvas - return clone; - }, - - getImageDataFromCanvas : function (canvas) { - var sourceContext = canvas.getContext('2d'); - return sourceContext.getImageData(0, 0, canvas.width, canvas.height).data; - }, - - getBase64FromCanvas : function (canvas, format) { - format = format || 'png'; - var data = canvas.toDataURL('image/' + format); - return data.substr(data.indexOf(',') + 1); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ColorUtils = { - getUnusedColor : function (usedColors) { - usedColors = usedColors || []; - // create check map - var colorMap = {}; - usedColors.forEach(function (color) { - colorMap[color.toUpperCase()] = true; - }); - - // start with white - var color = { - r : 255, - g : 255, - b : 0 - }; - var match = null; - while (true) { - var hex = window.tinycolor(color).toHexString().toUpperCase(); - - if (!colorMap[hex]) { - match = hex; - break; - } else { - // pick a non null component to decrease its value - var component = (color.r && 'r') || (color.g && 'g') || (color.b && 'b'); - if (component) { - color[component] = color[component] - 1; - } else { - // no component available, no match found - break; - } - } - } - - return match; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var pad = function (num) { - if (num < 10) { - return '0' + num; - } else { - return '' + num; - } - }; - - ns.DateUtils = { - format : function (date, format) { - date = new Date(date); - return pskl.utils.Template.replace(format, { - Y : date.getFullYear(), - M : pad(date.getMonth() + 1), - D : pad(date.getDate()), - H : pad(date.getHours()), - m : pad(date.getMinutes()), - s : pad(date.getSeconds()) - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Dom = { - /** - * Check if a given HTML element is nested inside another - * @param {HTMLElement} node Element to test - * @param {HTMLElement} parent Potential Ancestor for node - * @param {Boolean} excludeParent set to true if the parent should be excluded from potential matches - * @return {Boolean} true if parent was found amongst the parentNode chain of node - */ - isParent : function (node, parent, excludeParent) { - if (node && parent) { - - if (excludeParent) { - node = node.parentNode; - } - - while (node) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - } - return false; - }, - - getParentWithData : function (node, dataName) { - while (node) { - if (node.dataset && typeof node.dataset[dataName] !== 'undefined') { - return node; - } - node = node.parentNode; - } - return null; - }, - - getData : function (node, dataName) { - var parent = ns.Dom.getParentWithData(node, dataName); - if (parent !== null) { - return parent.dataset[dataName]; - } - }, - - removeClass : function (className, container) { - container = container || document; - var elements = container.querySelectorAll('.' + className); - for (var i = 0 ; i < elements.length ; i++) { - elements[i].classList.remove(className); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Event = {}; - - ns.Event.addEventListener = function (el, type, callback, scope, args) { - if (typeof el === 'string') { - el = document.querySelector(el); - } - - var listener = { - el : el, - type : type, - callback : callback, - handler : args ? callback.bind(scope, args) : callback.bind(scope) - }; - - scope.__pskl_listeners = scope.__pskl_listeners || []; - scope.__pskl_listeners.push(listener); - el.addEventListener(type, listener.handler); - }; - - ns.Event.removeEventListener = function (el, type, callback, scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - if (listener.callback === callback && listener.el === el && listener.type === type) { - el.removeEventListener(type, listeners[i].handler); - listeners.splice(i, 1); - break; - } - } - } - }; - - ns.Event.removeAllEventListeners = function (scope) { - if (scope && scope.__pskl_listeners) { - var listeners = scope.__pskl_listeners; - for (var i = 0 ; i < listeners.length ; i++) { - var listener = listeners[i]; - listener.el.removeEventListener(listener.type, listener.handler); - } - scope.__pskl_listeners = []; - } - }; -})(); -;/** - * detection method from: - * http://videlais.com/2014/08/23/lessons-learned-from-detecting-node-webkit/ - */ - -(function () { - - var ns = $.namespace('pskl.utils'); - - ns.Environment = { - detectNodeWebkit : function () { - var isNode = (typeof window.process !== 'undefined' && typeof window.require !== 'undefined'); - var isNodeWebkit = false; - if (isNode) { - try { - isNodeWebkit = (typeof window.require('nw.gui') !== 'undefined'); - } catch (e) { - isNodeWebkit = false; - } - } - return isNodeWebkit; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.FunctionUtils = { - /** - * Returns a memoized version of the provided function. - */ - memo : function (fn, cache, scope) { - var memoized = function () { - var key = Array.prototype.join.call(arguments, '-'); - if (!cache[key]) { - cache[key] = fn.apply(scope, arguments); - } - return cache[key]; - }; - return memoized; - }, - - /** - * Returns a throttled version of the provided method, that will be called at most - * every X milliseconds, where X is the provided interval. - */ - throttle : function (fn, interval) { - var last, timer; - return function () { - var now = Date.now(); - if (last && now < last + interval) { - clearTimeout(timer); - timer = setTimeout(function () { - last = now; - fn(); - }, interval); - } else { - last = now; - fn(); - } - }; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.Math = { - minmax : function (val, min, max) { - return Math.max(Math.min(val, max), min); - }, - - /** - * Calculate the distance between {x0, y0} and {x1, y1} - */ - distance : function (x0, x1, y0, y1) { - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var stopPropagation = function (e) { - e.stopPropagation(); - }; - - ns.FileUtils = { - readFile : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsDataURL(file); - }, - - readFileAsArrayBuffer : function (file, callback) { - var reader = new FileReader(); - reader.addEventListener('loadend', function() { - callback(reader.result); - }); - reader.readAsArrayBuffer(file); - }, - - readImageFile : function (file, callback) { - ns.FileUtils.readFile(file, function (content) { - var image = new Image(); - image.onload = callback.bind(null, image); - image.src = content; - }); - }, - - downloadAsFile : function (content, filename) { - var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator)); - if (saveAs) { - saveAs(content, filename); - } else { - var downloadLink = document.createElement('a'); - content = window.URL.createObjectURL(content); - downloadLink.setAttribute('href', content); - downloadLink.setAttribute('download', filename); - document.body.appendChild(downloadLink); - downloadLink.addEventListener('click', stopPropagation); - downloadLink.click(); - downloadLink.removeEventListener('click', stopPropagation); - document.body.removeChild(downloadLink); - } - } - - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var getFileInputElement = function (nwsaveas, accept) { - var fileInputElement = document.createElement('INPUT'); - fileInputElement.setAttribute('type', 'file'); - fileInputElement.setAttribute('nwworkingdir', ''); - if (nwsaveas) { - fileInputElement.setAttribute('nwsaveas', nwsaveas); - } - if (accept) { - fileInputElement.setAttribute('accept', accept); - } - - return fileInputElement; - }; - - ns.FileUtilsDesktop = { - chooseFilenameDialog : function (nwsaveas, accept) { - var deferred = Q.defer(); - var fileInputElement = getFileInputElement(nwsaveas, accept); - var changeListener = function (evt) { - fileInputElement.removeEventListener('change', changeListener); - document.removeEventListener('click', changeListener); - deferred.resolve(fileInputElement.value); - }; - - // fix for issue #322 : - window.setTimeout(function () { - fileInputElement.click(); - fileInputElement.addEventListener('change', changeListener); - // there is no way to detect a cancelled fileInput popup - // as a crappy workaround we add a click listener on the document - // on top the change event listener - // todo : listen to dirty check instead - document.addEventListener('mousedown', changeListener); - }, 50); - - return deferred.promise; - }, - - /** - * Save data directly to disk, without showing a save dialog - * Requires Node-Webkit environment for file system access - * @param content - data to be saved - * @param {string} filename - fill path to the file - * @callback callback - */ - saveToFile : function(content, filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - fs.writeFile(filename, content, function (err) { - if (err) { - deferred.reject('FileUtilsDesktop::savetoFile() - error saving file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(); - } - }); - - return deferred.promise; - }, - - readFile : function(filename) { - var deferred = Q.defer(); - var fs = window.require('fs'); - // NOTE: currently loading everything as utf8, which may not be desirable in future - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - deferred.reject('FileUtilsDesktop::readFile() - error reading file: ' + filename + ' Error: ' + err); - } else { - deferred.resolve(data); - } - }); - return deferred.promise; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var colorCache = {}; - var offCanvasPool = {}; - var imageDataPool = {}; - ns.FrameUtils = { - /** - * Render a Frame object as an image. - * Can optionally scale it (zoom) - * @param frame {Frame} frame - * @param zoom {Number} zoom - * @return {Image} - */ - toImage : function (frame, zoom, opacity) { - zoom = zoom || 1; - opacity = isNaN(opacity) ? 1 : opacity; - - var canvasRenderer = new pskl.rendering.CanvasRenderer(frame, zoom); - canvasRenderer.drawTransparentAs(Constants.TRANSPARENT_COLOR); - canvasRenderer.setOpacity(opacity); - return canvasRenderer.render(); - }, - - /** - * Draw the provided frame in a 2d canvas - * - * @param {Frame|RenderedFrame} frame the frame to draw - * @param {Canvas} canvas the canvas target - * @param {String} transparentColor (optional) color to use to represent transparent pixels. - * @param {String} globalAlpha (optional) global frame opacity - */ - drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) { - var context = canvas.getContext('2d'); - globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha; - context.globalAlpha = globalAlpha; - transparentColor = transparentColor || Constants.TRANSPARENT_COLOR; - - if (frame instanceof pskl.model.frame.RenderedFrame) { - context.fillRect(transparentColor, 0, 0, frame.getWidth(), frame.getHeight()); - context.drawImage(frame.getRenderedFrame(), 0, 0); - } else { - var w = frame.getWidth(); - var h = frame.getHeight(); - var pixels = frame.pixels; - - // Replace transparent color - var constantTransparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - var transparentColorInt = pskl.utils.colorToInt(transparentColor); - if (transparentColorInt != constantTransparentColorInt) { - pixels = frame.getPixels(); - for (var i = 0, length = pixels.length; i < length; i++) { - if (pixels[i] == constantTransparentColorInt) { - pixels[i] = transparentColorInt; - } - } - } - - // Imagedata from cache - var imageDataKey = w + '-' + h; - var imageData; - if (!imageDataPool[imageDataKey]) { - imageData = imageDataPool[imageDataKey] = context.createImageData(w, h); - } else { - imageData = imageDataPool[imageDataKey]; - } - - // Convert to uint8 and set the data - var data = new Uint8ClampedArray(pixels.buffer); - var imgDataData = imageData.data; - imgDataData.set(data); - - // Offcanvas from cache - var offCanvasKey = w + '-' + h; - var offCanvas; - if (!offCanvasPool[offCanvasKey]) { - offCanvas = offCanvasPool[offCanvasKey] = pskl.utils.CanvasUtils.createCanvas(w, h); - offCanvas.context = offCanvas.getContext('2d'); - } else { - offCanvas = offCanvasPool[offCanvasKey]; - } - - // Put pixel data to offcanvas and draw the offcanvas onto the canvas - offCanvas.context.putImageData(imageData, 0, 0); - context.drawImage(offCanvas, 0, 0, w, h); - context.globalAlpha = 1; - } - }, - - /** - * Render a line of a single color in a given canvas 2D context. - * - * @param color {String} color to draw - * @param x {Number} x coordinate - * @param y {Number} y coordinate - * @param width {Number} width of the line to draw, in pixels - * @param context {CanvasRenderingContext2D} context of the canvas target - */ - renderLine_ : function (color, x, y, width, context) { - if (color === Constants.TRANSPARENT_COLOR || color === null) { - return; - } - context.fillStyle = color; - context.fillRect(x, y, 1, width); - }, - - merge : function (frames) { - var merged = null; - if (frames.length) { - merged = frames[0].clone(); - for (var i = 1 ; i < frames.length ; i++) { - pskl.utils.FrameUtils.mergeFrames_(merged, frames[i]); - } - } - return merged; - }, - - mergeFrames_ : function (frameA, frameB) { - var transparentColorInt = pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR); - for (var i = 0, length = frameA.getWidth() * frameA.getHeight(); i < length; ++i) { - if (frameB.pixels[i] != transparentColorInt && frameA.pixels[i] != frameB.pixels[i]) { - frameA.pixels[i] = frameB.pixels[i]; - } - } - }, - - /** - * Insert the provided image in the provided frame, at the x, y sprite coordinates. - * Coordinates will be adjusted so that the image fits in the frame, if possible. - */ - addImageToFrame: function (frame, image, x, y) { - var imageFrame = pskl.utils.FrameUtils.createFromImage(image); - x = x - Math.floor(imageFrame.width / 2); - y = y - Math.floor(imageFrame.height / 2); - - x = Math.max(0, x); - y = Math.max(0, y); - - if (imageFrame.width <= frame.width) { - x = Math.min(x, frame.width - imageFrame.width); - } - - if (imageFrame.height <= frame.height) { - y = Math.min(y, frame.height - imageFrame.height); - } - - imageFrame.forEachPixel(function (color, frameX, frameY) { - if (color != pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)) { - frame.setPixel(x + frameX, y + frameY, color); - } - }); - }, - - resize : function (frame, targetWidth, targetHeight, smoothing) { - var image = pskl.utils.FrameUtils.toImage(frame); - var resizedImage = pskl.utils.ImageResizer.resize(image, targetWidth, targetHeight, smoothing); - return pskl.utils.FrameUtils.createFromImage(resizedImage); - }, - - removeTransparency : function (frame) { - frame.forEachPixel(function (color, x, y) { - var alpha = color >> 24 >>> 0 & 0xff; - if (alpha && alpha !== 255) { - var rounded = Math.round(alpha / 255) * 255; - var roundedColor = color - (alpha << 24 >>> 0) + (rounded << 24 >>> 0); - frame.setPixel(x, y, roundedColor); - } - }); - }, - - createFromCanvas : function (canvas, x, y, w, h, preserveOpacity) { - var imgData = canvas.getContext('2d').getImageData(x, y, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageSrc : function (src, preserveOpacity, cb) { - var image = new Image(); - image.addEventListener('load', function onImageLoaded() { - image.removeEventListener('load', onImageLoaded); - var frame = ns.FrameUtils.createFromImage(image, preserveOpacity); - cb(frame); - }); - image.src = src; - }, - - /* - * Create a pskl.model.Frame from an Image object. By default transparent - * pixels will be converted to completely opaque or completely transparent - * pixels. If preserveOpacity is true the actual opacity of the pixel will - * be used and the generated frame will contain rgba pixels. - * - * @param {Image} image source image - * @param {boolean} preserveOpacity set to true to preserve the opacity - * @return {pskl.model.Frame} corresponding frame - */ - createFromImage : function (image, preserveOpacity) { - var w = image.width; - var h = image.height; - var canvas = pskl.utils.CanvasUtils.createCanvas(w, h); - var context = canvas.getContext('2d'); - - context.drawImage(image, 0, 0, w, h, 0, 0, w, h); - var imgData = context.getImageData(0, 0, w, h).data; - return pskl.utils.FrameUtils.createFromImageData_(imgData, w, h, preserveOpacity); - }, - - createFromImageData_ : function (imageData, width, height, preserveOpacity) { - var frame = new pskl.model.Frame(width, height); - frame.pixels = new Uint32Array(imageData.buffer); - if (!preserveOpacity) { - pskl.utils.FrameUtils.removeTransparency(frame); - } - - return frame; - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Number} frameCount number of frames in the spritesheet - * @return {Array} - */ - createFramesFromSpritesheet : function (image, frameCount) { - var layout = []; - for (var i = 0 ; i < frameCount ; i++) { - layout.push([i]); - } - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, layout); - return chunkFrames.map(function (chunkFrame) { - return chunkFrame.frame; - }); - }, - - /** - * Create a Frame array from an Image object. - * Transparent pixels will either be converted to completely opaque or completely transparent pixels. - * - * @param {Image} image source image - * @param {Array } layout description of the frame indexes expected to be found in the chunk - * @return {Array} array of objects containing: {index: frame index, frame: frame instance} - */ - createFramesFromChunk : function (image, layout) { - var width = image.width; - var height = image.height; - - // Recalculate the expected frame dimensions from the layout information - var frameWidth = width / layout.length; - var frameHeight = height / layout[0].length; - - // Create a canvas adapted to the image size - var canvas = pskl.utils.CanvasUtils.createCanvas(frameWidth, frameHeight); - var context = canvas.getContext('2d'); - - // Draw the zoomed-up pixels to a different canvas context - var chunkFrames = []; - for (var i = 0 ; i < layout.length ; i++) { - var row = layout[i]; - for (var j = 0 ; j < row.length ; j++) { - context.clearRect(0, 0 , frameWidth, frameHeight); - context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); - var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); - chunkFrames.push({ - index : layout[i][j], - frame : frame - }); - } - } - - return chunkFrames; - }, - - toFrameGrid : function (normalGrid) { - var frameGrid = []; - var w = normalGrid[0].length; - var h = normalGrid.length; - for (var x = 0 ; x < w ; x++) { - frameGrid[x] = []; - for (var y = 0 ; y < h ; y++) { - frameGrid[x][y] = normalGrid[y][x]; - } - } - return frameGrid; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.ImageResizer = { - scale : function (image, factor, smoothingEnabled) { - return ns.ImageResizer.resize(image, image.width * factor, image.height * factor, smoothingEnabled); - }, - - resize : function (image, targetWidth, targetHeight, smoothingEnabled) { - var canvas = pskl.utils.CanvasUtils.createCanvas(targetWidth, targetHeight); - var context = canvas.getContext('2d'); - context.save(); - - if (!smoothingEnabled) { - pskl.utils.CanvasUtils.disableImageSmoothing(canvas); - } - - context.translate(canvas.width / 2, canvas.height / 2); - context.scale(targetWidth / image.width, targetHeight / image.height); - context.drawImage(image, -image.width / 2, -image.height / 2); - context.restore(); - - return canvas; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.LayerUtils = { - mergeLayers : function (layerA, layerB) { - var framesA = layerA.getFrames(); - var framesB = layerB.getFrames(); - var mergedFrames = []; - framesA.forEach(function (frame, index) { - var otherFrame = framesB[index]; - mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); - }); - var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); - return mergedLayer; - }, - - getFrameHashAt : function (layers, index) { - var hashBuffer = []; - layers.forEach(function (l) { - var frame = l.getFrameAt(index); - hashBuffer.push(frame.getHash()); - hashBuffer.push(l.getOpacity()); - return frame; - }); - return hashBuffer.join('-'); - }, - - /** - * Create a frame instance merging all the frames from the layers array at - * the provided index. - * - * @param {Array} layers array of layers to use - * @param {Number} index frame index to merge - * @return {Frame} Frame instance (can be a fake frame when using - * transparency) - */ - mergeFrameAt : function (layers, index) { - var isTransparent = layers.some(function (l) {return l.isTransparent();}); - if (isTransparent) { - return pskl.utils.LayerUtils.mergeTransparentFrameAt_(layers, index); - } else { - return pskl.utils.LayerUtils.mergeOpaqueFrameAt_(layers, index); - } - }, - - mergeTransparentFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var width = layers[0].frames[0].getWidth(); - var height = layers[0].frames[0].getHeight(); - var renderFn = function () {return pskl.utils.LayerUtils.flattenFrameAt(layers, index, true);}; - return new pskl.model.frame.RenderedFrame(renderFn, width, height, hash); - }, - - mergeOpaqueFrameAt_ : function (layers, index) { - var hash = pskl.utils.LayerUtils.getFrameHashAt(layers, index); - var frames = layers.map(function(l) {return l.getFrameAt(index);}); - var mergedFrame = pskl.utils.FrameUtils.merge(frames); - mergedFrame.id = hash; - mergedFrame.version = 0; - return mergedFrame; - }, - - renderFrameAt : function (layer, index, preserveOpacity) { - var opacity = preserveOpacity ? layer.getOpacity() : 1; - var frame = layer.getFrameAt(index); - return pskl.utils.FrameUtils.toImage(frame, 1, opacity); - }, - - flattenFrameAt : function (layers, index, preserveOpacity) { - var width = layers[0].getFrameAt(index).getWidth(); - var height = layers[0].getFrameAt(index).getHeight(); - var canvas = pskl.utils.CanvasUtils.createCanvas(width, height); - - var context = canvas.getContext('2d'); - layers.forEach(function (l) { - var render = ns.LayerUtils.renderFrameAt(l, index, preserveOpacity); - context.drawImage(render, 0, 0, width, height, 0, 0, width, height); - }); - - return canvas; - } - }; - -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.PixelUtils = { - - getRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - - for (var x = rectangle.x0 ; x <= rectangle.x1 ; x++) { - for (var y = rectangle.y0 ; y <= rectangle.y1 ; y++) { - pixels.push({'col': x, 'row': y}); - } - } - - return pixels; - }, - - /** - * Return an object of ordered rectangle coordinate. - * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner - * @private - */ - getOrderedRectangleCoordinates : function (x0, y0, x1, y1) { - return { - x0 : Math.min(x0, x1), - y0 : Math.min(y0, y1), - x1 : Math.max(x0, x1), - y1 : Math.max(y0, y1) - }; - }, - - /** - * Return the list of pixels that would have been filled by a paintbucket tool applied - * on pixel at coordinate (x,y). - * This function is not altering the Frame object argument. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * - * @return an array of the pixel coordinates paint with the replacement color - */ - getSimilarConnectedPixelsFromFrame: function(frame, col, row) { - var targetColor = frame.getPixel(col, row); - if (targetColor === null) { - return []; - } - - var startPixel = { - col : col, - row : row - }; - - var visited = {}; - return pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - var key = pixel.col + '-' + pixel.row; - if (visited[key]) { - return false; - } - visited[key] = true; - return frame.getPixel(pixel.col, pixel.row) == targetColor; - }); - }, - - /** - * Resize the pixel at {col, row} for the provided size. Will return the array of pixels centered - * around the original pixel, forming a pixel square of side=size - * - * @param {Number} row x-coordinate of the original pixel - * @param {Number} col y-coordinate of the original pixel - * @param {Number} size >= 1 && <= 32 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixel : function (col, row, size) { - var pixels = []; - - for (var j = 0; j < size; j++) { - for (var i = 0; i < size; i++) { - pixels.push([col - Math.floor(size / 2) + i, row - Math.floor(size / 2) + j]); - } - } - - return pixels; - }, - - /** - * Shortcut to reduce the output of pskl.PixelUtils.resizePixel for several pixels - * @param {Array} pixels Array of pixels (objects {col:Number, row:Number}) - * @param {Number} >= 1 && <= 4 - * @return {Array} array of arrays of 2 Numbers (eg. [[0,0], [0,1], [1,0], [1,1]]) - */ - resizePixels : function (pixels, size) { - return pixels.reduce(function (p, pixel) { - return p.concat(pskl.PixelUtils.resizePixel(pixel.col, pixel.row, size)); - }, []); - }, - - /** - * Apply the paintbucket tool in a frame at the (col, row) initial position - * with the replacement color. - * - * @param frame pskl.model.Frame The frame target in which we want to paintbucket - * @param col number Column coordinate in the frame - * @param row number Row coordinate in the frame - * @param replacementColor string Hexadecimal color used to fill the area - * - * @return an array of the pixel coordinates paint with the replacement color - */ - paintSimilarConnectedPixelsFromFrame: function(frame, col, row, replacementColor) { - /** - * Queue linear Flood-fill (node, target-color, replacement-color): - * 1. Set Q to the empty queue. - * 2. If the color of node is not equal to target-color, return. - * 3. Add node to Q. - * 4. For each element n of Q: - * 5. If the color of n is equal to target-color: - * 6. Set w and e equal to n. - * 7. Move w to the west until the color of the node to the west of w no longer matches target-color. - * 8. Move e to the east until the color of the node to the east of e no longer matches target-color. - * 9. Set the color of nodes between w and e to replacement-color. - * 10. For each node n between w and e: - * 11. If the color of the node to the north of n is target-color, add that node to Q. - * 12. If the color of the node to the south of n is target-color, add that node to Q. - * 13. Continue looping until Q is exhausted. - * 14. Return. - */ - if (typeof replacementColor == 'string') { - replacementColor = pskl.utils.colorToInt(replacementColor); - } - - var targetColor; - try { - targetColor = frame.getPixel(col, row); - } catch (e) { - // Frame out of bound exception. - } - - if (targetColor === null || targetColor == replacementColor) { - return; - } - - var startPixel = { - col : col, - row : row - }; - var paintedPixels = pskl.PixelUtils.visitConnectedPixels(startPixel, frame, function (pixel) { - if (frame.getPixel(pixel.col, pixel.row) == targetColor) { - frame.setPixel(pixel.col, pixel.row, replacementColor); - return true; - } - return false; - }); - return paintedPixels; - }, - - /** - * Starting from a provided origin, visit connected pixels using a visitor function. - * After visiting a pixel, select the 4 connected pixels (up, right, down, left). - * Call the provided visitor on each pixel. The visitor should return true if the - * pixel should be considered as connected. If the pixel is connected repeat the - * process with its own connected pixels - * - * TODO : Julian : The visitor is also responsible for making sure a pixel is never - * visited twice. This could be handled by default by this method. - * - * @return {Array} the array of visited pixels {col, row} - */ - visitConnectedPixels : function (pixel, frame, pixelVisitor) { - var col = pixel.col; - var row = pixel.row; - - var queue = []; - var visitedPixels = []; - var dy = [-1, 0, 1, 0]; - var dx = [0, 1, 0, -1]; - - queue.push(pixel); - visitedPixels.push(pixel); - pixelVisitor(pixel); - - var loopCount = 0; - var cellCount = frame.getWidth() * frame.getHeight(); - while (queue.length > 0) { - loopCount ++; - - var currentItem = queue.pop(); - - for (var i = 0; i < 4; i++) { - var nextCol = currentItem.col + dx[i]; - var nextRow = currentItem.row + dy[i]; - try { - var connectedPixel = {'col': nextCol, 'row': nextRow}; - var isValid = pixelVisitor(connectedPixel); - if (isValid) { - queue.push(connectedPixel); - visitedPixels.push(connectedPixel); - } - } catch (e) { - // Frame out of bound exception. - } - } - - // Security loop breaker: - if (loopCount > 10 * cellCount) { - console.log('loop breaker called'); - break; - } - } - - return visitedPixels; - }, - - /** - * Calculate and return the maximal zoom level to display a picture in a given container. - * - * @param container jQueryObject Container where the picture should be displayed - * @param number pictureHeight height in pixels of the picture to display - * @param number pictureWidth width in pixels of the picture to display - * @return number maximal zoom - */ - calculateZoomForContainer : function (container, pictureHeight, pictureWidth) { - return this.calculateZoom(container.height(), container.width(), pictureHeight, pictureWidth); - }, - - /** - * Bresenham line algorithm: Get an array of pixels from - * start and end coordinates. - * - * http://en.wikipedia.org/wiki/Bresenham's_line_algorithm - * http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript - */ - getLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0); - var dy = Math.abs(y1 - y0); - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var err = dx - dy; - while (true) { - // Do what you need to for this - pixels.push({'col': x0, 'row': y0}); - - if ((x0 == x1) && (y0 == y1)) { - break; - } - - var e2 = 2 * err; - if (e2 > -dy) { - err -= dy; - x0 += sx; - } - if (e2 < dx) { - err += dx; - y0 += sy; - } - } - - return pixels; - }, - - /** - * Create a uniform line using the same number of pixel at each step, between the provided - * origin and target coordinates. - */ - getUniformLinePixels : function (x0, x1, y0, y1) { - var pixels = []; - - x1 = pskl.utils.normalize(x1, 0); - y1 = pskl.utils.normalize(y1, 0); - - var dx = Math.abs(x1 - x0) + 1; - var dy = Math.abs(y1 - y0) + 1; - - var sx = (x0 < x1) ? 1 : -1; - var sy = (y0 < y1) ? 1 : -1; - - var ratio = Math.max(dx, dy) / Math.min(dx, dy); - // in pixel art, lines should use uniform number of pixels for each step - var pixelStep = Math.round(ratio) || 0; - - if (pixelStep > Math.min(dx, dy)) { - pixelStep = Infinity; - } - - var maxDistance = pskl.utils.Math.distance(x0, x1, y0, y1); - - var x = x0; - var y = y0; - var i = 0; - while (true) { - i++; - - pixels.push({'col': x, 'row': y}); - if (pskl.utils.Math.distance(x0, x, y0, y) >= maxDistance) { - break; - } - - var isAtStep = i % pixelStep === 0; - if (dx >= dy || isAtStep) { - x += sx; - } - if (dy >= dx || isAtStep) { - y += sy; - } - } - - return pixels; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.PiskelFileUtils = { - FAILURE : { - EMPTY : 'No data found in piskel file', - INVALID : 'Invalid piskel file, contact us on twitter @piskelapp', - DESERIALIZATION : 'Piskel data deserialization failed' - }, - - /** - * Load a piskel from a piskel file. - * After deserialization is successful, the provided success callback will be called. - * Success callback is expected to receive a single Piskel object argument - * @param {File} file the .piskel file to load - * @param {Function} onSuccess Called if the deserialization of the piskel is successful - * @param {Function} onError NOT USED YET - */ - loadFromFile : function (file, onSuccess, onError) { - pskl.utils.FileUtils.readFile(file, function (content) { - var rawPiskel = pskl.utils.Base64.toText(content); - ns.PiskelFileUtils.decodePiskelFile( - rawPiskel, - function (piskel) { - // if using Node-Webkit, store the savePath on load - // Note: the 'path' property is unique to Node-Webkit, and holds the full path - if (pskl.utils.Environment.detectNodeWebkit()) { - piskel.savePath = file.path; - } - onSuccess(piskel); - }, - onError - ); - }); - }, - - decodePiskelFile : function (rawPiskel, onSuccess, onError) { - var serializedPiskel; - if (rawPiskel.length === 0) { - onError(ns.PiskelFileUtils.FAILURE.EMPTY); - return; - } - - try { - serializedPiskel = JSON.parse(rawPiskel); - } catch (e) { - onError(ns.PiskelFileUtils.FAILURE.INVALID); - return; - } - - var piskel = serializedPiskel.piskel; - pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, onSuccess, function () { - onError(ns.PiskelFileUtils.FAILURE.DESERIALIZATION); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.StringUtils = { - leftPad : function (input, length, pad) { - var padding = new Array(length).join(pad); - return (padding + input).slice(-length); - }, - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - var templates = {}; - - ns.Template = { - get : function (templateId) { - if (!templates[templateId]) { - var template = document.getElementById(templateId); - if (template) { - templates[templateId] = template.innerHTML; - } else { - console.error('Could not find template for id :', templateId); - } - } - return templates[templateId]; - }, - - createFromHTML : function (html) { - var dummyEl = ns.Template._getDummyEl(); - dummyEl.innerHTML = html; - var element = dummyEl.children[0]; - dummyEl.innerHTML = ''; - - return element; - }, - - replace : function (template, dict) { - for (var key in dict) { - if (dict.hasOwnProperty(key)) { - var value = dict[key]; - - // special boolean keys keys key:default - // if the value is a boolean, use default as value - if (key.indexOf(':') !== -1) { - if (value === true) { - value = key.split(':')[1]; - } else if (value === false) { - value = ''; - } - } - - // Sanitize all values expect if the key is surrounded by `!` - if (!/^!.*!$/.test(key)) { - value = ns.Template.sanitize(value); - } - - template = template.replace(new RegExp('\\{\\{' + key + '\\}\\}', 'g'), value); - } - } - return template; - }, - - /** - * Sanitize the provided string to make it safer for using in templates. - */ - sanitize : function (string) { - var dummyEl = ns.Template._getDummyEl(); - - // Apply the unsafe string as text content and - dummyEl.textContent = string; - var sanitizedString = dummyEl.innerHTML; - - dummyEl.innerHTML = ''; - - return sanitizedString; - }, - - _getDummyEl : function () { - if (!ns.Template._dummyEl) { - ns.Template._dummyEl = document.createElement('div'); - } - return ns.Template._dummyEl; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - ns.TooltipFormatter = {}; - - ns.TooltipFormatter.format = function(helpText, shortcut, descriptors) { - var tpl = pskl.utils.Template.get('tooltip-container-template'); - shortcut = shortcut ? '(' + shortcut.getDisplayKey() + ')' : ''; - return pskl.utils.Template.replace(tpl, { - helptext : helpText, - shortcut : shortcut, - // Avoid sanitization for descriptors (markup) - '!descriptors!' : this.formatDescriptors_(descriptors) - }); - }; - - ns.TooltipFormatter.formatDescriptors_ = function(descriptors) { - descriptors = descriptors || []; - return descriptors.reduce(function (p, descriptor) { - return p += this.formatDescriptor_(descriptor); - }.bind(this), ''); - }; - - ns.TooltipFormatter.formatDescriptor_ = function(descriptor) { - var tpl; - if (descriptor.key) { - tpl = pskl.utils.Template.get('tooltip-modifier-descriptor-template'); - descriptor.key = descriptor.key.toUpperCase(); - if (pskl.utils.UserAgent.isMac) { - descriptor.key = descriptor.key.replace('CTRL', 'CMD'); - descriptor.key = descriptor.key.replace('ALT', 'OPTION'); - } - } else { - tpl = pskl.utils.Template.get('tooltip-simple-descriptor-template'); - } - return pskl.utils.Template.replace(tpl, descriptor); - }; -})(); -;(function () { - var ns = $.namespace('pskl'); - - ns.UserSettings = { - GRID_WIDTH : 'GRID_WIDTH', - MAX_FPS : 'MAX_FPS', - DEFAULT_SIZE : 'DEFAULT_SIZE', - CANVAS_BACKGROUND : 'CANVAS_BACKGROUND', - SELECTED_PALETTE : 'SELECTED_PALETTE', - SEAMLESS_OPACITY : 'SEAMLESS_OPACITY', - SEAMLESS_MODE : 'SEAMLESS_MODE', - PREVIEW_SIZE : 'PREVIEW_SIZE', - ONION_SKIN : 'ONION_SKIN', - LAYER_PREVIEW : 'LAYER_PREVIEW', - LAYER_OPACITY : 'LAYER_OPACITY', - EXPORT_SCALE: 'EXPORT_SCALE', - EXPORT_TAB: 'EXPORT_TAB', - PEN_SIZE : 'PEN_SIZE', - RESIZE_SETTINGS: 'RESIZE_SETTINGS', - COLOR_FORMAT: 'COLOR_FORMAT', - KEY_TO_DEFAULT_VALUE_MAP_ : { - 'GRID_WIDTH' : 0, - 'MAX_FPS' : 24, - 'DEFAULT_SIZE' : { - width : Constants.DEFAULT.WIDTH, - height : Constants.DEFAULT.HEIGHT - }, - 'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background', - 'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID, - 'SEAMLESS_OPACITY' : 0.30, - 'SEAMLESS_MODE' : false, - 'PREVIEW_SIZE' : 'original', - 'ONION_SKIN' : false, - 'LAYER_OPACITY' : 0.2, - 'LAYER_PREVIEW' : true, - 'EXPORT_SCALE' : 1, - 'EXPORT_TAB' : 'gif', - 'PEN_SIZE' : 1, - 'RESIZE_SETTINGS': { - maintainRatio : true, - resizeContent : false, - origin : 'TOPLEFT' - }, - COLOR_FORMAT: 'hex', - }, - - /** - * @private - */ - cache_ : {}, - - /** - * Static method to access a user defined settings value ot its default - * value if not defined yet. - */ - get : function (key) { - this.checkKeyValidity_(key); - if (!(key in this.cache_)) { - var storedValue = this.readFromLocalStorage_(key); - if (typeof storedValue !== 'undefined' && storedValue !== null) { - this.cache_[key] = storedValue; - } else { - this.cache_[key] = this.readFromDefaults_(key); - } - } - return this.cache_[key]; - }, - - set : function (key, value) { - this.checkKeyValidity_(key); - this.cache_[key] = value; - this.writeToLocalStorage_(key, value); - - $.publish(Events.USER_SETTINGS_CHANGED, [key, value]); - }, - - /** - * @private - */ - readFromLocalStorage_ : function(key) { - var value = window.localStorage[key]; - if (typeof value != 'undefined') { - value = JSON.parse(value); - } - return value; - }, - - /** - * @private - */ - writeToLocalStorage_ : function(key, value) { - // TODO(grosbouddha): Catch storage exception here. - window.localStorage[key] = JSON.stringify(value); - }, - - /** - * @private - */ - readFromDefaults_ : function (key) { - return this.KEY_TO_DEFAULT_VALUE_MAP_[key]; - }, - - /** - * @private - */ - checkKeyValidity_ : function(key) { - if (key.indexOf(pskl.service.keyboard.Shortcut.USER_SETTINGS_PREFIX) === 0) { - return true; - } - - var isValidKey = key in this.KEY_TO_DEFAULT_VALUE_MAP_; - if (!isValidKey) { - console.error('UserSettings key <' + key + '> not found in supported keys.'); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - ns.Uuid = { - generate : function () { - return 'ss-s-s-s-sss'.replace(/s/g, function () { - return s4(); - }); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - - var workers = {}; - - ns.WorkerUtils = { - createWorker : function (worker, workerId) { - if (!workers[workerId]) { - workers[workerId] = ns.WorkerUtils.createWorkerURL(worker); - } - - return new Worker(workers[workerId]); - }, - - createWorkerURL : function (worker) { - // remove "function () {" at the start of the worker string and the last "}" before the end - var typedArray = [(worker + '').replace(/function\s*\(\)\s*\{/, '').replace(/\}[^}]*$/, '')]; - var blob = new Blob(typedArray, {type: 'application/javascript'}); - return window.URL.createObjectURL(blob); - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils'); - ns.Xhr = { - get : function (url, success, error) { - var xhr = ns.Xhr.xhr_(url, 'GET', success, error); - xhr.send(); - }, - - post : function (url, data, success, error) { - var xhr = ns.Xhr.xhr_(url, 'POST', success, error); - var formData = new FormData(); - - if (typeof data == 'object') { - for (var key in data) { - if (data.hasOwnProperty(key)) { - formData.append(key, data[key]); - } - } - } - - xhr.send(formData); - }, - - xhr_ : function (url, method, success, error) { - success = success || function () {}; - error = error || function () {}; - - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - - xhr.onload = function (e) { - if (this.status == 200) { - success(this); - } else { - this.onerror(this, e); - } - }; - - xhr.onerror = function (e) { - error(e, this); - }; - - return xhr; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - var areChunksValid = function (chunks) { - return chunks.length && chunks.every(function (chunk) { - return chunk.base64PNG && chunk.base64PNG !== 'data:,'; - }); - }; - - var createLineLayout = function (size, offset) { - var layout = []; - for (var i = 0 ; i < size ; i++) { - layout.push([i + offset]); - } - - return layout; - }; - - ns.Serializer = { - serialize : function (piskel) { - var serializedLayers = piskel.getLayers().map(function (l) { - return pskl.utils.serialization.Serializer.serializeLayer(l); - }); - return JSON.stringify({ - modelVersion : Constants.MODEL_VERSION, - piskel : { - name : piskel.getDescriptor().name, - description : piskel.getDescriptor().description, - fps : pskl.app.piskelController.getFPS(), - height : piskel.getHeight(), - width : piskel.getWidth(), - layers : serializedLayers - } - }); - }, - - serializeLayer : function (layer) { - var frames = layer.getFrames(); - var layerToSerialize = { - name : layer.getName(), - opacity : layer.getOpacity(), - frameCount : frames.length - }; - - // A layer spritesheet data can be chunked in case the spritesheet PNG is to big to be - // converted to a dataURL. - // Frames are divided equally amongst chunks and each chunk is converted to a spritesheet - // PNG. If any chunk contains an invalid base64 PNG, we increase the number of chunks and - // retry. - var chunks = []; - while (!areChunksValid(chunks)) { - if (chunks.length >= frames.length) { - // Something went horribly wrong. - chunks = []; - break; - } - - // Chunks are invalid, increase the number of chunks by one, and chunk the frames array. - var frameChunks = pskl.utils.Array.chunk(frames, chunks.length + 1); - - // Reset chunks array. - chunks = []; - - // After each chunk update the offset by te number of frames that have been processed. - var offset = 0; - for (var i = 0 ; i < frameChunks.length ; i++) { - var chunkFrames = frameChunks[i]; - chunks.push({ - // create a layout array, containing the indices of the frames extracted in this chunk - layout : createLineLayout(chunkFrames.length, offset), - base64PNG : ns.Serializer.serializeFramesToBase64(chunkFrames), - }); - - offset += chunkFrames.length; - } - } - - layerToSerialize.chunks = chunks; - return JSON.stringify(layerToSerialize); - }, - - serializeFramesToBase64 : function (frames) { - try { - var renderer = new pskl.rendering.FramesheetRenderer(frames); - return renderer.renderAsCanvas().toDataURL(); - } catch (e) { - return ''; - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization'); - - ns.Deserializer = function (data, callback) { - this.layersToLoad_ = 0; - this.data_ = data; - this.callback_ = callback; - this.piskel_ = null; - this.layers_ = []; - }; - - ns.Deserializer.deserialize = function (data, onSuccess, onError) { - try { - var deserializer; - if (data.modelVersion == Constants.MODEL_VERSION) { - deserializer = new ns.Deserializer(data, onSuccess); - } else if (data.modelVersion == 1) { - deserializer = new ns.backward.Deserializer_v1(data, onSuccess); - } else { - deserializer = new ns.backward.Deserializer_v0(data, onSuccess); - } - deserializer.deserialize(); - } catch (e) { - console.error(e); - if (typeof onError === 'function') { - onError(e); - } - } - }; - - ns.Deserializer.prototype.deserialize = function () { - var data = this.data_; - var piskelData = data.piskel; - var name = piskelData.name || 'Deserialized piskel'; - var description = piskelData.description || ''; - - var descriptor = new pskl.model.piskel.Descriptor(name, description); - this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor); - - this.layersToLoad_ = piskelData.layers.length; - piskelData.layers.forEach(this.deserializeLayer.bind(this)); - }; - - ns.Deserializer.prototype.deserializeLayer = function (layerString, index) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layer.setOpacity(layerData.opacity); - - // Backward compatibility: if the layerData is not chunked but contains a single base64PNG, - // create a fake chunk, expected to represent all frames side-by-side. - if (typeof layerData.chunks === 'undefined' && layerData.base64PNG) { - this.normalizeLayerData_(layerData); - } - - var chunks = layerData.chunks; - - // Prepare a frames array to store frame objects extracted from the chunks. - var frames = []; - Q.all(chunks.map(function (chunk) { - // Create a promise for each chunk. - var deferred = Q.defer(); - var image = new Image(); - // Load the chunk image in an Image object. - image.onload = function () { - // extract the chunkFrames from the chunk image - var chunkFrames = pskl.utils.FrameUtils.createFramesFromChunk(image, chunk.layout); - // add each image to the frames array, at the extracted index - chunkFrames.forEach(function (chunkFrame) { - frames[chunkFrame.index] = chunkFrame.frame; - }); - deferred.resolve(); - }; - image.src = chunk.base64PNG; - return deferred.promise; - })).then(function () { - frames.forEach(layer.addFrame.bind(layer)); - this.layers_[index] = layer; - this.onLayerLoaded_(); - }.bind(this)).catch(function (error) { - console.error('Failed to deserialize layer'); - console.error(error); - }); - - return layer; - }; - - ns.Deserializer.prototype.onLayerLoaded_ = function () { - this.layersToLoad_ = this.layersToLoad_ - 1; - if (this.layersToLoad_ === 0) { - this.layers_.forEach(function (layer) { - this.piskel_.addLayer(layer); - }.bind(this)); - this.callback_(this.piskel_); - } - }; - - /** - * Backward comptibility only. Create a chunk for layerData objects that only contain - * an single base64PNG without chunk/layout information. - */ - ns.Deserializer.prototype.normalizeLayerData_ = function (layerData) { - var layout = []; - for (var i = 0 ; i < layerData.frameCount ; i++) { - layout.push([i]); - } - layerData.chunks = [{ - base64PNG : layerData.base64PNG, - layout : layout - }]; - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - */ - ns.ArrayBufferDeserializer = { - deserialize : function (data, callback) { - var i; - var j; - var buffer = data; - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(arr8.buffer); - var sub; - - /********/ - /* META */ - /********/ - // Piskel meta - var modelVersion = arr16[0]; - var width = arr16[1]; - var height = arr16[2]; - var fps = arr16[3]; - - // Descriptor meta - var descriptorNameLength = arr16[4]; - var descriptorDescriptionLength = arr16[5]; - - // Layers meta - var layerCount = arr16[6]; - - /********/ - /* DATA */ - /********/ - // Descriptor name - var descriptorName = ''; - for (i = 0; i < descriptorNameLength; i++) { - descriptorName += String.fromCharCode(arr16[7 + i]); - } - - // Descriptor description - var descriptorDescription = ''; - for (i = 0; i < descriptorDescriptionLength; i++) { - descriptorDescription = String.fromCharCode(arr16[7 + descriptorNameLength + i]); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - var layers = []; - var layer; - for (i = 0; i < layerCount; i++) { - layer = {}; - var frames = []; - - // Meta - var layerNameLength = arr16[layerStartIndex]; - var opacity = arr16[layerStartIndex + 1] / 65535; - var frameCount = arr16[layerStartIndex + 2]; - var dataUriLengthFirstHalf = arr16[layerStartIndex + 3]; - var dataUriLengthSecondHalf = arr16[layerStartIndex + 4]; - var dataUriLength = (dataUriLengthSecondHalf >>> 0) | (dataUriLengthFirstHalf << 16 >>> 0); - - // Name - var layerName = ''; - for (j = 0; j < layerNameLength; j++) { - layerName += String.fromCharCode(arr16[layerStartIndex + 5 + j]); - } - - // Data URI - var dataUri = ''; - for (j = 0; j < dataUriLength; j++) { - dataUri += String.fromCharCode(arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j]); - } - dataUri = 'data:image/png;base64,' + dataUri; - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - - layer.name = layerName; - layer.opacity = opacity; - layer.frameCount = frameCount; - layer.dataUri = dataUri; - layers.push(layer); - } - - var descriptor = new pskl.model.piskel.Descriptor(descriptorName, descriptorDescription); - var piskel = new pskl.model.Piskel(width, height, fps, descriptor); - var loadedLayers = 0; - - var loadLayerImage = function(layer, cb) { - var image = new Image(); - image.onload = function() { - var frames = pskl.utils.FrameUtils.createFramesFromSpritesheet(this, layer.frameCount); - frames.forEach(function (frame) { - layer.model.addFrame(frame); - }); - - loadedLayers++; - if (loadedLayers == layerCount) { - cb(piskel); - } - }; - image.src = layer.dataUri; - }; - - for (i = 0; i < layerCount; i++) { - layer = layers[i]; - var nlayer = new pskl.model.Layer(layer.name); - layer.model = nlayer; - nlayer.setOpacity(layer.opacity); - piskel.addLayer(nlayer); - - loadLayerImage.bind(this, layer, callback)(); - } - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.arraybuffer'); - - /** - * The array buffer serialization-deserialization should only be used when when backing - * up the animation in memory. If you actually need to dump the animation to a string - * use the regular serialization helpers. - * - * This is due to the lacking support on TypedArray::toString on some browsers. - * Will revisit the option of using this across the whole project when the APIs are less - * green. - * - ********* - * META * - ********* - * // Piskel - * [0] = model version - * [1] = width - * [2] = height - * [3] = fps - * - * // Descriptor - * [4] = name length - * [5] = description length - * - * // Layers - * [6] = layers count - * [layer data index start] = layer name length - * [layer data index start + 1] = opacity - * [layer data index start + 2] = frame count - * [layer data index start + 3] = base 64 png data url length (upper 16 bits) - * [layer data index start + 4] = base 64 png data url length (lower 16 bits) - * - ********* - * DATA * - ********* - * [7..name length-1] = name - * [name length..description length-1] = description - * [layer data index start + 4..layer name length-1] = layer name - * [layer name length..base 64 png data url length-1] = base 64 png data url - * - */ - - ns.ArrayBufferSerializer = { - calculateRequiredBytes : function(piskel, framesData) { - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorNameLength = piskel.getDescriptor().name.length; - var descriptorDescriptionLength = piskel.getDescriptor().description.length; - var layersLength = piskel.getLayers().length; - - var bytes = 0; - - /********/ - /* META */ - /********/ - // Piskel meta - bytes += 4 * 2; - - // Descriptor meta - bytes += 2 * 2; - - // Layers meta - bytes += 1 * 2; - - /********/ - /* DATA */ - /********/ - // Descriptor name - bytes += descriptorNameLength * 2; - - // Descriptor description - bytes += descriptorDescriptionLength * 2; - - // Layers - for (var i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - bytes += 5 * 2; - bytes += layers[i].name.length * 2; - bytes += framesData[i].length; - if (bytes % 2 == 1) { - bytes++; - } - } - - return bytes; - }, - - serialize : function (piskel) { - var i; - var j; - var layers; - var dataUri; - var dataUriLength; - - // Render frames - var framesData = []; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var renderer = new pskl.rendering.FramesheetRenderer(layers[i].getFrames()); - dataUri = renderer.renderAsCanvas().toDataURL().split(',')[1]; - dataUriLength = dataUri.length; - framesData.push({uri: dataUri, length: dataUriLength}); - } - - var bytes = ns.ArrayBufferSerializer.calculateRequiredBytes(piskel, framesData); - - var buffer = new ArrayBuffer(bytes); - var arr8 = new Uint8Array(buffer); - var arr16 = new Uint16Array(buffer); - - var width = piskel.getWidth(); - var height = piskel.getHeight(); - var descriptorName = piskel.getDescriptor().name; - var descriptorNameLength = descriptorName.length; - var descriptorDescription = piskel.getDescriptor().description; - var descriptorDescriptionLength = descriptorDescription.length; - - /********/ - /* META */ - /********/ - // Piskel meta - arr16[0] = Constants.MODEL_VERSION; - arr16[1] = width; - arr16[2] = height; - arr16[3] = pskl.app.piskelController.getFPS(); - - // Descriptor meta - arr16[4] = descriptorNameLength; - arr16[5] = descriptorDescriptionLength; - - // Layers meta - arr16[6] = piskel.getLayers().length; - - /********/ - /* DATA */ - /********/ - // Descriptor name - for (i = 0; i < descriptorNameLength; i++) { - arr16[7 + i] = descriptorName.charCodeAt(i); - } - - // Descriptor description - for (i = 0; i < descriptorDescriptionLength; i++) { - arr16[7 + descriptorNameLength + i] = descriptorDescription.charCodeAt(i); - } - - // Layers - var layerStartIndex = 7 + descriptorNameLength + descriptorDescriptionLength; - for (i = 0, layers = piskel.getLayers(); i < layers.length; i++) { - var layer = layers[i]; - var frames = layer.getFrames(); - - var layerName = layer.getName(); - var layerNameLength = layerName.length; - var opacity = layer.getOpacity(); - var frameCount = frames.length; - - dataUri = framesData[i].uri; - dataUriLength = framesData[i].length; - - // Meta - arr16[layerStartIndex] = layerNameLength; - arr16[layerStartIndex + 1] = Math.floor(opacity * 65535); - arr16[layerStartIndex + 2] = frameCount; - arr16[layerStartIndex + 3] = ((dataUriLength & 0xffff0000) >> 16) >>> 0; // Upper 16 - arr16[layerStartIndex + 4] = ((dataUriLength & 0x0000ffff)) >>> 0; // Lower 16 - - // Name - for (j = 0; j < layerNameLength; j++) { - arr16[layerStartIndex + 5 + j] = layerName.charCodeAt(j); - } - - // Data URI - for (j = 0; j < dataUriLength; j++) { - arr8[(layerStartIndex + 5 + layerNameLength) * 2 + j] = dataUri.charCodeAt(j); - } - - layerStartIndex += Math.ceil(5 + layerNameLength + (dataUriLength / 2)); - } - - return buffer; - } - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v0 = function (data, callback) { - this.data_ = data; - this.callback_ = callback; - }; - - ns.Deserializer_v0.prototype.deserialize = function () { - var pixelGrids = this.data_; - var frames = pixelGrids.map(function (grid) { - return pskl.model.Frame.fromPixelGrid(grid); - }); - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var layer = pskl.model.Layer.fromFrames('Layer 1', frames); - - this.callback_(pskl.model.Piskel.fromLayers([layer], Constants.DEFAULTS.FPS, descriptor)); - }; -})(); -;(function () { - var ns = $.namespace('pskl.utils.serialization.backward'); - - ns.Deserializer_v1 = function (data, callback) { - this.callback_ = callback; - this.data_ = data; - }; - - ns.Deserializer_v1.prototype.deserialize = function () { - var piskelData = this.data_.piskel; - var descriptor = new pskl.model.piskel.Descriptor('Deserialized piskel', ''); - var piskel = new pskl.model.Piskel(piskelData.width, piskelData.height, Constants.DEFAULTS.FPS, descriptor); - - piskelData.layers.forEach(function (serializedLayer) { - var layer = this.deserializeLayer(serializedLayer); - piskel.addLayer(layer); - }.bind(this)); - - this.callback_(piskel); - }; - - ns.Deserializer_v1.prototype.deserializeLayer = function (layerString) { - var layerData = JSON.parse(layerString); - var layer = new pskl.model.Layer(layerData.name); - layerData.frames.forEach(function (serializedFrame) { - var frame = this.deserializeFrame(serializedFrame); - layer.addFrame(frame); - }.bind(this)); - - return layer; - }; - - ns.Deserializer_v1.prototype.deserializeFrame = function (frameString) { - var framePixelGrid = JSON.parse(frameString); - return pskl.model.Frame.fromPixelGrid(framePixelGrid); - }; -})(); -;(function() { - var worker = function() { - (function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var h=this.pixels.length,d=h/3;this.indexedPixels=new Uint8Array(d);var a;if(this.preserveColors){var i=this.toRGBComponents(this.transparent);a=new g(this.pixels,this.sample,i)}else a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a>8&255)},b.prototype.writePixels=function(){var a=new h(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<0?g|=a<=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/SimpleQuant.js',function(b,d,e,f){function a(a,b,c){return[a,b,c].join('.')}function c(c,d,b){this.pixels=c,this.palette=[],this.paletteIndex={},this.getColormap=function(){return this.palette},this.buildColormap=function(){var d=this.pixels.length/3,a=0;for(var c=0;c>3);var c,d;for(c=0;c>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(gh)d=z[m++],gh&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c>i-b),n>g,y[c]-=l,t[c]+=l<>1,b=f+1;b>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f=0)f=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c>h;for(a<=1&&(a=0),c=0;c=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e>g,r=e<>3,h=6,t=1<this.frames.length;0<=this.frames.length?++a:--a)b.push(a);return b}.apply(this,arguments),a=0,e=b.length;aa;0<=a?++b:--b)c.push(b);return c}.apply(this,arguments),b=0,e=c.length;ba;this.freeWorkers.length<=a?++b:--b)c.push(b);return c}.apply(this,arguments).forEach(function(a){return function(c){var b;return console.log('spawning worker '+c),b=new Worker(a.options.workerScript),b.onmessage=function(a){return function(c){return a.activeWorkers.splice(a.activeWorkers.indexOf(b),1),a.freeWorkers.push(b),a.frameFinished(c.data)}}(a),a.freeWorkers.push(b)}}(this)),a},a.prototype.frameFinished=function(a){return console.log('frame '+a.index+' finished - '+this.activeWorkers.length+' active'),this.finishedFrames++,this.emit('progress',this.finishedFrames/this.frames.length),this.imageParts[a.index]=a,j(null,this.imageParts)?this.renderNextFrame():this.finishRendering()},a.prototype.finishRendering=function(){var e,a,k,m,b,d,h;b=0;for(var f=0,j=this.imageParts.length;f=this.frames.length?void 0:(c=this.frames[this.nextFrame++],b=this.freeWorkers.shift(),a=this.getTask(c),console.log('starting frame '+(a.index+1)+' of '+this.frames.length),this.activeWorkers.push(b),b.postMessage(a))},a.prototype.getContextData=function(a){return a.getImageData(0,0,this.options.width,this.options.height).data},a.prototype.getImageData=function(b){var a;return null!=this._canvas||(this._canvas=document.createElement('canvas'),this._canvas.width=this.options.width,this._canvas.height=this.options.height),a=this._canvas.getContext('2d'),a.setFill=this.options.background,a.fillRect(0,0,this.options.width,this.options.height),a.drawImage(b,0,0),this.getContextData(a)},a.prototype.getTask=function(a){var c,b;if(c=this.frames.indexOf(a),b={index:c,last:c===this.frames.length-1,delay:a.delay,transparent:a.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,preserveColors:this.options.preserveColors,repeat:this.options.repeat,canTransfer:h.name==='chrome'},null!=a.data)b.data=a.data;else if(null!=a.context)b.data=this.getContextData(a.context);else if(null!=a.image)b.data=this.getImageData(a.image);else throw new Error('Invalid frame');return b},a}(f),d.exports=e}),a.define('/browser.coffee',function(f,g,h,i){var a,d,e,c,b;c=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),b=c.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],d=b[1]==='ie'&&document.documentMode,a={name:b[1]==='version'?b[3]:b[1],version:d||parseFloat(b[1]==='opera'&&b[4]?b[4]:b[2]),platform:{name:c.match(/ip(?:ad|od|hone)/)?'ios':(c.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||['other'])[0]}},a[a.name]=!0,a[a.name+parseInt(a.version,10)]=!0,a.platform[a.platform.name]=!0,f.exports=a}),a.define('events',function(f,e,g,h){b.EventEmitter||(b.EventEmitter=function(){});var a=e.EventEmitter=b.EventEmitter,c=typeof Array.isArray==='function'?Array.isArray:function(a){return Object.prototype.toString.call(a)==='[object Array]'},d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(f){if(f==='error'&&(!(this._events&&this._events.error)||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var a=this._events[f];if(!a)return!1;if(!(typeof a=='function'))if(c(a)){var b=Array.prototype.slice.call(arguments,1),e=a.slice();for(var d=0,g=e.length;d0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.',this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(b,c){var a=this;return a.on(b,function d(){a.removeListener(b,d),c.apply(this,arguments)}),this},a.prototype.removeListener=function(a,d){if('function'!==typeof d)throw new Error('removeListener only takes instances of Function');if(!(this._events&&this._events[a]))return this;var b=this._events[a];if(c(b)){var e=b.indexOf(d);if(e<0)return this;b.splice(e,1),b.length==0&&delete this._events[a]}else this._events[a]===d&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){return a&&this._events&&this._events[a]&&(this._events[a]=null),this},a.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}),c.GIF=a('/gif.coffee')}.call(this,this)) -//# sourceMappingURL=gif.js.map -// gif.js 0.1.6 - https://github.com/jnordberg/gif.js -;( function( window ) { 'use strict'; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; -}; - -Stream.prototype.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return this.data.charCodeAt(this.pos++) & 0xFF; -}; - -Stream.prototype.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; -}; - -Stream.prototype.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; -}; - -Stream.prototype.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; -}; - -var SuperGIF = window.SuperGIF = window.SuperGIF || {}; -SuperGIF.Stream = Stream; - -})( window ); - -/* - SuperGif - - Example usage: - - - - - - Image tag attributes: - - data-animated-src - If this url is specified, it's loaded into the player instead of src. - This allows a preview frame to be shown until animated gif data is streamed into the canvas - - Constructor options args - - gif Required. The DOM element of an img tag. - - Instance methods - - // loading - load( callback ) Loads the gif into a canvas element and then calls callback if one is passed - - For additional customization (viewport inside iframe) these params may be passed: - c_w, c_h - width and height of canvas - vp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport - - A bonus: few articles to understand what is going on - http://enthusiasms.org/post/16976438906 - http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546 - -*/ - -( function( window ) { 'use strict'; - -// Generic functions -var bitsToNum = function (ba) { - return ba.reduce(function (s, n) { - return s * 2 + n; - }, 0); -}; - -var byteToBitArr = function (bite) { - var a = []; - for (var i = 7; i >= 0; i--) { - a.push( !! (bite & (1 << i))); - } - return a; -}; - -// Stream -/** - * @constructor - */ -// Make compiler happy. -var Stream = function (data) { - this.data = data; - this.len = this.data.length; - this.pos = 0; - - this.readByte = function () { - if (this.pos >= this.data.length) { - throw new Error('Attempted to read past end of stream.'); - } - return data.charCodeAt(this.pos++) & 0xFF; - }; - - this.readBytes = function (n) { - var bytes = []; - for (var i = 0; i < n; i++) { - bytes.push(this.readByte()); - } - return bytes; - }; - - this.read = function (n) { - var s = ''; - for (var i = 0; i < n; i++) { - s += String.fromCharCode(this.readByte()); - } - return s; - }; - - this.readUnsigned = function () { // Little-endian. - var a = this.readBytes(2); - return (a[1] << 8) + a[0]; - }; -}; - -var lzwDecode = function (minCodeSize, data) { - // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String? - var pos = 0; // Maybe this streaming thing should be merged with the Stream? - var readCode = function (size) { - var code = 0; - for (var i = 0; i < size; i++) { - if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) { - code |= 1 << i; - } - pos++; - } - return code; - }; - - var output = []; - - var clearCode = 1 << minCodeSize; - var eoiCode = clearCode + 1; - - var codeSize = minCodeSize + 1; - - var dict = []; - - var clear = function () { - dict = []; - codeSize = minCodeSize + 1; - for (var i = 0; i < clearCode; i++) { - dict[i] = [i]; - } - dict[clearCode] = []; - dict[eoiCode] = null; - - }; - - var code; - var last; - - while (true) { - last = code; - code = readCode(codeSize); - - if (code === clearCode) { - clear(); - continue; - } - if (code === eoiCode) break; - - if (code < dict.length) { - if (last !== clearCode) { - dict.push(dict[last].concat(dict[code][0])); - } - } - else { - if (code !== dict.length) throw new Error('Invalid LZW code.'); - dict.push(dict[last].concat(dict[last][0])); - } - output.push.apply(output, dict[code]); - - if (dict.length === (1 << codeSize) && codeSize < 12) { - // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. - codeSize++; - } - } - - // I don't know if this is technically an error, but some GIFs do it. - //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.'); - return output; -}; - - -// The actual parsing; returns an object with properties. -var parseGIF = function (st, handler) { - handler || (handler = {}); - - // LZW (GIF-specific) - var parseCT = function (entries) { // Each entry is 3 bytes, for RGB. - var ct = []; - for (var i = 0; i < entries; i++) { - ct.push(st.readBytes(3)); - } - return ct; - }; - - var readSubBlocks = function () { - var size, data; - data = ''; - do { - size = st.readByte(); - data += st.read(size); - } while (size !== 0); - return data; - }; - - var parseHeader = function () { - var hdr = {}; - hdr.sig = st.read(3); - hdr.ver = st.read(3); - if (hdr.sig !== 'GIF') { - handler.onError(); // XXX: This should probably be handled more nicely. - throw new Error('Not a GIF file.'); - } - hdr.width = st.readUnsigned(); - hdr.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - hdr.gctFlag = bits.shift(); - hdr.colorRes = bitsToNum(bits.splice(0, 3)); - hdr.sorted = bits.shift(); - hdr.gctSize = bitsToNum(bits.splice(0, 3)); - - hdr.bgColor = st.readByte(); - hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64 - if (hdr.gctFlag) { - hdr.gct = parseCT(1 << (hdr.gctSize + 1)); - } - handler.hdr && handler.hdr(hdr); - }; - - var parseExt = function (block) { - var parseGCExt = function (block) { - var blockSize = st.readByte(); // Always 4 - var bits = byteToBitArr(st.readByte()); - block.reserved = bits.splice(0, 3); // Reserved; should be 000. - block.disposalMethod = bitsToNum(bits.splice(0, 3)); - block.userInput = bits.shift(); - block.transparencyGiven = bits.shift(); - - block.delayTime = st.readUnsigned(); - - block.transparencyIndex = st.readByte(); - - block.terminator = st.readByte(); - - handler.gce && handler.gce(block); - }; - - var parseComExt = function (block) { - block.comment = readSubBlocks(); - handler.com && handler.com(block); - }; - - var parsePTExt = function (block) { - // No one *ever* uses this. If you use it, deal with parsing it yourself. - var blockSize = st.readByte(); // Always 12 - block.ptHeader = st.readBytes(12); - block.ptData = readSubBlocks(); - handler.pte && handler.pte(block); - }; - - var parseAppExt = function (block) { - var parseNetscapeExt = function (block) { - var blockSize = st.readByte(); // Always 3 - block.unknown = st.readByte(); // ??? Always 1? What is this? - block.iterations = st.readUnsigned(); - block.terminator = st.readByte(); - handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block); - }; - - var parseUnknownAppExt = function (block) { - block.appData = readSubBlocks(); - // FIXME: This won't work if a handler wants to match on any identifier. - handler.app && handler.app[block.identifier] && handler.app[block.identifier](block); - }; - - var blockSize = st.readByte(); // Always 11 - block.identifier = st.read(8); - block.authCode = st.read(3); - switch (block.identifier) { - case 'NETSCAPE': - parseNetscapeExt(block); - break; - default: - parseUnknownAppExt(block); - break; - } - }; - - var parseUnknownExt = function (block) { - block.data = readSubBlocks(); - handler.unknown && handler.unknown(block); - }; - - block.label = st.readByte(); - switch (block.label) { - case 0xF9: - block.extType = 'gce'; - parseGCExt(block); - break; - case 0xFE: - block.extType = 'com'; - parseComExt(block); - break; - case 0x01: - block.extType = 'pte'; - parsePTExt(block); - break; - case 0xFF: - block.extType = 'app'; - parseAppExt(block); - break; - default: - block.extType = 'unknown'; - parseUnknownExt(block); - break; - } - }; - - var parseImg = function (img) { - var deinterlace = function (pixels, width) { - // Of course this defeats the purpose of interlacing. And it's *probably* - // the least efficient way it's ever been implemented. But nevertheless... - var newPixels = new Array(pixels.length); - var rows = pixels.length / width; - var cpRow = function (toRow, fromRow) { - var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width); - newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels)); - }; - - // See appendix E. - var offsets = [0, 4, 2, 1]; - var steps = [8, 8, 4, 2]; - - var fromRow = 0; - for (var pass = 0; pass < 4; pass++) { - for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) { - cpRow(toRow, fromRow) - fromRow++; - } - } - - return newPixels; - }; - - img.leftPos = st.readUnsigned(); - img.topPos = st.readUnsigned(); - img.width = st.readUnsigned(); - img.height = st.readUnsigned(); - - var bits = byteToBitArr(st.readByte()); - img.lctFlag = bits.shift(); - img.interlaced = bits.shift(); - img.sorted = bits.shift(); - img.reserved = bits.splice(0, 2); - img.lctSize = bitsToNum(bits.splice(0, 3)); - - if (img.lctFlag) { - img.lct = parseCT(1 << (img.lctSize + 1)); - } - - img.lzwMinCodeSize = st.readByte(); - - var lzwData = readSubBlocks(); - - img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData); - - if (img.interlaced) { // Move - img.pixels = deinterlace(img.pixels, img.width); - } - - handler.img && handler.img(img); - }; - - var parseBlock = function () { - var block = {}; - block.sentinel = st.readByte(); - - switch (String.fromCharCode(block.sentinel)) { // For ease of matching - case '!': - block.type = 'ext'; - parseExt(block); - break; - case ',': - block.type = 'img'; - parseImg(block); - break; - case ';': - block.type = 'eof'; - handler.eof && handler.eof(block); - break; - default: - return handler.onError(new Error('Unknown block: 0x' + block.sentinel.toString(16))); // TODO: Pad this with a 0. - } - - if (block.type !== 'eof') { - setTimeout(parseBlock, 0); - } - }; - - var parse = function () { - parseHeader(); - setTimeout(parseBlock, 0); - }; - - parse(); -}; - - -var SuperGif = function ( opts ) { - var options = { - //viewport position - vp_l: 0, - vp_t: 0, - vp_w: null, - vp_h: null, - //canvas sizes - c_w: null, - c_h: null - }; - for (var i in opts ) { options[i] = opts[i] } - if (options.vp_w && options.vp_h) options.is_vp = true; - - var stream; - var hdr; - - var loadError = null; - var loading = false; - - var transparency = null; - var delay = null; - var disposalMethod = null; - var disposalRestoreFromIdx = 0; - var lastDisposalMethod = null; - var frame = null; - var lastImg = null; - - var frames = []; - - var gif = options.gif; - - var clear = function () { - transparency = null; - delay = null; - lastDisposalMethod = disposalMethod; - disposalMethod = null; - frame = null; - }; - - // XXX: There's probably a better way to handle catching exceptions when - // callbacks are involved. - var doParse = function () { - try { - parseGIF(stream, handler); - } - catch (err) { - doLoadError('parse'); - } - }; - - var setSizes = function(w, h) { - tmpCanvas.width = w; - tmpCanvas.height = h; - tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0); - } - - var doLoadError = function (originOfError) { - - - loadError = originOfError; - hdr = { - width: gif.width, - height: gif.height - }; // Fake header. - frames = []; - }; - - var doHdr = function (_hdr) { - hdr = _hdr; - setSizes(hdr.width, hdr.height) - }; - - var doGCE = function (gce) { - pushFrame(); - clear(); - transparency = gce.transparencyGiven ? gce.transparencyIndex : null; - delay = gce.delayTime; - disposalMethod = gce.disposalMethod; - // We don't have much to do with the rest of GCE. - }; - - var pushFrame = function () { - if (!frame) return; - frames.push({ - data: frame.getImageData(0, 0, hdr.width, hdr.height), - delay: delay - }); - }; - - // flag for drawing initial frame - var isInitFrameDrawn = false; - - var doImg = function (img) { - if (!frame) frame = tmpCanvas.getContext('2d'); - - var currIdx = frames.length; - - //ct = color table, gct = global color table - var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists? - - /* - Disposal method indicates the way in which the graphic is to - be treated after being displayed. - - Values : 0 - No disposal specified. The decoder is - not required to take any action. - 1 - Do not dispose. The graphic is to be left - in place. - 2 - Restore to background color. The area used by the - graphic must be restored to the background color. - 3 - Restore to previous. The decoder is required to - restore the area overwritten by the graphic with - what was there prior to rendering the graphic. - - Importantly, "previous" means the frame state - after the last disposal of method 0, 1, or 2. - */ - if (currIdx > 0) { - if (lastDisposalMethod === 3) { - // Restore to previous - frame.putImageData(frames[disposalRestoreFromIdx].data, 0, 0); - } else { - disposalRestoreFromIdx = currIdx - 1; - } - - if (lastDisposalMethod === 2) { - // Restore to background color - // Browser implementations historically restore to transparent; we do the same. - // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079 - frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height); - } - } - // else, Undefined/Do not dispose. - // frame contains final pixel data from the last frame; do nothing - - //Get existing pixels for img region after applying disposal method - var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height); - //apply color table colors - var cdd = imgData.data; - img.pixels.forEach(function (pixel, i) { - // imgData.data === [R,G,B,A,R,G,B,A,...] - if (pixel !== transparency) { - cdd[i * 4 + 0] = ct[pixel][0]; - cdd[i * 4 + 1] = ct[pixel][1]; - cdd[i * 4 + 2] = ct[pixel][2]; - cdd[i * 4 + 3] = 255; // Opaque. - } - }); - - frame.putImageData(imgData, img.leftPos, img.topPos); - - lastImg = img; - }; - - var doNothing = function () {}; - /** - * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency. - * Note that this means that the text will be unsynchronized with the progress bar on non-frames; - * but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly. - */ - var handler = { - hdr: doHdr, - gce: doGCE, - // I guess that's all for now. - // app: { - // // TODO: Is there much point in actually supporting iterations? - // NETSCAPE: withProgress(doNothing) - // }, - img: doImg, - eof: function (block) { - pushFrame(); - loading = false; - if (load_callback) { - load_callback(); - } - }, - - onError : function (error) { - if (error_callback) { - error_callback(); - } - } - }; - - var load_callback = false; - var step_callback = false; - var error_callback = false; - var tmpCanvas = document.createElement('canvas'); - - return { - - load: function (callback) { - - load_callback = callback.success; - step_callback = callback.step; - error_callback = callback.error; - - loading = true; - - if (gif.src.indexOf('data:') !== -1) { - var data = gif.src.substring(gif.src.indexOf(',')+1); - stream = new Stream(window.atob(data)); - doParse(); - } else { - var h = new XMLHttpRequest(); - h.overrideMimeType('text/plain; charset=x-user-defined'); - h.onload = function(e) { - stream = new Stream(h.responseText); - setTimeout(doParse, 0); - }; - h.onerror = function() { doLoadError('xhr'); }; - h.open('GET', gif.getAttribute('data-animated-src') || gif.src, true); - h.send(); - } - }, - - getFrames : function () { - return frames; - } - }; -}; - - -window.SuperGif = SuperGif; - -})( window );;/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library zlib.js released under the following license : -zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License -*/ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ -(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case 16:for(g=3+d(this,2);g--;)c[h++]=i;break;case 17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case 18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}return this.p=i,c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)});;if (!Element.prototype.scrollIntoViewIfNeeded) { - Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { - centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; - - var parent = this.parentNode, - parentComputedStyle = window.getComputedStyle(parent, null), - parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')), - parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')), - overTop = this.offsetTop - parent.offsetTop < parent.scrollTop, - overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), - overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft, - overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), - alignWithTop = overTop && !overBottom; - - if ((overTop || overBottom) && centerIfNeeded) { - parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2; - } - - if ((overLeft || overRight) && centerIfNeeded) { - parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2; - } - - if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) { - this.scrollIntoView(alignWithTop); - } - }; -};/* - * smoothscroll polyfill - v0.3.3 - * https://iamdustan.github.io/smoothscroll - * 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License - */ - -(function(w, d, undefined) { - 'use strict'; - - /* - * aliases - * w: window global object - * d: document - * undefined: undefined - */ - - // polyfill - function polyfill() { - // return when scrollBehavior interface is supported - if ('scrollBehavior' in d.documentElement.style) { - return; - } - - /* - * globals - */ - var Element = w.HTMLElement || w.Element; - var SCROLL_TIME = 468; - - /* - * object gathering original scroll methods - */ - var original = { - scroll: w.scroll || w.scrollTo, - scrollBy: w.scrollBy, - scrollIntoView: Element.prototype.scrollIntoView - }; - - /* - * define timing method - */ - var now = w.performance && w.performance.now - ? w.performance.now.bind(w.performance) : Date.now; - - /** - * changes scroll position inside an element - * @method scrollElement - * @param {Number} x - * @param {Number} y - */ - function scrollElement(x, y) { - this.scrollLeft = x; - this.scrollTop = y; - } - - /** - * returns result of applying ease math function to a number - * @method ease - * @param {Number} k - * @returns {Number} - */ - function ease(k) { - return 0.5 * (1 - Math.cos(Math.PI * k)); - } - - /** - * indicates if a smooth behavior should be applied - * @method shouldBailOut - * @param {Number|Object} x - * @returns {Boolean} - */ - function shouldBailOut(x) { - if (typeof x !== 'object' - || x.behavior === undefined - || x.behavior === 'auto' - || x.behavior === 'instant') { - // first arg not an object, or behavior is auto, instant or undefined - return true; - } - - if (typeof x === 'object' - && x.behavior === 'smooth') { - // first argument is an object and behavior is smooth - return false; - } - - // throw error when behavior is not supported - throw new TypeError('behavior not valid'); - } - - /** - * finds scrollable parent of an element - * @method findScrollableParent - * @param {Node} el - * @returns {Node} el - */ - function findScrollableParent(el) { - do { - el = el.parentNode; - } while (el !== d.body - && !(el.clientHeight < el.scrollHeight - || el.clientWidth < el.scrollWidth)); - - return el; - } - - /** - * self invoked function that, given a context, steps through scrolling - * @method step - * @param {Object} context - */ - function step(context) { - // call method again on next available frame - context.frame = w.requestAnimationFrame(step.bind(w, context)); - - var time = now(); - var value; - var currentX; - var currentY; - var elapsed = (time - context.startTime) / SCROLL_TIME; - - // avoid elapsed times higher than one - elapsed = elapsed > 1 ? 1 : elapsed; - - // apply easing to elapsed time - value = ease(elapsed); - - currentX = context.startX + (context.x - context.startX) * value; - currentY = context.startY + (context.y - context.startY) * value; - - context.method.call(context.scrollable, currentX, currentY); - - // return when end points have been reached - if (currentX === context.x && currentY === context.y) { - w.cancelAnimationFrame(context.frame); - return; - } - } - - /** - * scrolls window with a smooth behavior - * @method smoothScroll - * @param {Object|Node} el - * @param {Number} x - * @param {Number} y - */ - function smoothScroll(el, x, y) { - var scrollable; - var startX; - var startY; - var method; - var startTime = now(); - var frame; - - // define scroll context - if (el === d.body) { - scrollable = w; - startX = w.scrollX || w.pageXOffset; - startY = w.scrollY || w.pageYOffset; - method = original.scroll; - } else { - scrollable = el; - startX = el.scrollLeft; - startY = el.scrollTop; - method = scrollElement; - } - - // cancel frame when a scroll event's happening - if (frame) { - w.cancelAnimationFrame(frame); - } - - // scroll looping over a frame - step({ - scrollable: scrollable, - method: method, - startTime: startTime, - startX: startX, - startY: startY, - x: x, - y: y, - frame: frame - }); - } - - /* - * ORIGINAL METHODS OVERRIDES - */ - - // w.scroll and w.scrollTo - w.scroll = w.scrollTo = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scroll.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left, - ~~arguments[0].top - ); - }; - - // w.scrollBy - w.scrollBy = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollBy.call( - w, - arguments[0].left || arguments[0], - arguments[0].top || arguments[1] - ); - return; - } - - // LET THE SMOOTHNESS BEGIN! - smoothScroll.call( - w, - d.body, - ~~arguments[0].left + (w.scrollX || w.pageXOffset), - ~~arguments[0].top + (w.scrollY || w.pageYOffset) - ); - }; - - // Element.prototype.scrollIntoView - Element.prototype.scrollIntoView = function() { - // avoid smooth behavior if not required - if (shouldBailOut(arguments[0])) { - original.scrollIntoView.call(this, arguments[0] || true); - return; - } - - // LET THE SMOOTHNESS BEGIN! - var scrollableParent = findScrollableParent(this); - var parentRects = scrollableParent.getBoundingClientRect(); - var clientRects = this.getBoundingClientRect(); - - if (scrollableParent !== d.body) { - // reveal element inside parent - smoothScroll.call( - this, - scrollableParent, - scrollableParent.scrollLeft + clientRects.left - parentRects.left, - scrollableParent.scrollTop + clientRects.top - parentRects.top - ); - // reveal parent in viewport - w.scrollBy({ - left: parentRects.left, - top: parentRects.top, - behavior: 'smooth' - }); - } else { - // reveal element in viewport - w.scrollBy({ - left: clientRects.left, - top: clientRects.top, - behavior: 'smooth' - }); - } - }; - } - - if (typeof exports === 'object') { - // commonjs - module.exports = { polyfill: polyfill }; - } else { - // global - polyfill(); - } -})(window, document); -;// Spectrum Colorpicker v1.1.2 -// https://github.com/bgrins/spectrum -// Author: Brian Grinstead -// License: MIT - -(function (window, $, undefined) { - var defaultOpts = { - - // Callbacks - beforeShow: noop, - move: noop, - change: noop, - show: noop, - hide: noop, - - // Options - color: false, - flat: false, - showInput: false, - showButtons: true, - clickoutFiresChange: false, - showInitial: false, - showPalette: false, - showPaletteOnly: false, - showSelectionPalette: true, - localStorageKey: false, - appendTo: "body", - maxSelectionSize: 7, - cancelText: "cancel", - chooseText: "choose", - preferredFormat: false, - className: "", - showAlpha: false, - theme: "sp-light", - palette: ['fff', '000'], - selectionPalette: [], - disabled: false - }, - spectrums = [], - IE = !!/msie/i.exec( window.navigator.userAgent ), - rgbaSupport = (function() { - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - var elem = document.createElement('div'); - var style = elem.style; - style.cssText = 'background-color:rgba(0,0,0,.5)'; - return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); - })(), - replaceInput = [ - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              " - ].join(''), - markup = (function () { - - // IE does not support gradients with multiple stops, so we need to simulate - // that for the rainbow slider with 8 divs that each have a single gradient - var gradientFix = ""; - if (IE) { - for (var i = 1; i <= 6; i++) { - gradientFix += "
                                                              "; - } - } - - return [ - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - gradientFix, - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "", - "
                                                              ", - "
                                                              ", - "
                                                              ", - "", - "", - "
                                                              ", - "
                                                              ", - "
                                                              " - ].join(""); - })(); - - function paletteTemplate (p, color, className) { - var html = []; - for (var i = 0; i < p.length; i++) { - var tiny = tinycolor(p[i]); - var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; - c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : ""; - - var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); - html.push(''); - } - return "
                                                              " + html.join('') + "
                                                              "; - } - - function hideAll() { - for (var i = 0; i < spectrums.length; i++) { - if (spectrums[i]) { - spectrums[i].hide(); - } - } - } - - function instanceOptions(o, callbackContext) { - var opts = $.extend({}, defaultOpts, o); - opts.callbacks = { - 'move': bind(opts.move, callbackContext), - 'change': bind(opts.change, callbackContext), - 'show': bind(opts.show, callbackContext), - 'hide': bind(opts.hide, callbackContext), - 'beforeShow': bind(opts.beforeShow, callbackContext) - }; - - return opts; - } - - function spectrum(element, o) { - - var opts = instanceOptions(o, element), - flat = opts.flat, - showSelectionPalette = opts.showSelectionPalette, - localStorageKey = opts.localStorageKey, - theme = opts.theme, - callbacks = opts.callbacks, - resize = throttle(reflow, 10), - visible = false, - dragWidth = 0, - dragHeight = 0, - dragHelperHeight = 0, - slideHeight = 0, - slideWidth = 0, - alphaWidth = 0, - alphaSlideHelperWidth = 0, - slideHelperHeight = 0, - currentHue = 0, - currentSaturation = 0, - currentValue = 0, - currentAlpha = 1, - palette = opts.palette.slice(0), - paletteArray = $.isArray(palette[0]) ? palette : [palette], - selectionPalette = opts.selectionPalette.slice(0), - maxSelectionSize = opts.maxSelectionSize, - draggingClass = "sp-dragging", - shiftMovementDirection = null; - - var doc = element.ownerDocument, - body = doc.body, - boundElement = $(element), - disabled = false, - container = $(markup, doc).addClass(theme), - dragger = container.find(".sp-color"), - dragHelper = container.find(".sp-dragger"), - slider = container.find(".sp-hue"), - slideHelper = container.find(".sp-slider"), - alphaSliderInner = container.find(".sp-alpha-inner"), - alphaSlider = container.find(".sp-alpha"), - alphaSlideHelper = container.find(".sp-alpha-handle"), - textInput = container.find(".sp-input"), - paletteContainer = container.find(".sp-palette"), - initialColorContainer = container.find(".sp-initial"), - cancelButton = container.find(".sp-cancel"), - chooseButton = container.find(".sp-choose"), - isInput = boundElement.is("input"), - shouldReplace = isInput && !flat, - replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), - offsetElement = (shouldReplace) ? replacer : boundElement, - previewElement = replacer.find(".sp-preview-inner"), - initialColor = opts.color || (isInput && boundElement.val()), - colorOnShow = false, - preferredFormat = opts.preferredFormat, - currentPreferredFormat = preferredFormat, - clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange; - - - function applyOptions() { - - if (opts.showPaletteOnly) { - opts.showPalette = true; - } - - container.toggleClass("sp-flat", flat); - container.toggleClass("sp-input-disabled", !opts.showInput); - container.toggleClass("sp-alpha-enabled", opts.showAlpha); - container.toggleClass("sp-buttons-disabled", !opts.showButtons); - container.toggleClass("sp-palette-disabled", !opts.showPalette); - container.toggleClass("sp-palette-only", opts.showPaletteOnly); - container.toggleClass("sp-initial-disabled", !opts.showInitial); - container.addClass(opts.className); - - reflow(); - } - - function initialize() { - - if (IE) { - container.find("*:not(input)").attr("unselectable", "on"); - } - - applyOptions(); - - if (shouldReplace) { - boundElement.after(replacer).hide(); - } - - if (flat) { - boundElement.after(container).hide(); - } - else { - - var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); - if (appendTo.length !== 1) { - appendTo = $("body"); - } - - appendTo.append(container); - } - - if (localStorageKey && window.localStorage) { - - // Migrate old palettes over to new format. May want to remove this eventually. - try { - var oldPalette = window.localStorage[localStorageKey].split(",#"); - if (oldPalette.length > 1) { - delete window.localStorage[localStorageKey]; - $.each(oldPalette, function(i, c) { - addColorToSelectionPalette(c); - }); - } - } - catch(e) { } - - try { - selectionPalette = window.localStorage[localStorageKey].split(";"); - } - catch (e) { } - } - - offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { - if (!disabled) { - toggle(); - } - - e.stopPropagation(); - - if (!$(e.target).is("input")) { - e.preventDefault(); - } - }); - - if(boundElement.is(":disabled") || (opts.disabled === true)) { - disable(); - } - - // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); - - // Handle user typed input - textInput.change(setFromTextInput); - textInput.bind("paste", function () { - setTimeout(setFromTextInput, 1); - }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); - - cancelButton.text(opts.cancelText); - cancelButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - hide("cancel"); - }); - - chooseButton.text(opts.chooseText); - chooseButton.bind("click.spectrum", function (e) { - e.stopPropagation(); - e.preventDefault(); - - if (isValid()) { - updateOriginalInput(true); - hide(); - } - }); - - draggable(alphaSlider, function (dragX, dragY, e) { - currentAlpha = (dragX / alphaWidth); - if (e.shiftKey) { - currentAlpha = Math.round(currentAlpha * 10) / 10; - } - - move(); - }); - - draggable(slider, function (dragX, dragY) { - currentHue = parseFloat(dragY / slideHeight); - move(); - }, dragStart, dragStop); - - draggable(dragger, function (dragX, dragY, e) { - - // shift+drag should snap the movement to either the x or y axis. - if (!e.shiftKey) { - shiftMovementDirection = null; - } - else if (!shiftMovementDirection) { - var oldDragX = currentSaturation * dragWidth; - var oldDragY = dragHeight - (currentValue * dragHeight); - var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); - - shiftMovementDirection = furtherFromX ? "x" : "y"; - } - - var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; - var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; - - if (setSaturation) { - currentSaturation = parseFloat(dragX / dragWidth); - } - if (setValue) { - currentValue = parseFloat((dragHeight - dragY) / dragHeight); - } - - move(); - - }, dragStart, dragStop); - - if (!!initialColor) { - set(initialColor); - - // In case color was black - update the preview UI and set the format - // since the set function will not run (default color is black). - updateUI(); - currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; - - addColorToSelectionPalette(initialColor); - } - else { - updateUI(); - } - - if (flat) { - show(); - } - - function palletElementClick(e) { - if (e.data && e.data.ignore) { - set($(this).data("color")); - move(); - } - else { - set($(this).data("color")); - updateOriginalInput(true); - move(); - hide(); - } - - return false; - } - - var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; - paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); - initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); - } - - function addColorToSelectionPalette(color) { - if (showSelectionPalette) { - var colorRgb = tinycolor(color).toRgbString(); - if ($.inArray(colorRgb, selectionPalette) === -1) { - selectionPalette.push(colorRgb); - while(selectionPalette.length > maxSelectionSize) { - selectionPalette.shift(); - } - } - - if (localStorageKey && window.localStorage) { - try { - window.localStorage[localStorageKey] = selectionPalette.join(";"); - } - catch(e) { } - } - } - } - - function getUniqueSelectionPalette() { - var unique = []; - var p = selectionPalette; - var paletteLookup = {}; - var rgb; - - if (opts.showPalette) { - - for (var i = 0; i < paletteArray.length; i++) { - for (var j = 0; j < paletteArray[i].length; j++) { - rgb = tinycolor(paletteArray[i][j]).toRgbString(); - paletteLookup[rgb] = true; - } - } - - for (i = 0; i < p.length; i++) { - rgb = tinycolor(p[i]).toRgbString(); - - if (!paletteLookup.hasOwnProperty(rgb)) { - unique.push(p[i]); - paletteLookup[rgb] = true; - } - } - } - - return unique.reverse().slice(0, opts.maxSelectionSize); - } - - function drawPalette() { - - var currentColor = get(); - - var html = $.map(paletteArray, function (palette, i) { - return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); - }); - - if (selectionPalette) { - html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); - } - - paletteContainer.html(html.join("")); - } - - function drawInitial() { - if (opts.showInitial) { - var initial = colorOnShow; - var current = get(); - initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); - } - } - - function dragStart() { - if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { - reflow(); - } - container.addClass(draggingClass); - shiftMovementDirection = null; - } - - function dragStop() { - container.removeClass(draggingClass); - } - - function setFromTextInput() { - var tiny = tinycolor(textInput.val()); - if (tiny.ok) { - set(tiny); - } - else { - textInput.addClass("sp-validation-error"); - } - } - - function toggle() { - if (visible) { - hide(); - } - else { - show(); - } - } - - function show() { - var event = $.Event('beforeShow.spectrum'); - - if (visible) { - reflow(); - return; - } - - colorOnShow = get(); - boundElement.trigger(event, [ colorOnShow ]); - - if (callbacks.beforeShow(colorOnShow) === false || event.isDefaultPrevented()) { - return; - } - - // if color has changed - set(colorOnShow); - - hideAll(); - visible = true; - - $(doc).bind("mousedown.spectrum", onMousedown); - - if (!flat) { - // Piskel-specific : change the color as soon as the user does a mouseup - $(doc).bind("mouseup.spectrum", updateColor); - } - - $(window).bind("resize.spectrum", resize); - replacer.addClass("sp-active"); - container.removeClass("sp-hidden"); - - if (opts.showPalette) { - drawPalette(); - } - reflow(); - updateUI(); - - drawInitial(); - callbacks.show(colorOnShow); - boundElement.trigger('show.spectrum', [ colorOnShow ]); - } - - function onMousedown (e) { - var target = $(e.target); - var parents = target.parents(); - var isClickOutsideWidget = !parents.is(container) && !target.is(container); - - if (isClickOutsideWidget) { - hide(e); - } - } - - // Piskel-specific (code extracted to method) - function updateColor(e) { - var colorHasChanged = !tinycolor.equals(get(), colorOnShow); - - if (colorHasChanged) { - if (clickoutFiresChange && e !== "cancel") { - updateOriginalInput(true); - } - else { - revert(); - } - } - } - - function hide(e) { - - // Return on right click - if (e && e.type == "click" && e.button == 2) { return; } - - // Return if hiding is unnecessary - if (!visible || flat) { return; } - visible = false; - - $(doc).unbind("mousedown.spectrum", onMousedown); - - // Piskel-specific - $(doc).unbind("mouseup.spectrum", updateColor); - - $(window).unbind("resize.spectrum", resize); - - replacer.removeClass("sp-active"); - container.addClass("sp-hidden"); - - updateColor(e); - - // Piskel-specific - addColorToSelectionPalette(get()); - - callbacks.hide(get()); - boundElement.trigger('hide.spectrum', [ get() ]); - } - - function revert() { - set(colorOnShow, true); - } - - function set(color, ignoreFormatChange) { - if (tinycolor.equals(color, get())) { - return; - } - - var newColor = tinycolor(color); - var newHsv = newColor.toHsv(); - - currentHue = (newHsv.h % 360) / 360; - currentSaturation = newHsv.s; - currentValue = newHsv.v; - currentAlpha = newHsv.a; - - updateUI(); - - if (newColor.ok && !ignoreFormatChange) { - currentPreferredFormat = preferredFormat || newColor.format; - } - } - - function get(opts) { - opts = opts || { }; - return tinycolor.fromRatio({ - h: currentHue, - s: currentSaturation, - v: currentValue, - a: Math.round(currentAlpha * 100) / 100 - }, { format: opts.format || currentPreferredFormat }); - } - - function isValid() { - return !textInput.hasClass("sp-validation-error"); - } - - function move() { - updateUI(); - - callbacks.move(get()); - boundElement.trigger('move.spectrum', [ get() ]); - } - - function updateUI() { - - textInput.removeClass("sp-validation-error"); - - updateHelperLocations(); - - // Update dragger background color (gradients take care of saturation and value). - var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); - dragger.css("background-color", flatColor.toHexString()); - - // Get a format that alpha will be included in (hex and names ignore alpha) - var format = currentPreferredFormat; - if (currentAlpha < 1) { - if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { - format = "rgb"; - } - } - - var realColor = get({ format: format }), - realHex = realColor.toHexString(), - realRgb = realColor.toRgbString(); - - // Update the replaced elements background color (with actual selected color) - if (rgbaSupport || realColor.alpha === 1) { - previewElement.css("background-color", realRgb); - } - else { - previewElement.css("background-color", "transparent"); - previewElement.css("filter", realColor.toFilter()); - } - - if (opts.showAlpha) { - var rgb = realColor.toRgb(); - rgb.a = 0; - var realAlpha = tinycolor(rgb).toRgbString(); - var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; - - if (IE) { - alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); - } - else { - alphaSliderInner.css("background", "-webkit-" + gradient); - alphaSliderInner.css("background", "-moz-" + gradient); - alphaSliderInner.css("background", "-ms-" + gradient); - alphaSliderInner.css("background", gradient); - } - } - - // Update the text entry input as it changes happen - if (opts.showInput) { - var displayFormat = pskl.UserSettings.get(pskl.UserSettings.COLOR_FORMAT); - textInput.val(realColor.toString(displayFormat)); - } - - if (opts.showPalette) { - drawPalette(); - } - - drawInitial(); - } - - function updateHelperLocations() { - var s = currentSaturation; - var v = currentValue; - - // Where to show the little circle in that displays your current selected color - var dragX = s * dragWidth; - var dragY = (dragHeight) - (v * dragHeight); - dragX = Math.max( - -dragHelperHeight/2, - Math.min(dragWidth - dragHelperHeight/2, dragX - dragHelperHeight/2) - ); - dragY = Math.max( - -dragHelperHeight/2, - Math.min(dragHeight - dragHelperHeight/2, dragY - dragHelperHeight/2) - ); - dragHelper.css({ - "top": dragY, - "left": dragX - }); - - var alphaX = currentAlpha * alphaWidth; - alphaSlideHelper.css({ - "left": alphaX - (alphaSlideHelperWidth / 2) - }); - - // Where to show the bar that displays your current selected hue - var slideY = (currentHue) * slideHeight; - slideHelper.css({ - "top": slideY - (slideHelperHeight/2) - }); - } - - function updateOriginalInput(fireCallback) { - var color = get(); - - if (isInput) { - boundElement.val(color.toString(currentPreferredFormat)); - } - - var hasChanged = !tinycolor.equals(color, colorOnShow); - colorOnShow = color; - - // Update the selection palette with the current color - - // Piskel-specific : commented-out, palette update is done on hide - // addColorToSelectionPalette(color); - - if (fireCallback && hasChanged) { - callbacks.change(color); - boundElement.trigger('change', [ color ]); - } - } - - function reflow() { - dragWidth = dragger.width(); - dragHeight = dragger.height(); - dragHelperHeight = dragHelper.height() + 4; - slideWidth = slider.width(); - slideHeight = slider.height(); - slideHelperHeight = slideHelper.height() + 4; - alphaWidth = alphaSlider.width(); - alphaSlideHelperWidth = alphaSlideHelper.width(); - - if (!flat) { - container.css("position", "absolute"); - container.offset(getOffset(container, offsetElement)); - } - - updateHelperLocations(); - } - - function destroy() { - boundElement.show(); - offsetElement.unbind("click.spectrum touchstart.spectrum"); - container.remove(); - replacer.remove(); - spectrums[spect.id] = null; - } - - function option(optionName, optionValue) { - if (optionName === undefined) { - return $.extend({}, opts); - } - if (optionValue === undefined) { - return opts[optionName]; - } - - opts[optionName] = optionValue; - applyOptions(); - } - - function enable() { - disabled = false; - boundElement.attr("disabled", false); - offsetElement.removeClass("sp-disabled"); - } - - function disable() { - hide(); - disabled = true; - boundElement.attr("disabled", true); - offsetElement.addClass("sp-disabled"); - } - - initialize(); - - var spect = { - show: show, - hide: hide, - toggle: toggle, - reflow: reflow, - option: option, - enable: enable, - disable: disable, - set: function (c) { - set(c); - updateOriginalInput(); - }, - get: get, - destroy: destroy, - container: container - }; - - spect.id = spectrums.push(spect) - 1; - - return spect; - } - - /** - * checkOffset - get the offset below/above and left/right element depending on screen position - * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js - */ - function getOffset(picker, input) { - var extraY = 0; - var dpWidth = picker.outerWidth(); - var dpHeight = picker.outerHeight(); - var inputHeight = input.outerHeight(); - var doc = picker[0].ownerDocument; - var docElem = doc.documentElement; - var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); - var viewHeight = docElem.clientHeight + $(doc).scrollTop(); - var offset = input.offset(); - offset.top += inputHeight; - - if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) { - offset.left -= Math.abs(offset.left + dpWidth - viewWidth); - picker.attr('data-x-position','right'); - } else { - offset.left -= 0; - picker.attr('data-x-position','left'); - } - - if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) { - offset.top -= Math.abs(dpHeight + inputHeight - extraY); - picker.attr('data-y-position','top'); - } else { - offset.top -= extraY; - picker.attr('data-y-position','bottom'); - } - - return offset; - } - - /** - * noop - do nothing - */ - function noop() { - - } - - /** - * stopPropagation - makes the code only doing this a little easier to read in line - */ - function stopPropagation(e) { - e.stopPropagation(); - } - - /** - * Create a function bound to a given object - * Thanks to underscore.js - */ - function bind(func, obj) { - var slice = Array.prototype.slice; - var args = slice.call(arguments, 2); - return function () { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - } - - /** - * Lightweight drag helper. Handles containment within the element, so that - * when dragging, the x is within [0,element.width] and y is within [0,element.height] - */ - function draggable(element, onmove, onstart, onstop) { - onmove = onmove || function () { }; - onstart = onstart || function () { }; - onstop = onstop || function () { }; - var doc = element.ownerDocument || document; - var dragging = false; - var offset = {}; - var maxHeight = 0; - var maxWidth = 0; - var hasTouch = ('ontouchstart' in window); - - var duringDragEvents = {}; - duringDragEvents["selectstart"] = prevent; - duringDragEvents["dragstart"] = prevent; - duringDragEvents["touchmove mousemove"] = move; - duringDragEvents["touchend mouseup"] = stop; - - function prevent(e) { - if (e.stopPropagation) { - e.stopPropagation(); - } - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = false; - } - - function move(e) { - if (dragging) { - // Mouseup happened outside of window - if (IE && document.documentMode < 9 && !e.button) { - return stop(); - } - - var touches = e.originalEvent.touches; - var pageX = touches ? touches[0].pageX : e.pageX; - var pageY = touches ? touches[0].pageY : e.pageY; - - var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); - var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); - - if (hasTouch) { - // Stop scrolling in iOS - prevent(e); - } - - onmove.apply(element, [dragX, dragY, e]); - } - } - function start(e) { - var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); - var touches = e.originalEvent.touches; - - if (!rightclick && !dragging) { - if (onstart.apply(element, arguments) !== false) { - dragging = true; - maxHeight = $(element).height(); - maxWidth = $(element).width(); - offset = $(element).offset(); - - $(doc).bind(duringDragEvents); - $(doc.body).addClass("sp-dragging"); - - if (!hasTouch) { - move(e); - } - - prevent(e); - } - } - } - function stop() { - if (dragging) { - $(doc).unbind(duringDragEvents); - $(doc.body).removeClass("sp-dragging"); - onstop.apply(element, arguments); - } - dragging = false; - } - - $(element).bind("touchstart mousedown", start); - } - - function throttle(func, wait, debounce) { - var timeout; - return function () { - var context = this, args = arguments; - var throttler = function () { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - } - - - function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} - - /** - * Define a jQuery plugin - */ - var dataID = "spectrum.id"; - $.fn.spectrum = function (opts, extra) { - - if (typeof opts == "string") { - - var returnValue = this; - var args = Array.prototype.slice.call( arguments, 1 ); - - this.each(function () { - var spect = spectrums[$(this).data(dataID)]; - if (spect) { - - var method = spect[opts]; - if (!method) { - throw new Error( "Spectrum: no such method: '" + opts + "'" ); - } - - if (opts == "get") { - returnValue = spect.get(); - } - else if (opts == "container") { - returnValue = spect.container; - } - else if (opts == "option") { - returnValue = spect.option.apply(spect, args); - } - else if (opts == "destroy") { - spect.destroy(); - $(this).removeData(dataID); - } - else { - method.apply(spect, args); - } - } - }); - - return returnValue; - } - - // Initializing a new instance of spectrum - return this.spectrum("destroy").each(function () { - var spect = spectrum(this, opts); - $(this).data(dataID, spect.id); - }); - }; - - $.fn.spectrum.load = true; - $.fn.spectrum.loadOpts = {}; - $.fn.spectrum.draggable = draggable; - $.fn.spectrum.defaults = defaultOpts; - - $.spectrum = { }; - $.spectrum.localization = { }; - $.spectrum.palettes = { }; - - $.fn.spectrum.processNativeColorInputs = function () { - var colorInput = $("")[0]; - var supportsColor = colorInput.type === "color" && colorInput.value != "!"; - - if (!supportsColor) { - $("input[type=color]").spectrum({ - preferredFormat: "hex6" - }); - } - }; - - // TinyColor v0.9.16 - // https://github.com/bgrins/TinyColor - // 2013-08-10, Brian Grinstead, MIT License - - (function() { - - var trimLeft = /^[\s,#]+/, - trimRight = /\s+$/, - tinyCounter = 0, - math = Math, - mathRound = math.round, - mathMin = math.min, - mathMax = math.max, - mathRandom = math.random; - - function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { - return color; - } - - var rgb = inputToRGB(color); - var r = rgb.r, - g = rgb.g, - b = rgb.b, - a = rgb.a, - roundA = mathRound(100*a) / 100, - format = opts.format || rgb.format; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (r < 1) { r = mathRound(r); } - if (g < 1) { g = mathRound(g); } - if (b < 1) { b = mathRound(b); } - - return { - ok: rgb.ok, - format: format, - _tc_id: tinyCounter++, - alpha: a, - getAlpha: function() { - return a; - }, - setAlpha: function(value) { - a = boundAlpha(value); - roundA = mathRound(100*a) / 100; - }, - toHsv: function() { - var hsv = rgbToHsv(r, g, b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(r, g, b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(r, g, b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; - }, - toHslString: function() { - var hsl = rgbToHsl(r, g, b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(r, g, b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + rgbToHex(r, g, b, allow3Char); - }, - toRgb: function() { - return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; - }, - toRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : - "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; - }, - toPercentageRgbString: function() { - return (a == 1) ? - "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; - }, - toName: function() { - if (a === 0) { - return "transparent"; - } - - return hexNames[rgbToHex(r, g, b, true)] || false; - }, - toFilter: function(secondColor) { - var hex = rgbToHex(r, g, b); - var secondHex = hex; - var alphaHex = Math.round(parseFloat(a) * 255).toString(16); - var secondAlphaHex = alphaHex; - var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex = s.toHex(); - secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this.format; - - var formattedString = false; - var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; - var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); - - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - if (formatWithAlpha) { - return this.toRgbString(); - } - - return formattedString || this.toHexString(); - } - }; - } - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { - color.s = convertToPercentage(color.s); - color.v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, color.s, color.v); - ok = true; - format = "hsv"; - } - else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { - color.s = convertToPercentage(color.s); - color.l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, color.s, color.l); - ok = true; - format = "hsl"; - } - - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; - } - - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; - - var d = max - min; - s = max === 0 ? 0 : d / max; - - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - return { h: h, s: s, v: v }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); - }; - - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - tinycolor.desaturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.saturate = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - }; - tinycolor.greyscale = function(color) { - return tinycolor.desaturate(color, 100); - }; - tinycolor.lighten = function(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.darken = function (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - }; - tinycolor.complement = function(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - }; - - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - tinycolor.triad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.tetrad = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - tinycolor.splitcomplement = function(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; - }; - tinycolor.analogous = function(color, results, slices) { - results = results || 6; - slices = slices || 30; - - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - }; - tinycolor.monochromatic = function(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; - - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; - } - - return ret; - }; - - - // Readability Functions - // --------------------- - // - - // `readability` - // Analyze the 2 colors and returns an object with the following properties: - // `brightness`: difference in brightness between the two colors - // `color`: difference in color/hue between the two colors - tinycolor.readability = function(color1, color2) { - var a = tinycolor(color1).toRgb(); - var b = tinycolor(color2).toRgb(); - var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; - var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; - var colorDiff = ( - Math.max(a.r, b.r) - Math.min(a.r, b.r) + - Math.max(a.g, b.g) - Math.min(a.g, b.g) + - Math.max(a.b, b.b) - Math.min(a.b, b.b) - ); - - return { - brightness: Math.abs(brightnessA - brightnessB), - color: colorDiff - }; - }; - - // `readable` - // http://www.w3.org/TR/AERT#color-contrast - // Ensure that foreground and background color combinations provide sufficient contrast. - // *Example* - // tinycolor.readable("#000", "#111") => false - tinycolor.readable = function(color1, color2) { - var readability = tinycolor.readability(color1, color2); - return readability.brightness > 125 && readability.color > 500; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // *Example* - // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" - tinycolor.mostReadable = function(baseColor, colorList) { - var bestColor = null; - var bestScore = 0; - var bestIsReadable = false; - for (var i=0; i < colorList.length; i++) { - - // We normalize both around the "acceptable" breaking point, - // but rank brightness constrast higher than hue. - - var readability = tinycolor.readability(baseColor, colorList[i]); - var readable = readability.brightness > 125 && readability.color > 500; - var score = 3 * (readability.brightness / 125) + (readability.color / 500); - - if ((readable && ! bestIsReadable) || - (readable && bestIsReadable && score > bestScore) || - ((! readable) && (! bestIsReadable) && score > bestScore)) { - bestIsReadable = readable; - bestScore = score; - bestColor = tinycolor(colorList[i]); - } - } - return bestColor; - }; - - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } - - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if ((math.abs(n - max) < 0.000001)) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return mathMin(1, mathMax(0, val)); - } - - // Parse an integer into hex - function parseHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; - } - - return n; - } - - var matchers = (function() { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - })(); - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseHex(match[1]), - g: parseHex(match[2]), - b: parseHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseHex(match[1] + '' + match[1]), - g: parseHex(match[2] + '' + match[2]), - b: parseHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } - - return false; - } - - // Expose tinycolor to window, does not need to run in non-browser context. - window.tinycolor = tinycolor; - - })(); - var tinycolor = window.tinycolor; - - $(function () { - if ($.fn.spectrum.load) { - $.fn.spectrum.processNativeColorInputs(); - } - }); - -})(window, jQuery); -;// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - -
                                                              -
                                                              -
                                                              -
                                                              -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                - -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                - -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                1x
                                                                -
                                                                -
                                                                Full
                                                                -
                                                                -
                                                                -
                                                                - -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                - - -
                                                                -
                                                                -
                                                                -
                                                                -
                                                                -

                                                                Layers -
                                                                -

                                                                -
                                                                - - - - - - - - - - - - -
                                                                - -
                                                                  - - -
                                                                  - -
                                                                  -

                                                                  Transform

                                                                  -
                                                                    -
                                                                    -
                                                                    -

                                                                    Palettes

                                                                    -
                                                                    - - - -
                                                                    -
                                                                    - - - - -
                                                                    - - - -
                                                                    -
                                                                    -
                                                                    - -
                                                                    -
                                                                    -
                                                                    -
                                                                    -
                                                                    - -
                                                                    -
                                                                    - -
                                                                    -
                                                                    - -
                                                                    -
                                                                    - -
                                                                    -
                                                                    - -
                                                                    -
                                                                    -
                                                                    -
                                                                    -
                                                                    -
                                                                    -
                                                                    - - -
                                                                    -
                                                                    -
                                                                    -
                                                                    - -
                                                                    - - - - - - - - - - -
                                                                    -
                                                                    - -
                                                                    - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% endraw %} \ No newline at end of file