├── .eslintignore ├── .eslintrc ├── .gitignore ├── .jsdocrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── bench ├── index.js ├── module.js └── suite.js ├── dist ├── index.html ├── psd.js ├── scripts.js └── styles.css ├── gulpfile.js ├── package.json ├── src ├── assets │ ├── index.html │ └── psd.js ├── index.js ├── styles │ ├── application.styl │ ├── base.styl │ ├── editor.styl │ ├── index.styl │ └── preview.styl ├── utils │ ├── get-layer-id.js │ ├── get-layer-offset.js │ └── get-layer-position.js └── views │ ├── application.js │ ├── editor-layer.js │ ├── editor.js │ ├── preview-highlight.js │ ├── preview-layer.js │ └── preview.js └── test ├── index.js └── module.js /.eslintignore: -------------------------------------------------------------------------------- 1 | src/assets/psd.js -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | 4 | "env": { 5 | "browser": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | 10 | "ecmaFeatures": { 11 | // Enable arrow functions 12 | "arrowFunctions": true, 13 | // Enable binary literals 14 | "binaryLiterals": true, 15 | // Enable let and const (aka block bindings) 16 | "blockBindings": true, 17 | // Enable default function parameters 18 | "defaultParams": true, 19 | // Enable for-of loops 20 | "forOf": true, 21 | // Enable generators 22 | "generators": true, 23 | // Enable computed object literal property names 24 | "objectLiteralComputedProperties": true, 25 | // Enable duplicate object literal properties in strict mode 26 | "objectLiteralDuplicateProperties": true, 27 | // Enable object literal shorthand methods 28 | "objectLiteralShorthandMethods": true, 29 | // Enable object literal shorthand properties 30 | "objectLiteralShorthandProperties": true, 31 | // Enable octal literals 32 | "octalLiterals": true, 33 | // Enable the regular expression u flag 34 | "regexUFlag": true, 35 | // Enable the regular expression y flag 36 | "regexYFlag": true, 37 | // Enable super references inside of functions 38 | "superInFunctions": true, 39 | // Enable template strings 40 | "templateStrings": true, 41 | // Enable code point escapes 42 | "unicodeCodePointEscapes": true, 43 | // Allow return statements in the global scope 44 | "globalReturn": true, 45 | // Enable JSX 46 | "jsx": true 47 | }, 48 | 49 | "rules": { 50 | // Disallow trailing commas in object literals 51 | "no-comma-dangle": 0, 52 | // Disallow assignment in conditional expressions 53 | "no-cond-assign": "except-parens", 54 | // Disallow use of console (off by default in the node environment) 55 | "no-console": 2, 56 | // Disallow use of constant expressions in conditions 57 | "no-constant-condition": 2, 58 | // Disallow control characters in regular expressions 59 | "no-control-regex": 2, 60 | // Disallow use of debugger 61 | "no-debugger": 2, 62 | // Disallow duplicate keys when creating object literals 63 | "no-dupe-keys": 2, 64 | // Disallow empty statements 65 | "no-empty": 2, 66 | // Disallow the use of empty character classes in regular expressions 67 | "no-empty-class": 2, 68 | // Disallow assigning to the exception in a catch block 69 | "no-ex-assign": 2, 70 | // Disallow double-negation boolean casts in a boolean context 71 | "no-extra-boolean-cast": 2, 72 | // Disallow unnecessary parentheses (off by default) 73 | "no-extra-parens": 0, 74 | // Disallow unnecessary semicolons 75 | "no-extra-semi": 2, 76 | // Disallow overwriting functions written as function declarations 77 | "no-func-assign": 2, 78 | // Disallow function or variable declarations in nested blocks 79 | "no-inner-declarations": [2, "functions"], 80 | // Disallow invalid regular expression strings in the RegExp constructor 81 | "no-invalid-regexp": 2, 82 | // Disallow irregular whitespace outside of strings and comments 83 | "no-irregular-whitespace": 2, 84 | // Disallow negation of the left operand of an in expression 85 | "no-negated-in-lhs": 2, 86 | // Disallow the use of object properties of the global object (Math and JSON) as functions 87 | "no-obj-calls": 2, 88 | // Disallow multiple spaces in a regular expression literal 89 | "no-regex-spaces": 2, 90 | // Disallow reserved words being used as object literal keys (off by default) 91 | "no-reserved-keys": 0, 92 | // Disallow sparse arrays 93 | "no-sparse-arrays": 2, 94 | // Disallow unreachable statements after a return, throw, continue, or break statement 95 | "no-unreachable": 2, 96 | // Disallow comparisons with the value NaN 97 | "use-isnan": 2, 98 | // Ensure JSDoc comments are valid (off by default) 99 | "valid-jsdoc": 2, 100 | // Ensure that the results of typeof are compared against a valid string 101 | "valid-typeof": 2, 102 | 103 | // Treat var statements as if they were block scoped (off by default) 104 | "block-scoped-var": 0, 105 | // Specify the maximum cyclomatic complexity allowed in a program (off by default) 106 | "complexity": [3], 107 | // Require return statements to either always or never specify values 108 | "consistent-return": 0, 109 | // Specify curly brace conventions for all control statements 110 | "curly": [2, "multi-line"], 111 | // Require default case in switch statements (off by default) 112 | "default-case": 0, 113 | // Encourages use of dot notation whenever possible 114 | "dot-notation": 2, 115 | // Require the use of === and !== 116 | "eqeqeq": 2, 117 | // Make sure for-in loops have an if statement (off by default) 118 | "guard-for-in": 0, 119 | // Disallow the use of alert, confirm, and prompt 120 | "no-alert": 2, 121 | // Disallow use of arguments.caller or arguments.callee 122 | "no-caller": 2, 123 | // Disallow division operators explicitly at beginning of regular expression (off by default) 124 | "no-div-regex": 2, 125 | // Disallow else after a return in an if (off by default) 126 | "no-else-return": 0, 127 | // Disallow use of labels for anything other then loops and switches 128 | "no-empty-label": 2, 129 | // Disallow comparisons to null without a type-checking operator (off by default) 130 | "no-eq-null": 2, 131 | // Disallow use of eval() 132 | "no-eval": 2, 133 | // Disallow adding to native types 134 | "no-extend-native": 2, 135 | // Disallow unnecessary function binding 136 | "no-extra-bind": 2, 137 | // Disallow fallthrough of case statements 138 | "no-fallthrough": 2, 139 | // Disallow the use of leading or trailing decimal points in numeric literals (off by default) 140 | "no-floating-decimal": 0, 141 | // Disallow use of eval()-like methods 142 | "no-implied-eval": 2, 143 | // Disallow usage of __iterator__ property 144 | "no-iterator": 2, 145 | // Disallow use of labeled statements 146 | "no-labels": 2, 147 | // Disallow unnecessary nested blocks 148 | "no-lone-blocks": 2, 149 | // Disallow creation of functions within loops 150 | "no-loop-func": 2, 151 | // Disallow use of multiple spaces 152 | "no-multi-spaces": 0, 153 | // Disallow use of multiline strings 154 | "no-multi-str": 2, 155 | // Disallow reassignments of native objects 156 | "no-native-reassign": 2, 157 | // Disallow use of new operator when not part of the assignment or comparison 158 | "no-new": 2, 159 | // Disallow use of new operator for Function object 160 | "no-new-func": 2, 161 | // Disallows creating new instances of String,Number, and Boolean 162 | "no-new-wrappers": 2, 163 | // Disallow use of octal literals 164 | "no-octal": 2, 165 | // Disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251"; 166 | "no-octal-escape": 2, 167 | // Disallow use of process.env (off by default) 168 | "no-process-env": 2, 169 | // Disallow usage of __proto__ property 170 | "no-proto": 2, 171 | // Disallow declaring the same variable more then once 172 | "no-redeclare": 2, 173 | // Disallow use of assignment in return statement 174 | "no-return-assign": 2, 175 | // Disallow use of javascript: urls. 176 | "no-script-url": 2, 177 | // Disallow comparisons where both sides are exactly the same (off by default) 178 | "no-self-compare": 2, 179 | // Disallow use of comma operator 180 | "no-sequences": 2, 181 | // Disallow usage of expressions in statement position 182 | "no-unused-expressions": 0, 183 | // Disallow use of void operator (off by default) 184 | "no-void": 2, 185 | // Disallow usage of configurable warning terms in commentse.g. TODO or FIXME (off by default) 186 | "no-warning-comments": [1, { "terms":[ "FIXME", "REVIEW" ], "location":"start" }], 187 | // Disallow use of the with statement 188 | "no-with": 2, 189 | // Require use of the second argument for parseInt() (off by default) 190 | "radix": 2, 191 | // Requires to declare all vars on top of their containing scope (off by default) 192 | "vars-on-top": 0, 193 | // Require immediate function invocation to be wrapped in parentheses (off by default) 194 | "wrap-iife": [2, "inside"], 195 | // Require or disallow Yoda conditions 196 | "yoda": [0, "never"], 197 | 198 | // Require that all functions are run in strict mode 199 | "strict": 0, 200 | 201 | // Disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) 202 | "no-catch-shadow": 2, 203 | // Disallow deletion of variables 204 | "no-delete-var": 2, 205 | // Disallow labels that share a name with a variable 206 | "no-label-var": 2, 207 | // Disallow declaration of variables already declared in the outer scope 208 | "no-shadow": 2, 209 | // Disallow shadowing of names such as arguments 210 | "no-shadow-restricted-names": 2, 211 | // Disallow use of undeclared variables unless mentioned in a /*global */ block 212 | "no-undef": 2, 213 | // Disallow use of undefined when initializing variables 214 | "no-undef-init": 2, 215 | // Disallow use of undefined variable (off by default) 216 | "no-undefined": 2, 217 | // Disallow declaration of variables that are not used in the code 218 | "no-unused-vars": [2, { "vars":"local", "args":"all" }], 219 | // Disallow use of variables before they are defined 220 | "no-use-before-define": 2, 221 | 222 | // Enforces error handling in callbacks (off by default) (on by default in the node environment) 223 | "handle-callback-err": 2, 224 | // Disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) 225 | "no-mixed-requires": [2, true], 226 | // Disallow use of new operator with the require function (off by default) (on by default in the node environment) 227 | "no-new-require": 2, 228 | // Disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) 229 | "no-path-concat": 2, 230 | // Disallow process.exit() (on by default in the node environment) 231 | "no-process-exit": 2, 232 | // Restrict usage of specified node modules (off by default) 233 | "no-restricted-modules": 2, 234 | // Disallow use of synchronous methods (off by default) 235 | "no-sync": 2, 236 | 237 | // Enforce one true brace style (off by default) 238 | "brace-style": 0, 239 | // Require camel case names 240 | "camelcase": 2, 241 | // Enforce spacing before and after comma 242 | "comma-spacing": [2, { "before":false, "after":true }], 243 | // Enforce one true comma style (off by default) 244 | "comma-style": [2, "last"], 245 | // Enforces consistent naming when capturing the current execution context (off by default) 246 | "consistent-this": [2, "that"], 247 | // Enforce newline at the end of file, with no multiple empty lines 248 | "eol-last": 0, 249 | // Require function expressions to have a name (off by default) 250 | "func-names": 0, 251 | // Enforces use of function declarations or expressions (off by default) 252 | "func-style": [0, "declaration"], 253 | // Enforces spacing between keys and values in object literal properties 254 | "key-spacing": 0, 255 | // Specify the maximum depth callbacks can be nested (off by default) 256 | "max-nested-callbacks": [2, 3], 257 | // Require a capital letter for constructors 258 | "new-cap": 0, 259 | // Disallow the omission of parentheses when invoking a constructor with no arguments 260 | "new-parens": 2, 261 | // Disallow use of the Array constructor 262 | "no-array-constructor": 2, 263 | // Disallow comments inline after code (off by default) 264 | "no-inline-comments": 0, 265 | // Disallow if as the only statement in an else block (off by default) 266 | "no-lonely-if": 2, 267 | // Disallow mixed spaces and tabs for indentation 268 | "no-mixed-spaces-and-tabs": [2, "smart-tabs"], 269 | // Disallow multiple empty lines (off by default) 270 | "no-multiple-empty-lines": [2, { "max":2 }], 271 | // Disallow nested ternary expressions (off by default) 272 | "no-nested-ternary": 2, 273 | // Disallow use of the Object constructor 274 | "no-new-object": 2, 275 | // Disallow space before semicolon 276 | "no-space-before-semi": 2, 277 | // Disallow space between function identifier and application 278 | "no-spaced-func": 2, 279 | // Disallow the use of ternary operators (off by default) 280 | "no-ternary": 0, 281 | // Disallow trailing whitespace at the end of lines 282 | "no-trailing-spaces": 2, 283 | // Disallow dangling underscores in identifiers 284 | "no-underscore-dangle": 2, 285 | // Disallow wrapping of non-IIFE statements in parens 286 | "no-wrap-func": 2, 287 | // Allow just one var statement per function (off by default) 288 | "one-var": 0, 289 | // Require assignment operator shorthand where possible or prohibit it entirely (off by default) 290 | "operator-assignment": [2, "always"], 291 | // Enforce padding within blocks (off by default) 292 | "padded-blocks": [2, "never"], 293 | // Require quotes around object literal property names (off by default) 294 | "quote-props": 0, 295 | // Specify whether double or single quotes should be used 296 | "quotes": [2, "single", "avoid-escape"], 297 | // Require or disallow use of semicolons instead of ASI 298 | "semi": [2, "always"], 299 | // Sort variables within the same declaration block (off by default) 300 | "sort-vars": 0, 301 | // Require a space after certain keywords (off by default) 302 | "space-after-keywords": [2, "always"], 303 | // Require or disallow space before blocks (off by default) 304 | "space-before-blocks": [2, "always"], 305 | // Require or disallow space before function parentheses (off by default) 306 | "space-before-function-parentheses": [0, "never"], 307 | // Require or disallow spaces inside brackets (off by default) 308 | "space-in-brackets": [0, "never"], 309 | // Require or disallow spaces inside parentheses (off by default) 310 | "space-in-parens": [2, "never"], 311 | // Require spaces around operators 312 | "space-infix-ops": 0, 313 | // Require a space after return, throw, and case 314 | "space-return-throw-case": 2, 315 | // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) 316 | "space-unary-ops": [2, { "words":true, "nonwords":false }], 317 | // Require or disallow a space immediately following the // in a line comment (off by default) 318 | "spaced-line-comment": [2, "always"], 319 | // Require regex literals to be wrapped in parentheses (off by default) 320 | "wrap-regex": 0, 321 | 322 | // Require let or const instead of var (off by default) 323 | "no-var": 0, 324 | // Enforce the position of the * in generator functions (off by default) 325 | "generator-star": 0, 326 | 327 | // Specify the maximum depth that blocks can be nested (off by default) 328 | "max-depth": [2, 3], 329 | // Specify the maximum length of a line in your program (off by default) 330 | "max-len": [2, 80, 4], 331 | // Limits the number of parameters that can be used in the function declaration. (off by default) 332 | "max-params": [1, 5], 333 | // Specify the maximum number of statement allowed in a function (off by default) 334 | "max-statements": [1, 10], 335 | // Disallow use of bitwise operators (off by default) 336 | "no-bitwise": 0, 337 | // Disallow use of unary operators, ++ and -- (off by default) 338 | "no-plusplus": 0 339 | } 340 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | ~* 3 | *.tmp 4 | *.log 5 | *.bak 6 | *.orig 7 | .DS_Store 8 | tmp 9 | node_modules 10 | coverage 11 | -------------------------------------------------------------------------------- /.jsdocrc: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "source": { 4 | "include": ["./src"], 5 | "includePattern": ".+\\.js(doc)?$", 6 | "excludePattern": "(^|\\/|\\\\)_" 7 | }, 8 | 9 | "tags": { 10 | "allowUnknownTags": true 11 | }, 12 | 13 | "opts": { 14 | "recurse": true, 15 | "destination": "./docs/", 16 | "template": "./node_modules/jsdoc-baseline" 17 | }, 18 | 19 | "templates": { 20 | "cleverLinks": true, 21 | "monospaceLinks": false 22 | }, 23 | 24 | "plugins": [ 25 | "plugins/markdown" 26 | ] 27 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.11" 5 | - "0.12" 6 | - "iojs" 7 | 8 | script: make travis 9 | 10 | before_install: 11 | - npm install -g npm -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | ========= 3 | 4 | ### 0.1.0 5 | - Initial version -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015, zenoamaro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DOCS=./node_modules/.bin/jsdoc 2 | NODE=node --harmony 3 | LINT=./node_modules/.bin/eslint 4 | TEST=./node_modules/.bin/mocha --harmony 5 | TEST_DIRECT=./node_modules/.bin/_mocha 6 | COVERAGE=$(NODE) ./node_modules/.bin/istanbul 7 | BUILD=./node_modules/.bin/gulp 8 | 9 | usage: 10 | @echo BROWSER 11 | @echo - build ......... builds and optimizes browser assets. 12 | @echo - watch ......... rebuilds on file change. 13 | @echo - serve ......... serves files and rebuilds on file change. 14 | @echo - clean ......... removes the built artifacts. 15 | @echo 16 | @echo META 17 | @echo - docs .......... compiles the docs from the sources. 18 | @echo - lint .......... lints the source. 19 | @echo - test .......... runs the unit tests. 20 | @echo - test-watch .... reruns the unit tests on file change. 21 | @echo - coverage ...... runs the coverage tests. 22 | @echo - benchmarks .... runs the benchmark suites. 23 | 24 | lint: 25 | @$(LINT) src 26 | 27 | test: 28 | @$(TEST) test/index 29 | 30 | test-watch: 31 | @$(TEST) -bw -R min test/index 32 | 33 | coverage: 34 | @$(COVERAGE) cover\ 35 | $(TEST_DIRECT) -- -R dot test/index 36 | 37 | benchmarks: 38 | @$(NODE) bench/index 39 | 40 | travis: 41 | @$(LINT) src\ 42 | && $(COVERAGE) cover --report lcovonly \ 43 | $(TEST_DIRECT) -- -R dot test/index \ 44 | && $(COVERAGE) check-coverage \ 45 | --statements 80 \ 46 | --functions 80 \ 47 | --branches 80 \ 48 | --lines 80 49 | 50 | build: 51 | @$(BUILD) build 52 | 53 | watch: 54 | @$(BUILD) watch 55 | 56 | serve: 57 | @$(BUILD) serve 58 | 59 | docs: 60 | @$(DOCS) --configure .jsdocrc 61 | 62 | clean: 63 | @if [ -d coverage ]; then rm -r coverage; fi; \ 64 | if [ -d docs ]; then rm -r docs; fi; \ 65 | gulp clean 66 | 67 | .PHONY: usage lint test test-watch coverage ci-travis \ 68 | build watch serve docs clean 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | psd-viewer ![](https://travis-ci.org/zenoamaro/psd-viewer.svg?branch=master) 2 | ============================================================================ 3 | 4 | **psd-viewer** is a simple viewer for photoshop documents, based on [psd.js]. 5 | 6 | Play with the [live demo]. 7 | 8 | [psd.js]: https://github.com/meltingice/psd.js 9 | [live demo]: https://zenoamaro.github.io/psd-viewer/ 10 | 11 | 1. [Quick start](#quick-start) 12 | 2. [Building and testing](#building-and-testing) 13 | 3. [Compatibility](#compatibility) 14 | 4. [Roadmap](#roadmap) 15 | 5. [Changelog](#changelog) 16 | 6. [License](#license) 17 | 18 | 19 | Quick start 20 | ----------- 21 | git clone https://github.com/zenoamaro/psd-viewer.git 22 | cd psd-viewer/dist 23 | open index.html 24 | 25 | 26 | Building and testing 27 | -------------------- 28 | You can run the automated test suite: 29 | 30 | $ npm test 31 | 32 | And re-build the distributable version of the source: 33 | 34 | $ npm run build 35 | 36 | To run tasks in development mode simply set the environment: 37 | 38 | $ ENV=development npm run build 39 | 40 | More tasks are available on the [Makefile](Makefile), including: 41 | 42 | docs: build docs from sources 43 | lint: lints the source 44 | test: runs the test specs 45 | coverage: runs the code coverage test 46 | 47 | 48 | Compatibility 49 | ------------- 50 | Mostly untested at this stage. 51 | 52 | 53 | Roadmap 54 | ------- 55 | - Add more inspection capabilities. 56 | - Pure rendering. 57 | - Failure modes. 58 | - Tests. 59 | 60 | 61 | Changelog 62 | --------- 63 | #### v0.1.0 64 | - Initial version 65 | 66 | [Full changelog](CHANGELOG.md) 67 | 68 | 69 | License 70 | ------- 71 | The MIT License (MIT) 72 | 73 | Copyright (c) 2015, zenoamaro 74 | 75 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 76 | 77 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 78 | 79 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /bench/index.js: -------------------------------------------------------------------------------- 1 | // Run suites 2 | require('./module'); 3 | -------------------------------------------------------------------------------- /bench/module.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | var Suite = require('./suite'); 4 | var ... 5 | 6 | Suite({ 7 | 8 | 'name': '...', 9 | 10 | 'setup': function() { 11 | // ... 12 | }, 13 | 14 | '...': function() { 15 | // ... 16 | }, 17 | 18 | }); 19 | 20 | */ -------------------------------------------------------------------------------- /bench/suite.js: -------------------------------------------------------------------------------- 1 | var benchmark = require('benchmark'); 2 | var lodash = require('lodash'); 3 | 4 | // Disable compilation to allow accessing 5 | // the scope on Node. 6 | benchmark.support.decompilation = false; 7 | 8 | function header() { 9 | console.log(' ' + this.name); 10 | } 11 | 12 | function cycle(event) { 13 | console.log(' ' + event.target); 14 | } 15 | 16 | function complete() { 17 | var fastest = this.filter('fastest').pluck('name'); 18 | console.log(' Fastest is ' + fastest + '\n'); 19 | } 20 | 21 | function error(err) { 22 | throw err.target.error; 23 | } 24 | 25 | module.exports = function Suite(spec) { 26 | // Extract handlers 27 | var name = spec.name; delete spec.name; 28 | var setup = spec.setup; delete spec.setup; 29 | var teardown = spec.teardown; delete spec.teardown; 30 | // 31 | var s = new benchmark.Suite({ 32 | name: name, 33 | setup: setup, 34 | teardown: teardown, 35 | onStart: header, 36 | onCycle: cycle, 37 | onError: error, 38 | onComplete: complete 39 | }); 40 | // 41 | for (var rule in spec) { 42 | s.add(rule, spec[rule], { 43 | setup: setup, 44 | teardown: teardown 45 | }); 46 | } 47 | s.run(); 48 | }; -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PSD viewer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /dist/scripts.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};n(94);var o=r(n(20)),i=r(n(84));o.render(o.createElement(i,null),document.body)},function(e){function t(){if(!i){i=!0;for(var e,t=o.length;t;){e=o,o=[];for(var n=-1;++n1){for(var h=Array(f),m=0;f>m;m++)h[m]=arguments[m+2];c.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof c[o]&&(c[o]=v[o])}return new l(e,p,d,a.current,i.current,c)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceProps=function(e,n){var r=new l(e.type,e.key,e.ref,e._owner,e._context,n);return"production"!==t.env.NODE_ENV&&(r._store.validated=e._store.validated),r},l.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=l}).call(t,n(1))},function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(13),o=r;"production"!==t.env.NODE_ENV&&(o=function(e,t){for(var n=[],r=2,o=arguments.length;o>r;r++)n.push(arguments[r]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){var i=0;console.warn("Warning: "+t.replace(/%s/g,function(){return n[i++]}))}}),e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";var r=n(26),o=r({bubbled:null,captured:null}),i=r({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){(function(t){"use strict";function r(e){var t=e._owner||null;return t&&t.constructor&&t.constructor.displayName?" Check the render method of `"+t.constructor.displayName+"`.":""}function o(e,n,r){for(var o in n)n.hasOwnProperty(o)&&("production"!==t.env.NODE_ENV?M("function"==typeof n[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactCompositeComponent",D[r],o):M("function"==typeof n[o]))}function i(e,n){var r=U.hasOwnProperty(n)?U[n]:null;B.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?M(r===L.OVERRIDE_BASE,"ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",n):M(r===L.OVERRIDE_BASE)),e.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?M(r===L.DEFINE_MANY||r===L.DEFINE_MANY_MERGED,"ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n):M(r===L.DEFINE_MANY||r===L.DEFINE_MANY_MERGED))}function a(e){var n=e._compositeLifeCycleState;"production"!==t.env.NODE_ENV?M(e.isMounted()||n===j.MOUNTING,"replaceState(...): Can only update a mounted or mounting component."):M(e.isMounted()||n===j.MOUNTING),"production"!==t.env.NODE_ENV?M(null==h.current,"replaceState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."):M(null==h.current),"production"!==t.env.NODE_ENV?M(n!==j.UNMOUNTING,"replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component."):M(n!==j.UNMOUNTING)}function s(e,n){if(n){"production"!==t.env.NODE_ENV?M(!E.isValidFactory(n),"ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."):M(!E.isValidFactory(n)),"production"!==t.env.NODE_ENV?M(!m.isValidElement(n),"ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object."):M(!m.isValidElement(n));var r=e.prototype;n.hasOwnProperty(V)&&F.mixins(e,n.mixins);for(var o in n)if(n.hasOwnProperty(o)&&o!==V){var a=n[o];if(i(r,o),F.hasOwnProperty(o))F[o](e,a);else{var s=U.hasOwnProperty(o),u=r.hasOwnProperty(o),c=a&&a.__reactDontBind,d="function"==typeof a,f=d&&!s&&!u&&!c;if(f)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=a,r[o]=a;else if(u){var h=U[o];"production"!==t.env.NODE_ENV?M(s&&(h===L.DEFINE_MANY_MERGED||h===L.DEFINE_MANY),"ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.",h,o):M(s&&(h===L.DEFINE_MANY_MERGED||h===L.DEFINE_MANY)),h===L.DEFINE_MANY_MERGED?r[o]=l(r[o],a):h===L.DEFINE_MANY&&(r[o]=p(r[o],a))}else r[o]=a,"production"!==t.env.NODE_ENV&&"function"==typeof a&&n.displayName&&(r[o].displayName=n.displayName+"_"+o)}}}}function u(e,n){if(n)for(var r in n){var o=n[r];if(n.hasOwnProperty(r)){var i=r in F;"production"!==t.env.NODE_ENV?M(!i,'ReactCompositeComponent: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r):M(!i);var a=r in e;"production"!==t.env.NODE_ENV?M(!a,"ReactCompositeComponent: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):M(!a),e[r]=o}}}function c(e,n){return"production"!==t.env.NODE_ENV?M(e&&n&&"object"==typeof e&&"object"==typeof n,"mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"):M(e&&n&&"object"==typeof e&&"object"==typeof n),P(n,function(n,r){"production"!==t.env.NODE_ENV?M(void 0===e[r],"mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r):M(void 0===e[r]),e[r]=n}),e}function l(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);return null==n?r:null==r?n:c(n,r)}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var d=n(24),f=n(40),h=n(18),m=n(4),v=n(41),g=n(31),y=n(122),E=n(28),N=n(63),_=n(11),b=n(126),C=n(65),D=n(64),O=n(12),w=n(3),x=n(34),M=n(2),T=n(26),I=n(14),R=n(35),P=n(78),S=n(52),k=n(6),V=I({mixins:null}),L=T({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),A=[],U={mixins:L.DEFINE_MANY,statics:L.DEFINE_MANY,propTypes:L.DEFINE_MANY,contextTypes:L.DEFINE_MANY,childContextTypes:L.DEFINE_MANY,getDefaultProps:L.DEFINE_MANY_MERGED,getInitialState:L.DEFINE_MANY_MERGED,getChildContext:L.DEFINE_MANY_MERGED,render:L.DEFINE_ONCE,componentWillMount:L.DEFINE_MANY,componentDidMount:L.DEFINE_MANY,componentWillReceiveProps:L.DEFINE_MANY,shouldComponentUpdate:L.DEFINE_ONCE,componentWillUpdate:L.DEFINE_MANY,componentDidUpdate:L.DEFINE_MANY,componentWillUnmount:L.DEFINE_MANY,updateComponent:L.OVERRIDE_BASE},F={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;ns;s++)a.push(arguments[s]);if(t!==n&&null!==t)R("react_bind_warning",{component:o}),console.warn("bind(): React component methods may only be bound to the component instance. See "+o);else if(!a.length)return R("react_bind_warning",{component:o}),console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See "+o),r;var c=i.apply(r,arguments);return c.__reactBoundContext=n,c.__reactBoundMethod=e,c.__reactBoundArguments=a,c}}return r}},W=function(){};w(W.prototype,d.Mixin,N.Mixin,b.Mixin,B);var H={LifeCycle:j,Base:W,createClass:function(e){var n=function(){};n.prototype=new W,n.prototype.constructor=n,A.forEach(s.bind(null,n)),s(n,e),n.getDefaultProps&&(n.defaultProps=n.getDefaultProps()),"production"!==t.env.NODE_ENV?M(n.prototype.render,"createClass(...): Class specification must implement a `render` method."):M(n.prototype.render),"production"!==t.env.NODE_ENV&&n.prototype.componentShouldUpdate&&(R("react_component_should_update_warning",{component:e.displayName}),console.warn((e.displayName||"A component")+" has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value."));for(var r in U)n.prototype[r]||(n.prototype[r]=null);return E.wrapFactory("production"!==t.env.NODE_ENV?v.createFactory(n):m.createFactory(n))},injection:{injectMixin:function(e){A.push(e)}}};e.exports=H}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){var t=_(e);return t&&A.getID(t)}function o(e){var n=i(e);if(n)if(T.hasOwnProperty(n)){var r=T[n];r!==e&&("production"!==t.env.NODE_ENV?C(!u(r,n),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",M,n):C(!u(r,n)),T[n]=e)}else T[n]=e;return n}function i(e){return e&&e.getAttribute&&e.getAttribute(M)||""}function a(e,t){var n=i(e);n!==t&&delete T[n],e.setAttribute(M,t),T[t]=e}function s(e){return T.hasOwnProperty(e)&&u(T[e],e)||(T[e]=A.findReactNodeByID(e)),T[e]}function u(e,n){if(e){"production"!==t.env.NODE_ENV?C(i(e)===n,"ReactMount: Unexpected modification of `%s`",M):C(i(e)===n);var r=A.findReactContainerForID(n);if(r&&E(r,e))return!0}return!1}function c(e){delete T[e]}function l(e){var t=T[e];return t&&u(t,e)?void(L=t):!1}function p(e){L=null,g.traverseAncestors(e,l);var t=L;return L=null,t}var d=n(17),f=n(23),h=n(18),m=n(4),v=n(28),g=n(25),y=n(11),E=n(71),N=n(44),_=n(75),b=n(34),C=n(2),D=n(52),O=n(6),w=v.wrapCreateElement(m.createElement),x=g.SEPARATOR,M=d.ID_ATTRIBUTE_NAME,T={},I=1,R=9,P={},S={};if("production"!==t.env.NODE_ENV)var k={};var V=[],L=null,A={_instancesByReactRootID:P,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,n,o,i){var a=n.props;return A.scrollMonitor(o,function(){e.replaceProps(a,i)}),"production"!==t.env.NODE_ENV&&(k[r(o)]=_(o)),e},_registerComponent:function(e,n){"production"!==t.env.NODE_ENV?C(n&&(n.nodeType===I||n.nodeType===R),"_registerComponent(...): Target container is not a DOM element."):C(n&&(n.nodeType===I||n.nodeType===R)),f.ensureScrollValueMonitoring();var r=A.registerContainer(n);return P[r]=e,r},_renderNewRootComponent:y.measure("ReactMount","_renderNewRootComponent",function(e,n,r){"production"!==t.env.NODE_ENV?O(null==h.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var o=b(e,null),i=A._registerComponent(o,n);return o.mountComponentIntoNode(i,n,r),"production"!==t.env.NODE_ENV&&(k[i]=_(n)),o}),render:function(e,n,o){"production"!==t.env.NODE_ENV?C(m.isValidElement(e),"renderComponent(): Invalid component element.%s","string"==typeof e?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":v.isValidFactory(e)?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"undefined"!=typeof e.props?" This may be caused by unintentionally loading two independent copies of React.":""):C(m.isValidElement(e));var i=P[r(n)];if(i){var a=i._currentElement;if(D(a,e))return A._updateRootComponent(i,e,n,o);A.unmountComponentAtNode(n)}var s=_(n),u=s&&A.isRenderedByReact(s),c=u&&!i,l=A._renderNewRootComponent(e,n,c);return o&&o.call(l),l},constructAndRenderComponent:function(e,t,n){var r=w(e,t);return A.render(r,n)},constructAndRenderComponentByID:function(e,n,r){var o=document.getElementById(r);return"production"!==t.env.NODE_ENV?C(o,'Tried to get element with id of "%s" but it is not present on the page.',r):C(o),A.constructAndRenderComponent(e,n,o)},registerContainer:function(e){var t=r(e);return t&&(t=g.getReactRootIDFromNodeID(t)),t||(t=g.createReactRootID()),S[t]=e,t},unmountComponentAtNode:function(e){"production"!==t.env.NODE_ENV?O(null==h.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var n=r(e),o=P[n];return o?(A.unmountComponentFromNode(o,e),delete P[n],delete S[n],"production"!==t.env.NODE_ENV&&delete k[n],!0):!1},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===R&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var n=g.getReactRootIDFromNodeID(e),r=S[n];if("production"!==t.env.NODE_ENV){var o=k[n];if(o&&o.parentNode!==r){"production"!==t.env.NODE_ENV?C(i(o)===n,"ReactMount: Root element ID differed from reactRootID."):C(i(o)===n);var a=r.firstChild;a&&n===i(a)?k[n]=a:console.warn("ReactMount: Root element has been removed from its original container. New container:",o.parentNode)}}return r},findReactNodeByID:function(e){var t=A.findReactContainerForID(e);return A.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=A.getID(e);return t?t.charAt(0)===x:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(A.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,n){var r=V,o=0,i=p(n)||e;for(r[0]=i.firstChild,r.length=1;o when using tables, nesting tags like
,

, or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",n,A.getID(e)):C(!1)},getReactRootID:r,getID:o,setID:a,getNode:s,purgeID:c};A.renderComponent=N("ReactMount","renderComponent","render",this,A.render),e.exports=A}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var r=n(31),o=n(9),i=n(2),a={getDOMNode:function(){return"production"!==t.env.NODE_ENV?i(this.isMounted(),"getDOMNode(): A component must be mounted to have a DOM node."):i(this.isMounted()),r.isNullComponentID(this._rootNodeID)?null:o.getNode(this._rootNodeID)}};e.exports=a}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function n(e,t,n){return n}var r={enableMeasure:!1,storedMeasure:n,measure:function(e,n,o){if("production"!==t.env.NODE_ENV){var i=null,a=function(){return r.enableMeasure?(i||(i=r.storedMeasure(e,n,o)),i.apply(this,arguments)):o.apply(this,arguments)};return a.displayName=e+"_"+n,a}return o},injection:{injectMeasure:function(e){r.storedMeasure=e}}};e.exports=r}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(){"production"!==t.env.NODE_ENV?v(x.ReactReconcileTransaction&&_,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):v(x.ReactReconcileTransaction&&_)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=x.ReactReconcileTransaction.getPooled()}function i(e,t,n){r(),_.batchedUpdates(e,t,n)}function a(e,t){return e._mountDepth-t._mountDepth}function s(e){var n=e.dirtyComponentsLength;"production"!==t.env.NODE_ENV?v(n===y.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",n,y.length):v(n===y.length),y.sort(a);for(var r=0;n>r;r++){var o=y[r];if(o.isMounted()){var i=o._pendingCallbacks;if(o._pendingCallbacks=null,o.performUpdateIfNecessary(e.reconcileTransaction),i)for(var s=0;st||o.hasOverloadedBooleanValue[e]&&t===!1}var o=n(17),i=n(45),a=n(79),s=n(6),u=a(function(e){return i(e)+'="'});if("production"!==t.env.NODE_ENV)var c={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},l={},p=function(e){if(!(c.hasOwnProperty(e)&&c[e]||l.hasOwnProperty(e)&&l[e])){l[e]=!0;var n=e.toLowerCase(),r=o.isCustomAttribute(n)?n:o.getPossibleStandardName.hasOwnProperty(n)?o.getPossibleStandardName[n]:null;"production"!==t.env.NODE_ENV?s(null==r,"Unknown DOM property "+e+". Did you mean "+r+"?"):null}};var d={createMarkupForID:function(e){return u(o.ID_ATTRIBUTE_NAME)+i(e)+'"'},createMarkupForProperty:function(e,n){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,n))return"";var a=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&n===!0?i(a):u(a)+i(n)+'"'}return o.isCustomAttribute(e)?null==n?"":u(e)+i(n)+'"':("production"!==t.env.NODE_ENV&&p(e),null)},setValueForProperty:function(e,n,i){if(o.isStandardName.hasOwnProperty(n)&&o.isStandardName[n]){var a=o.getMutationMethod[n];if(a)a(e,i);else if(r(n,i))this.deleteValueForProperty(e,n);else if(o.mustUseAttribute[n])e.setAttribute(o.getAttributeName[n],""+i);else{var s=o.getPropertyName[n];o.hasSideEffects[n]&&""+e[s]==""+i||(e[s]=i)}}else o.isCustomAttribute(n)?null==i?e.removeAttribute(n):e.setAttribute(n,""+i):"production"!==t.env.NODE_ENV&&p(n)},deleteValueForProperty:function(e,n){if(o.isStandardName.hasOwnProperty(n)&&o.isStandardName[n]){var r=o.getMutationMethod[n];if(r)r(e,void 0);else if(o.mustUseAttribute[n])e.removeAttribute(o.getAttributeName[n]);else{var i=o.getPropertyName[n],a=o.getDefaultValueForProperty(e.nodeName,i);o.hasSideEffects[n]&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(n)?e.removeAttribute(n):"production"!==t.env.NODE_ENV&&p(n)}};e.exports=d}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function o(e,n,o){if("production"!==t.env.NODE_ENV&&!e)throw new Error("Dispatching id must not be null");var i=n?m.bubbled:m.captured,a=r(e,o,i);a&&(o._dispatchListeners=f(o._dispatchListeners,a),o._dispatchIDs=f(o._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=v(e,r);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchIDs=f(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function u(e){h(e,i)}function c(e,t,n,r){d.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function l(e){h(e,s)}var p=n(7),d=n(27),f=n(43),h=n(46),m=p.PropagationPhases,v=d.getListener,g={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:l,accumulateEnterLeaveDispatches:c};e.exports=g}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var o=n(7),i=n(27),a=n(56),s=n(123),u=n(70),c=n(3),l=n(51),p={},d=!1,f=0,h={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],u=o.topLevelTypes,c=0,p=s.length;p>c;c++){var d=s[c];i.hasOwnProperty(d)&&i[d]||(d===u.topWheel?l("wheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):l("mousewheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):v.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):d===u.topScroll?l("scroll",!0)?v.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):d===u.topFocus||d===u.topBlur?(l("focus",!0)?(v.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),v.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):l("focusin")&&(v.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),v.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),i[u.topBlur]=!0,i[u.topFocus]=!0):h.hasOwnProperty(d)&&v.ReactEventListener.trapBubbledEvent(d,h[d],n),i[d]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!d){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),d=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});e.exports=v},function(e,t,n){(function(t){"use strict";var r=n(4),o=n(63),i=n(12),a=n(3),s=n(2),u=n(26),c=u({MOUNTED:null,UNMOUNTED:null}),l=!1,p=null,d=null,f={injection:{injectEnvironment:function(e){"production"!==t.env.NODE_ENV?s(!l,"ReactComponent: injectEnvironment() can only be called once."):s(!l),d=e.mountImageIntoNode,p=e.unmountIDFromEnvironment,f.BackendIDOperations=e.BackendIDOperations,l=!0}},LifeCycle:c,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===c.MOUNTED},setProps:function(e,t){var n=this._pendingElement||this._currentElement;this.replaceProps(a({},n.props,e),t)},replaceProps:function(e,n){"production"!==t.env.NODE_ENV?s(this.isMounted(),"replaceProps(...): Can only update a mounted component."):s(this.isMounted()),"production"!==t.env.NODE_ENV?s(0===this._mountDepth,"replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):s(0===this._mountDepth),this._pendingElement=r.cloneAndReplaceProps(this._pendingElement||this._currentElement,e),i.enqueueUpdate(this,n)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=r.cloneAndReplaceProps(n,a({},n.props,e)),i.enqueueUpdate(this,t)},construct:function(e){this.props=e.props,this._owner=e._owner,this._lifeCycleState=c.UNMOUNTED,this._pendingCallbacks=null,this._currentElement=e,this._pendingElement=null},mountComponent:function(e,n,r){"production"!==t.env.NODE_ENV?s(!this.isMounted(),"mountComponent(%s, ...): Can only mount an unmounted component. Make sure to avoid storing components between renders or reusing a single component instance in multiple places.",e):s(!this.isMounted());var i=this._currentElement.ref;if(null!=i){var a=this._currentElement._owner;o.addComponentAsRefTo(this,i,a)}this._rootNodeID=e,this._lifeCycleState=c.MOUNTED,this._mountDepth=r},unmountComponent:function(){"production"!==t.env.NODE_ENV?s(this.isMounted(),"unmountComponent(): Can only unmount a mounted component."):s(this.isMounted());var e=this._currentElement.ref;null!=e&&o.removeComponentAsRefFrom(this,e,this._owner),p(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=c.UNMOUNTED},receiveComponent:function(e,n){"production"!==t.env.NODE_ENV?s(this.isMounted(),"receiveComponent(...): Can only update a mounted component."):s(this.isMounted()),this._pendingElement=e,this.performUpdateIfNecessary(n)},performUpdateIfNecessary:function(e){if(null!=this._pendingElement){var t=this._currentElement,n=this._pendingElement;this._currentElement=n,this.props=n.props,this._owner=n._owner,this._pendingElement=null,this.updateComponent(e,t)}},updateComponent:function(e,t){var n=this._currentElement;(n._owner!==t._owner||n.ref!==t.ref)&&(null!=t.ref&&o.removeComponentAsRefFrom(this,t.ref,t._owner),null!=n.ref&&o.addComponentAsRefTo(this,n.ref,n._owner))},mountComponentIntoNode:function(e,t,n){var r=i.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,e,t,r,n),i.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(e,t,n,r){var o=this.mountComponent(e,n,0);d(o,t,r)},isOwnedBy:function(e){return this._owner===e},getSiblingByRef:function(e){var t=this._owner;return t&&t.refs?t.refs[e]:null}}};e.exports=f}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function i(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(f)):""}function u(e,n){if("production"!==t.env.NODE_ENV?d(i(e)&&i(n),"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",e,n):d(i(e)&&i(n)),"production"!==t.env.NODE_ENV?d(a(e,n),"getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",e,n):d(a(e,n)),e===n)return e;for(var r=e.length+h,s=r;s=s;s++)if(o(e,s)&&o(n,s))a=s;else if(e.charAt(s)!==n.charAt(s))break;var u=e.substr(0,a);return"production"!==t.env.NODE_ENV?d(i(u),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,n,u):d(i(u)),u}function l(e,n,r,o,i,c){e=e||"",n=n||"","production"!==t.env.NODE_ENV?d(e!==n,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e):d(e!==n);var l=a(n,e);"production"!==t.env.NODE_ENV?d(l||a(e,n),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,n):d(l||a(e,n));for(var p=0,f=l?s:u,h=e;;h=f(h,n)){var v;if(i&&h===e||c&&h===n||(v=r(h,l,o)),v===!1||h===n)break;"production"!==t.env.NODE_ENV?d(p++1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=c(e,t);i!==e&&l(e,i,n,r,!1,!0),i!==t&&l(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},_getFirstCommonAncestorID:c,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};e.exports=v}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var r=n(2),o=function(e){var n,o={};"production"!==t.env.NODE_ENV?r(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):r(e instanceof Object&&!Array.isArray(e));for(n in e)e.hasOwnProperty(n)&&(o[n]=n);return o};e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(){var e=!d||!d.traverseTwoPhase||!d.traverseEnterLeave;if(e)throw new Error("InstanceHandle not injected before use!")}var o=n(56),i=n(38),a=n(43),s=n(46),u=n(2),c={},l=null,p=function(e){if(e){var t=i.executeDispatch,n=o.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},d=null,f={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){d=e,"production"!==t.env.NODE_ENV&&r()},getInstanceHandle:function(){return"production"!==t.env.NODE_ENV&&r(),d},injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:function(e,n,r){"production"!==t.env.NODE_ENV?u(!r||"function"==typeof r,"Expected %s listener to be a function, instead got type %s",n,typeof r):u(!r||"function"==typeof r);var o=c[n]||(c[n]={});o[e]=r},getListener:function(e,t){var n=c[t];return n&&n[e]},deleteListener:function(e,t){var n=c[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in c)delete c[t][e]},extractEvents:function(e,t,n,r){for(var i,s=o.plugins,u=0,c=s.length;c>u;u++){var l=s[u];if(l){var p=l.extractEvents(e,t,n,r);p&&(i=a(i,p))}}return i},enqueueEvents:function(e){e&&(l=a(l,e))},processEventQueue:function(){var e=l;l=null,s(e,p),"production"!==t.env.NODE_ENV?u(!l,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."):u(!l)},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=f}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(){if(h._isLegacyCallWarningEnabled){var e=s.current,n=e&&e.constructor?e.constructor.displayName:"";n||(n="Something"),p.hasOwnProperty(n)||(p[n]=!0,"production"!==t.env.NODE_ENV?l(!1,n+" is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"):null,c("react_legacy_factory_call",{version:3,name:n}))}}function o(e){var n=e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent;if(n)"production"!==t.env.NODE_ENV?l(!1,"Did not expect to get a React class here. Use `Component` instead of `Component.type` or `this.constructor`."):null;else{if(!e._reactWarnedForThisType){try{e._reactWarnedForThisType=!0}catch(r){}c("react_non_component_in_jsx",{version:3,name:e.name})}"production"!==t.env.NODE_ENV?l(!1,"This JSX uses a plain function. Only React components are valid in React's JSX transform."):null}}function i(e){"production"!==t.env.NODE_ENV?l(!1,"Do not pass React.DOM."+e.type+' to JSX or createFactory. Use the string "'+e.type+'" instead.'):null}function a(e,t){if("function"==typeof t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if("function"==typeof r){var o=r.bind(t);for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);e[n]=o}else e[n]=r}}var s=n(18),u=n(2),c=n(35),l=n(6),p={},d={},f={},h={};h.wrapCreateFactory=function(e){var n=function(n){return"function"!=typeof n?e(n):n.isReactNonLegacyFactory?("production"!==t.env.NODE_ENV&&i(n),e(n.type)):n.isReactLegacyFactory?e(n.type):("production"!==t.env.NODE_ENV&&o(n),n)};return n},h.wrapCreateElement=function(e){var n=function(n){if("function"!=typeof n)return e.apply(this,arguments);var r;return n.isReactNonLegacyFactory?("production"!==t.env.NODE_ENV&&i(n),r=Array.prototype.slice.call(arguments,0),r[0]=n.type,e.apply(this,r)):n.isReactLegacyFactory?(n._isMockFunction&&(n.type._mockedReactClassConstructor=n),r=Array.prototype.slice.call(arguments,0),r[0]=n.type,e.apply(this,r)):("production"!==t.env.NODE_ENV&&o(n),n.apply(null,Array.prototype.slice.call(arguments,1)))};return n},h.wrapFactory=function(e){"production"!==t.env.NODE_ENV?u("function"==typeof e,"This is suppose to accept a element factory"):u("function"==typeof e);var n=function(){return"production"!==t.env.NODE_ENV&&r(),e.apply(this,arguments)};return a(n,e.type),n.isReactLegacyFactory=d,n.type=e.type,n},h.markNonLegacyFactory=function(e){return e.isReactNonLegacyFactory=f,e},h.isValidFactory=function(e){return"function"==typeof e&&e.isReactLegacyFactory===d},h.isValidClass=function(e){return"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?l(!1,"isValidClass is deprecated and will be removed in a future release. Use a more specific validator instead."):null),h.isValidFactory(e)},h._isLegacyCallWarningEnabled=!0,e.exports=h}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(19),i=n(49),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";var r=n(72),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};e.exports=o},function(e,t,n){(function(t){"use strict";function r(){return"production"!==t.env.NODE_ENV?c(s,"Trying to return null from a render, but no null placeholder component was injected."):c(s),s()}function o(e){l[e]=!0}function i(e){delete l[e]}function a(e){return l[e]}var s,u=n(4),c=n(2),l={},p={injectEmptyComponent:function(e){s=u.createFactory(e)}},d={deregisterNullComponentID:i,getEmptyComponent:r,injection:p,isNullComponentID:a,registerNullComponentID:o};e.exports=d}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(29),i=n(70),a=n(48),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},function(e,t,n){(function(t){"use strict";var r=n(2),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,n,o,i,a,s,u,c){"production"!==t.env.NODE_ENV?r(!this.isInTransaction(),"Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."):r(!this.isInTransaction());var l,p;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),p=e.call(n,o,i,a,s,u,c),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return p},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;nr;r++)e[r].call(n[r]);e.length=0,n.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),e.exports=r}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){return e===g.topMouseUp||e===g.topTouchEnd||e===g.topTouchCancel}function o(e){return e===g.topMouseMove||e===g.topTouchMove}function i(e){return e===g.topMouseDown||e===g.topTouchStart}function a(e,n){var r=e._dispatchListeners,o=e._dispatchIDs;if("production"!==t.env.NODE_ENV&&f(e),Array.isArray(r))for(var i=0;i.";var c=null;n._owner&&n._owner!==d.current&&(c=n._owner.constructor.displayName,t+=" It was passed a child from "+c+"."),t+=" See http://fb.me/react-warning-keys for more information.",f(e,{component:s,componentOwner:c}),console.warn(t)}}function s(){var e=r()||"";v.hasOwnProperty(e)||(v[e]=!0,f("react_object_map_children"))}function u(e,t){if(Array.isArray(e))for(var n=0;n":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;e.exports=n},function(e){"use strict";var t=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=t},function(e){"use strict";function t(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=t},function(e){"use strict";function t(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var o=r[e];return o?!!n[o]:!1}function n(){return t}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=n},function(e){"use strict";function t(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=t},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(5),i=null;e.exports=r},function(e,t,n){"use strict";/** 4 | * Checks if an event is supported in the current execution environment. 5 | * 6 | * NOTE: This will not work correctly for non-generic events such as `change`, 7 | * `reset`, `load`, `error`, and `select`. 8 | * 9 | * Borrows from Modernizr. 10 | * 11 | * @param {string} eventNameSuffix Event name, e.g. "click". 12 | * @param {?boolean} capture Check if the capture phase is supported. 13 | * @return {boolean} True if the event is supported. 14 | * @internal 15 | * @license Modernizr 3.0.0pre (Custom Build) | MIT 16 | */ 17 | function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(5);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e){"use strict";function t(e,t){return e&&t&&e.type===t.type&&e.key===t.key&&e._owner===t._owner?!0:!1}e.exports=t},function(e){e.exports=PSD},function(e){"use strict";function t(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var n={columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},r=["Webkit","ms","Moz","O"];Object.keys(n).forEach(function(e){r.forEach(function(r){n[t(r,e)]=n[e]})});var o={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},i={isUnitlessNumber:n,shorthandPropertyExpansions:o};e.exports=i},function(e,t,n){(function(t){"use strict";var r=n(54),o=n(5),i=n(144),a=n(149),s=n(155),u=n(79),c=n(6),l=u(function(e){return s(e)}),p="cssFloat";if(o.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(p="styleFloat"),"production"!==t.env.NODE_ENV)var d={},f=function(e){d.hasOwnProperty(e)&&d[e]||(d[e]=!0,"production"!==t.env.NODE_ENV?c(!1,"Unsupported style property "+e+". Did you mean "+i(e)+"?"):null)};var h={createMarkupForStyles:function(e){var n="";for(var r in e)if(e.hasOwnProperty(r)){"production"!==t.env.NODE_ENV&&r.indexOf("-")>-1&&f(r);var o=e[r];null!=o&&(n+=l(r)+":",n+=a(r,o)+";")}return n||null},setValueForStyles:function(e,n){var o=e.style;for(var i in n)if(n.hasOwnProperty(i)){"production"!==t.env.NODE_ENV&&i.indexOf("-")>-1&&f(i);var s=a(i,n[i]);if("float"===i&&(i=p),s)o[i]=s;else{var u=r.shorthandPropertyExpansions[i];if(u)for(var c in u)o[c]="";else o[i]=""}}}};e.exports=h}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(){if(s)for(var e in u){var n=u[e],r=s.indexOf(e);if("production"!==t.env.NODE_ENV?a(r>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a(r>-1),!c.plugins[r]){"production"!==t.env.NODE_ENV?a(n.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a(n.extractEvents),c.plugins[r]=n;var i=n.eventTypes;for(var l in i)"production"!==t.env.NODE_ENV?a(o(i[l],n,l),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",l,e):a(o(i[l],n,l))}}}function o(e,n,r){"production"!==t.env.NODE_ENV?a(!c.eventNameDispatchConfigs.hasOwnProperty(r),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):a(!c.eventNameDispatchConfigs.hasOwnProperty(r)),c.eventNameDispatchConfigs[r]=e;var o=e.phasedRegistrationNames;if(o){for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];i(u,n,r)}return!0}return e.registrationName?(i(e.registrationName,n,r),!0):!1}function i(e,n,r){"production"!==t.env.NODE_ENV?a(!c.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a(!c.registrationNameModules[e]),c.registrationNameModules[e]=n,c.registrationNameDependencies[e]=n.eventTypes[r].dependencies}var a=n(2),s=null,u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){"production"!==t.env.NODE_ENV?a(!s,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var n=!1;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];u.hasOwnProperty(o)&&u[o]===i||("production"!==t.env.NODE_ENV?a(!u[o],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",o):a(!u[o]),u[o]=i,n=!0)}n&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){e.remove()}var o=n(23),i=n(43),a=n(46),s=n(2),u={trapBubbledEvent:function(e,n){"production"!==t.env.NODE_ENV?s(this.isMounted(),"Must be mounted to trap events"):s(this.isMounted());var r=o.trapBubbledEvent(e,n,this.getDOMNode());this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};e.exports=u}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){e&&("production"!==t.env.NODE_ENV?y(null==e.children||null==e.dangerouslySetInnerHTML,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):y(null==e.children||null==e.dangerouslySetInnerHTML),"production"!==t.env.NODE_ENV&&e.contentEditable&&null!=e.children&&console.warn("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),"production"!==t.env.NODE_ENV?y(null==e.style||"object"==typeof e.style,"The `style` prop expects a mapping from style properties to values, not a string."):y(null==e.style||"object"==typeof e.style))}function o(e,n,r,o){"production"!==t.env.NODE_ENV&&("onScroll"!==n||E("scroll",!0)||(_("react_no_scroll_event"),console.warn("This browser doesn't support the `onScroll` event")));var i=f.findReactContainerForID(e);if(i){var a=i.nodeType===x?i.ownerDocument:i;C(n,a)}o.getPutListenerQueue().enqueuePutListener(e,n,r)}function i(e){R.call(I,e)||("production"!==t.env.NODE_ENV?y(T.test(e),"Invalid tag: %s",e):y(T.test(e)),I[e]=!0)}function a(e){i(e),this._tag=e,this.tagName=e.toUpperCase()}var s=n(55),u=n(17),c=n(21),l=n(10),p=n(24),d=n(23),f=n(9),h=n(60),m=n(11),v=n(3),g=n(45),y=n(2),E=n(51),N=n(14),_=n(35),b=d.deleteListener,C=d.listenTo,D=d.registrationNameModules,O={string:!0,number:!0},w=N({style:null}),x=1,M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},T=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,I={},R={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={mountComponent:m.measure("ReactDOMComponent","mountComponent",function(e,t,n){p.Mixin.mountComponent.call(this,e,t,n),r(this.props);var o=M[this._tag]?"":"";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t)+o}),_createOpenTagMarkupAndPutListeners:function(e){var t=this.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(D.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===w&&(i&&(i=t.style=v({},t.style)),i=s.createMarkupForStyles(i));var a=c.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var u=c.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=O[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return g(n);if(null!=r){var o=this.mountChildren(r,e);return o.join("")}}return""},receiveComponent:function(e,t){(e!==this._currentElement||null==e._owner)&&p.Mixin.receiveComponent.call(this,e,t)},updateComponent:m.measure("ReactDOMComponent","updateComponent",function(e,t){r(this._currentElement.props),p.Mixin.updateComponent.call(this,e,t),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e)}),_updateDOMProperties:function(e,t){var n,r,i,a=this.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===w){var s=e[n];for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="")}else D.hasOwnProperty(n)?b(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&p.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in a){var c=a[n],l=e[n];if(a.hasOwnProperty(n)&&c!==l)if(n===w)if(c&&(c=a.style=v({},c)),l){for(r in l)!l.hasOwnProperty(r)||c&&c.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in c)c.hasOwnProperty(r)&&l[r]!==c[r]&&(i=i||{},i[r]=c[r])}else i=c;else D.hasOwnProperty(n)?o(this._rootNodeID,n,c,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&p.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,c)}i&&p.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t){var n=this.props,r=O[typeof e.children]?e.children:null,o=O[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:e.children,u=null!=o?null:n.children,c=null!=r||null!=i,l=null!=o||null!=a;null!=s&&null==u?this.updateChildren(null,t):c&&!l&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&p.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,t)},unmountComponent:function(){this.unmountChildren(),d.deleteAllListeners(this._rootNodeID),p.Mixin.unmountComponent.call(this)}},v(a.prototype,p.Mixin,a.Mixin,h.Mixin,l),e.exports=a}).call(t,n(1))},function(e,t,n){"use strict";var r=n(142),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){m.push({parentID:e,parentNode:null,type:l.INSERT_MARKUP,markupIndex:v.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){m.push({parentID:e,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){m.push({parentID:e,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){m.push({parentID:e,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){m.length&&(c.BackendIDOperations.dangerouslyProcessChildrenUpdates(m,v),u())}function u(){m.length=0,v.length=0}var c=n(24),l=n(61),p=n(151),d=n(34),f=n(52),h=0,m=[],v=[],g={Mixin:{mountChildren:function(e,t){var n=p(e),r=[],o=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)){var s=d(a,null);n[i]=s;var u=this._rootNodeID+i,c=s.mountComponent(u,t,this._mountDepth+1);s._mountIndex=o,r.push(c),o++}}return r},updateTextContent:function(e){h++;var t=!0;try{var n=this._renderedChildren;for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{h--,h||(t?u():s())}},updateChildren:function(e,t){h++;var n=!0;try{this._updateChildren(e,t),n=!1}finally{h--,h||(n?u():s())}},_updateChildren:function(e,t){var n=p(e),r=this._renderedChildren;if(n||r){var o,i=0,a=0;for(o in n)if(n.hasOwnProperty(o)){var s=r&&r[o],u=s&&s._currentElement,c=n[o];if(f(u,c))this.moveChild(s,a,i),i=Math.max(s._mountIndex,i),s.receiveComponent(c,t),s._mountIndex=a;else{s&&(i=Math.max(s._mountIndex,i),this._unmountChildByName(s,o));var l=d(c,null);this._mountChildByNameAtIndex(l,o,a,t)}a++}for(o in r)!r.hasOwnProperty(o)||n&&n[o]||this._unmountChildByName(r[o],o)}},unmountChildren:function(){var e=this._renderedChildren;for(var t in e){var n=e[t];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex>",b=s(),C=d(),D={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:b,instanceOf:u,node:C,objectOf:l,oneOf:c,oneOfType:p,shape:f,component:E("React.PropTypes","component","element",this,b),renderable:E("React.PropTypes","renderable","node",this,C)};e.exports=D},function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=n(15),i=n(23),a=n(3);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e"+i+""},receiveComponent:function(e){var t=e.props;t!==this.props&&(this.props=t,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}});var c=function(e){return new i(u,null,null,null,null,e)};c.type=u,e.exports=c},function(e,t,n){"use strict";var r=n(76),o={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var e=r(window);o.currentScrollLeft=e.x,o.currentScrollTop=e.y}};e.exports=o},function(e,t,n){function r(e,t){return e&&t?e===t?!0:o(e)?!1:o(t)?r(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var o=n(157);e.exports=r},function(e){"use strict";function t(e){try{e.focus()}catch(t){}}e.exports=t},function(e){function t(){try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=t},function(e,t,n){(function(t){function r(e){return"production"!==t.env.NODE_ENV?i(!!a,"Markup wrapping node not initialized"):i(!!a),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||(a.innerHTML="*"===e?"":"<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(5),i=n(2),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],c=[1,"","
"],l=[3,"","
"],p=[1,"",""],d={"*":[1,"?

"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l,circle:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r}).call(t,n(1))},function(e){"use strict";function t(e){return e?e.nodeType===n?e.documentElement:e.firstChild:null}var n=9;e.exports=t},function(e){"use strict";function t(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=t},function(e){"use strict";function t(e){return e&&("INPUT"===e.nodeName&&n[e.type]||"TEXTAREA"===e.nodeName)}var n={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=t},function(e){"use strict";function t(e,t,r){if(!e)return null;var o={};for(var i in e)n.call(e,i)&&(o[i]=t.call(r,e[i],i,e));return o}var n=Object.prototype.hasOwnProperty;e.exports=t},function(e){"use strict";function t(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}e.exports=t},function(e,t,n){"use strict";var r=n(5),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){(function(t){"use strict";function r(e){return f[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(h,r)}function a(e){return"$"+i(e)}function s(e,t,n){return null==e?0:m(e,"",0,t,n)}var u=n(4),c=n(25),l=n(2),p=c.SEPARATOR,d=":",f={"=":"=0",".":"=1",":":"=2"},h=/[=.:]/g,m=function(e,n,r,i,s){var c,f,h=0;if(Array.isArray(e))for(var v=0;ve?e/t:1},componentDidMount:function(){var e=this.refs.container.getDOMNode().clientWidth;this.setState({maxWidth:e})},render:function(){var e=this.props.psd.tree(),t=this.getScale(),n=t*e.height,r=this.props.highlightedLayer;return o.createElement("div",{className:"preview"},o.createElement("div",{ref:"container",className:"preview--container",style:{height:n}},o.createElement("div",{className:"preview--layers"},o.createElement(s,{layer:e,scale:t})),o.createElement(a,{layer:r,scale:t})))}})},function(e,t,n){"use strict";e.exports=function(){},n(91)},function(e,t,n){(function(e){"use strict";if(e._babelPolyfill)throw new Error("only one instance of babel/polyfill is allowed");e._babelPolyfill=!0,n(92),n(93)}).call(t,function(){return this}())},function(e){!function(t,n,r){"use strict";function o(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function i(e){return"function"==typeof e}function a(e,t,n){e&&!gn(e=n?e:e[gt],Un)&&Sn(e,Un,t)}function s(e){return on.call(e).slice(8,-1)}function u(e){var t,n;return e==r?e===r?"Undefined":"Null":"string"==typeof(n=(t=Mt(e))[Un])?n:s(t)}function c(){for(var e=I(this),t=arguments.length,n=Tt(t),r=0,o=Wn._,i=!1;t>r;)(n[r]=arguments[r++])===o&&(i=!0);return function(){var r,a=this,s=arguments.length,u=0,c=0;if(!i&&!s)return p(e,n,a);if(r=n.slice(),i)for(;t>u;u++)r[u]===o&&(r[u]=arguments[c++]);for(;s>c;)r.push(arguments[c++]);return p(e,r,a)}}function l(e,t,n){if(I(e),~n&&t===r)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}function p(e,t,n){var o=n===r;switch(0|t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);case 5:return o?e(t[0],t[1],t[2],t[3],t[4]):e.call(n,t[0],t[1],t[2],t[3],t[4]) 18 | }return e.apply(n,t)}function d(e){return yn(T(e))}function f(e){return e}function h(){return this}function m(e,t){return gn(e,t)?e[t]:void 0}function v(e){return R(e),mn?hn(e).concat(mn(e)):hn(e)}function g(e,t){for(var n,r=d(e),o=fn(r),i=o.length,a=0;i>a;)if(r[n=o[a++]]===t)return n}function y(e){return It(e).split(",")}function E(e){var t=1==e,n=2==e,o=3==e,i=4==e,a=6==e,s=5==e||a;return function(u){for(var c,p,d=Mt(T(this)),f=arguments[1],h=yn(d),m=l(u,f,3),v=D(h.length),g=0,y=t?Tt(v):n?[]:r;v>g;g++)if((s||g in h)&&(c=h[g],p=m(c,g,d),e))if(t)y[g]=p;else if(p)switch(e){case 3:return!0;case 5:return c;case 6:return g;case 2:y.push(c)}else if(i)return!1;return a?-1:o||i?i:y}}function N(e){return function(t){var n=d(this),r=D(n.length),o=O(arguments[1],r);if(e&&t!=t){for(;r>o;o++)if(b(n[o]))return e||o}else for(;r>o;o++)if((e||o in n)&&n[o]===t)return e||o;return!e&&-1}}function _(e,t){return"function"==typeof e?e:t}function b(e){return e!=e}function C(e){return isNaN(e)?0:In(e)}function D(e){return e>0?Mn(C(e),bn):0}function O(e,t){var e=C(e);return 0>e?xn(e+t,0):Mn(e,t)}function w(e,t,n){var r=o(t)?function(e){return t[e]}:t;return function(t){return It(n?t:this).replace(e,r)}}function x(e){return function(t){var n,o,i=It(T(this)),a=C(t),s=i.length;return 0>a||a>=s?e?"":r:(n=i.charCodeAt(a),55296>n||n>56319||a+1===s||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):n:e?i.slice(a,a+2):(n-55296<<10)+(o-56320)+65536)}}function M(e,t,n){if(!e)throw Ft(n?t+n:t)}function T(e){if(e==r)throw Ft("Function called on null or undefined");return e}function I(e){return M(i(e),e," is not a function!"),e}function R(e){return M(o(e),e," is not an object!"),e}function P(e,t,n){M(e instanceof t,n,": use the 'new' operator!")}function S(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function k(e,t,n){return e[t]=n,e}function V(e){return Rn?function(t,n,r){return pn(t,n,S(e,r))}:k}function L(e){return ft+"("+e+")_"+(++Pn+Tn())[Et](36)}function A(e,t){return At&&At[e]||(t?At:Vn)(ft+nn+e)}function U(e,t){for(var n in t)Sn(e,n,t[n]);return e}function F(e){!Rn||!n&&rn(e)||pn(e,Fn,{configurable:!0,get:h})}function j(e,r,o){var a,s,u,c,p=e&Yn,d=p?t:e&Gn?t[r]:(t[r]||Zt)[gt],f=p?Bn:Bn[r]||(Bn[r]={});p&&(o=r);for(a in o)s=!(e&Kn)&&d&&a in d&&(!i(d[a])||rn(d[a])),u=(s?d:o)[a],n||!p||i(d[a])?e&qn&&s?c=l(u,t):e&Xn&&!n&&d[a]==u?(c=function(e){return this instanceof u?new u(e):u(e)},c[gt]=u[gt]):c=e&zn&&i(u)?l(an,u):u:c=o[a],n&&d&&!s&&(p?d[a]=u:delete d[a]&&Sn(d,a,u)),f[a]!=u&&Sn(f,a,c)}function B(e,t){Sn(e,et,t),Dt in Jt&&Sn(e,Dt,t)}function W(e,t,n,r){e[gt]=un(r||er,{next:S(1,n)}),a(e,t+" Iterator")}function H(e,t,r,o){var i=e[gt],s=m(i,et)||m(i,Dt)||o&&m(i,o)||r;if(n&&(B(i,s),s!==r)){var u=cn(s.call(new e));a(u,t+" Iterator",!0),gn(i,Dt)&&B(u,h)}return Zn[t]=s,Zn[t+" Iterator"]=h,s}function K(e,t,n,r,o,i){function a(e){return function(){return new n(this,e)}}W(n,t,r);var s=a($n+Jn),u=a(Jn);o==Jn?u=H(e,t,u,"values"):s=H(e,t,s,"entries"),o&&j(zn+Kn*tr,t,{entries:s,keys:i?u:a($n),values:u})}function Y(e,t){return{value:t,done:!!e}}function G(e){var n=Mt(e),r=t[ft],o=(r&&r[Ct]||Dt)in n;return o||et in n||gn(Zn,u(n))}function z(e){var n=t[ft],r=e[n&&n[Ct]||Dt],o=r||e[et]||Zn[u(e)];return R(o.call(e))}function q(e,t,n){return n?p(e,t):e(t)}function X(e){var t=!0,n={next:function(){throw 1},"return":function(){t=!1}};n[et]=h;try{e(n)}catch(r){}return t}function Q(e){var t=e["return"];t!==r&&t.call(e)}function $(e,t){try{e(t)}catch(n){throw Q(t),n}}function J(e,t,n,r){$(function(e){for(var o,i=l(n,r,t?2:1);!(o=e.next()).done;)if(q(i,o.value,t)===!1)return Q(e)},z(e))}var Z,et,tt,nt="Object",rt="Function",ot="Array",it="String",at="Number",st="RegExp",ut="Date",ct="Map",lt="Set",pt="WeakMap",dt="WeakSet",ft="Symbol",ht="Promise",mt="Math",vt="Arguments",gt="prototype",yt="constructor",Et="toString",Nt=Et+"Tag",_t="hasOwnProperty",bt="forEach",Ct="iterator",Dt="@@"+Ct,Ot="process",wt="createElement",xt=t[rt],Mt=t[nt],Tt=t[ot],It=t[it],Rt=t[at],Pt=t[st],St=(t[ut],t[ct]),kt=t[lt],Vt=t[pt],Lt=t[dt],At=t[ft],Ut=t[mt],Ft=t.TypeError,jt=t.RangeError,Bt=t.setTimeout,Wt=t.setImmediate,Ht=t.clearImmediate,Kt=t.parseInt,Yt=t.isFinite,Gt=t[Ot],zt=Gt&&Gt.nextTick,qt=t.document,Xt=qt&&qt.documentElement,Qt=(t.navigator,t.define),$t=t.console||{},Jt=Tt[gt],Zt=Mt[gt],en=xt[gt],tn=1/0,nn=".",rn=l(/./.test,/\[native code\]\s*\}\s*$/,1),on=Zt[Et],an=en.call,sn=en.apply,un=Mt.create,cn=Mt.getPrototypeOf,ln=Mt.setPrototypeOf,pn=Mt.defineProperty,dn=(Mt.defineProperties,Mt.getOwnPropertyDescriptor),fn=Mt.keys,hn=Mt.getOwnPropertyNames,mn=Mt.getOwnPropertySymbols,vn=Mt.isFrozen,gn=l(an,Zt[_t],2),yn=Mt,En=Mt.assign||function(e){for(var t=Mt(T(e)),n=arguments.length,r=1;n>r;)for(var o,i=yn(arguments[r++]),a=fn(i),s=a.length,u=0;s>u;)t[o=a[u++]]=i[o];return t},Nn=Jt.push,_n=(Jt.unshift,Jt.slice,Jt.splice,Jt.indexOf,Jt[bt]),bn=9007199254740991,Cn=Ut.pow,Dn=Ut.abs,On=Ut.ceil,wn=Ut.floor,xn=Ut.max,Mn=Ut.min,Tn=Ut.random,In=Ut.trunc||function(e){return(e>0?wn:On)(e)},Rn=!!function(){try{return 2==pn({},"a",{get:function(){return 2}}).a}catch(e){}}(),Pn=0,Sn=V(1),kn=At?k:Sn,Vn=At||L,Ln=A("unscopables"),An=Jt[Ln]||{},Un=A(Nt),Fn=A("species"),jn=s(Gt)==Ot,Bn={},Wn=n?t:Bn,Hn=t.core,Kn=1,Yn=2,Gn=4,zn=8,qn=16,Xn=32;"undefined"!=typeof e&&e.exports?e.exports=Bn:i(Qt)&&Qt.amd?Qt(function(){return Bn}):tt=!0,(tt||n)&&(Bn.noConflict=function(){return t.core=Hn,Bn},t.core=Bn),et=A(Ct);var Qn=Vn("iter"),$n=1,Jn=2,Zn={},er={},tr="keys"in Jt&&!("next"in[].keys());B(er,h),!function(e,n,r,o){rn(At)||(At=function(t){M(!(this instanceof At),ft+" is not a "+yt);var n=L(t),i=kn(un(At[gt]),e,n);return r[n]=i,Rn&&o&&pn(Zt,n,{configurable:!0,set:function(e){Sn(this,n,e)}}),i},Sn(At[gt],Et,function(){return this[e]})),j(Yn+Xn,{Symbol:At});var i={"for":function(e){return gn(n,e+="")?n[e]:n[e]=At(e)},iterator:et||A(Ct),keyFor:c.call(g,n),species:Fn,toStringTag:Un=A(Nt,!0),unscopables:Ln,pure:Vn,set:kn,useSetter:function(){o=!0},useSimple:function(){o=!1}};_n.call(y("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(e){i[e]=A(e)}),j(Gn,ft,i),a(At,ft),j(Gn+Kn*!rn(At),nt,{getOwnPropertyNames:function(e){for(var t,n=hn(d(e)),o=[],i=0;n.length>i;)gn(r,t=n[i++])||o.push(t);return o},getOwnPropertySymbols:function(e){for(var t,n=hn(d(e)),o=[],i=0;n.length>i;)gn(r,t=n[i++])&&o.push(r[t]);return o}}),a(Ut,mt,!0),a(t.JSON,"JSON",!0)}(Vn("tag"),{},{},!0),!function(){var e={assign:En,is:function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}};"__proto__"in Zt&&function(t,n){try{n=l(an,dn(Zt,"__proto__").set,2),n({},Jt)}catch(r){t=!0}e.setPrototypeOf=ln=ln||function(e,r){return R(e),M(null===r||o(r),r,": can't set as prototype!"),t?e.__proto__=r:n(e,r),e}}(),j(Gn,nt,e)}(),!function(e){e[Un]=nn,s(e)!=nn&&Sn(Zt,Et,function(){return"[object "+u(this)+"]"})}({}),!function(){function e(e,t){var n=Mt[e],r=Bn[nt][e],i=0,a={};if(!r||rn(r)){a[e]=1==t?function(e){return o(e)?n(e):e}:2==t?function(e){return o(e)?n(e):!0}:3==t?function(e){return o(e)?n(e):!1}:4==t?function(e,t){return n(d(e),t)}:function(e){return n(d(e))};try{n(nn)}catch(s){i=1}j(Gn+Kn*i,nt,a)}}e("freeze",1),e("seal",1),e("preventExtensions",1),e("isFrozen",2),e("isSealed",2),e("isExtensible",3),e("getOwnPropertyDescriptor",4),e("getPrototypeOf"),e("keys"),e("getOwnPropertyNames")}(),!function(e){e in en||Rn&&pn(en,e,{configurable:!0,get:function(){var t=It(this).match(/^\s*function ([^ (]*)/),n=t?t[1]:"";return gn(this,e)||pn(this,e,S(5,n)),n},set:function(t){gn(this,e)||pn(this,e,S(0,t))}})}("name"),Rt("0o1")&&Rt("0b1")||function(e,n){function r(e){if(o(e)&&(e=a(e)),"string"==typeof e&&e.length>2&&48==e.charCodeAt(0)){var t=!1;switch(e.charCodeAt(1)){case 66:case 98:t=!0;case 79:case 111:return Kt(e.slice(2),t?2:8)}}return+e}function a(e){var t,n;if(i(t=e.valueOf)&&!o(n=t.call(e)))return n;if(i(t=e[Et])&&!o(n=t.call(e)))return n;throw Ft("Can't convert object to number")}Rt=function s(t){return this instanceof s?new e(r(t)):r(t)},_n.call(Rn?hn(e):y("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY"),function(t){t in Rt||pn(Rt,t,dn(e,t))}),Rt[gt]=n,n[yt]=Rt,Sn(t,at,Rt)}(Rt,Rt[gt]),!function(e){j(Gn,at,{EPSILON:Cn(2,-52),isFinite:function(e){return"number"==typeof e&&Yt(e)},isInteger:e,isNaN:b,isSafeInteger:function(t){return e(t)&&Dn(t)<=bn},MAX_SAFE_INTEGER:bn,MIN_SAFE_INTEGER:-bn,parseFloat:parseFloat,parseInt:Kt})}(Rt.isInteger||function(e){return!o(e)&&Yt(e)&&wn(e)===e}),!function(){function e(t){return Yt(t=+t)&&0!=t?0>t?-e(-t):o(t+i(t*t+1)):t}function t(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:r(e)-1}var n=Ut.E,r=Ut.exp,o=Ut.log,i=Ut.sqrt,a=Ut.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1};j(Gn,mt,{acosh:function(e){return(e=+e)<1?0/0:Yt(e)?o(e/n+i(e+1)*i(e-1)/n)+1:e},asinh:e,atanh:function(e){return 0==(e=+e)?e:o((1+e)/(1-e))/2},cbrt:function(e){return a(e=+e)*Cn(Dn(e),1/3)},clz32:function(e){return(e>>>=0)?32-e[Et](2).length:32},cosh:function(e){return(r(e=+e)+r(-e))/2},expm1:t,fround:function(e){return new Float32Array([e])[0]},hypot:function(){for(var e,t=0,n=arguments.length,r=n,o=Tt(n),a=-tn;n--;){if(e=o[n]=+arguments[n],e==tn||e==-tn)return tn;e>a&&(a=e)}for(a=e||1;r--;)t+=Cn(o[r]/a,2);return a*i(t)},imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)},log1p:function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:o(1+e)},log10:function(e){return o(e)/Ut.LN10},log2:function(e){return o(e)/Ut.LN2},sign:a,sinh:function(e){return Dn(e=+e)<1?(t(e)-t(-e))/2:(r(e-1)-r(-e-1))*(n/2)},tanh:function(e){var n=t(e=+e),o=t(-e);return n==tn?1:o==tn?-1:(n-o)/(r(e)+r(-e))},trunc:In})}(),!function(e){function t(e){if(s(e)==st)throw Ft()}j(Gn,it,{fromCodePoint:function(){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],O(t,1114111)!==t)throw jt(t+" is not a valid code point");n.push(65536>t?e(t):e(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")},raw:function(e){for(var t=d(e.raw),n=D(t.length),r=arguments.length,o=[],i=0;n>i;)o.push(It(t[i++])),r>i&&o.push(It(arguments[i]));return o.join("")}}),j(zn,it,{codePointAt:x(!1),endsWith:function(e){t(e);var n=It(T(this)),o=arguments[1],i=D(n.length),a=o===r?i:Mn(D(o),i);return e+="",n.slice(a-e.length,a)===e},includes:function(e){return t(e),!!~It(T(this)).indexOf(e,arguments[1])},repeat:function(e){var t=It(T(this)),n="",r=C(e);if(0>r||r==tn)throw jt("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},startsWith:function(e){t(e);var n=It(T(this)),r=D(Mn(arguments[1],n.length));return e+="",n.slice(r,r+e.length)===e}})}(It.fromCharCode),!function(){j(Gn+Kn*X(Tt.from),ot,{from:function(e){var t,n,o,i=Mt(T(e)),a=arguments[1],s=a!==r,u=s?l(a,arguments[2],2):r,c=0;if(G(i))n=new(_(this,Tt)),$(function(e){for(;!(o=e.next()).done;c++)n[c]=s?u(o.value,c):o.value},z(i));else for(n=new(_(this,Tt))(t=D(i.length));t>c;c++)n[c]=s?u(i[c],c):i[c];return n.length=c,n}}),j(Gn,ot,{of:function(){for(var e=0,t=arguments.length,n=new(_(this,Tt))(t);t>e;)n[e]=arguments[e++];return n.length=t,n}}),F(Tt)}(),!function(){j(zn,ot,{copyWithin:function(e,t){var n=Mt(T(this)),o=D(n.length),i=O(e,o),a=O(t,o),s=arguments[2],u=s===r?o:O(s,o),c=Mn(u-a,o-i),l=1;for(i>a&&a+c>i&&(l=-1,a=a+c-1,i=i+c-1);c-->0;)a in n?n[i]=n[a]:delete n[i],i+=l,a+=l;return n},fill:function(e){for(var t=Mt(T(this)),n=D(t.length),o=O(arguments[1],n),i=arguments[2],a=i===r?n:O(i,n);a>o;)t[o++]=e;return t},find:E(5),findIndex:E(6)}),n&&(_n.call(y("find,findIndex,fill,copyWithin,entries,keys,values"),function(e){An[e]=!0}),Ln in Jt||Sn(Jt,Ln,An))}(),!function(e){K(Tt,ot,function(e,t){kn(this,Qn,{o:d(e),i:0,k:t})},function(){var e=this[Qn],t=e.o,n=e.k,o=e.i++;return!t||o>=t.length?(e.o=r,Y(1)):n==$n?Y(0,o):n==Jn?Y(0,t[o]):Y(0,[o,t[o]])},Jn),Zn[vt]=Zn[ot],K(It,it,function(e){kn(this,Qn,{o:It(e),i:0})},function(){var t,n=this[Qn],r=n.o,o=n.i;return o>=r.length?Y(1):(t=e.call(r,o),n.i+=t.length,Y(0,t))})}(x(!0)),Rn&&!function(e,n){(function(){try{return"/a/i"==Pt(/a/g,"i")}catch(e){}})()||(Pt=function(e,t){return new n(s(e)==st&&t!==r?e.source:e,t)},_n.call(hn(n),function(e){e in Pt||pn(Pt,e,{configurable:!0,get:function(){return n[e]},set:function(t){n[e]=t}})}),e[yt]=Pt,Pt[gt]=e,Sn(t,st,Pt)),"g"!=/./g.flags&&pn(e,"flags",{configurable:!0,get:w(/^.*\/(\w*)$/,"$1")}),F(Pt)}(Pt[gt],Pt),i(Wt)&&i(Ht)||function(e){function n(e){if(gn(m,e)){var t=m[e];delete m[e],t()}}function r(e){n(e.data)}var o,a,s,u=t.postMessage,d=t.addEventListener,f=t.MessageChannel,h=0,m={};Wt=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++h]=function(){p(i(e)?e:xt(e),t)},o(h),h},Ht=function(e){delete m[e]},jn?o=function(e){zt(c.call(n,e))}:d&&i(u)&&!t.importScripts?(o=function(e){u(e,"*")},d("message",r,!1)):i(f)?(a=new f,s=a.port2,a.port1.onmessage=r,o=l(s.postMessage,s,1)):o=qt&&e in qt[wt]("script")?function(t){Xt.appendChild(qt[wt]("script"))[e]=function(){Xt.removeChild(this),n(t)}}:function(e){Bt(n,0,e)}}("onreadystatechange"),j(Yn+qn,{setImmediate:Wt,clearImmediate:Ht}),!function(e,t){i(e)&&i(e.resolve)&&e.resolve(t=new e(function(){}))==t||function(t,n){function a(e){var t;return o(e)&&(t=e.then),i(t)?t:!1}function s(e){var t,r=e[n],o=r.c,i=0;if(r.h)return!0;for(;o.length>i;)if(t=o[i++],t.fail||s(t.P))return!0}function u(e,n){var r=e.c;(n||r.length)&&t(function(){var t=e.p,o=e.v,u=1==e.s,c=0;if(n&&!s(t))Bt(function(){s(t)||(jn?!Gt.emit("unhandledRejection",o,t):i($t.error)&&$t.error("Unhandled promise rejection",o))},1e3);else for(;r.length>c;)!function(t){var n,r,i=u?t.ok:t.fail;try{i?(u||(e.h=!0),n=i===!0?o:i(o),n===t.P?t.rej(Ft(ht+"-chain cycle")):(r=a(n))?r.call(n,t.res,t.rej):t.res(n)):t.rej(o)}catch(s){t.rej(s)}}(r[c++]);r.length=0})}function c(e){var t,n,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=a(e))?(n={r:r,d:!1},t.call(e,l(c,n,1),l(p,n,1))):(r.v=e,r.s=1,u(r))}catch(o){p.call(n||{r:r,d:!1},o)}}}function p(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,u(t,!0))}function d(e){var t=R(e)[Fn];return t!=r?t:e}e=function(t){I(t),P(this,e,ht);var o={p:this,c:[],s:0,d:!1,v:r,h:!1};Sn(this,n,o);try{t(l(c,o,1),l(p,o,1))}catch(i){p.call(o,i)}},U(e[gt],{then:function(t,o){var a=R(R(this)[yt])[Fn],s={ok:i(t)?t:!0,fail:i(o)?o:!1},c=s.P=new(a!=r?a:e)(function(e,t){s.res=I(e),s.rej=I(t)}),l=this[n];return l.c.push(s),l.s&&u(l),c},"catch":function(e){return this.then(r,e)}}),U(e,{all:function(e){var t=d(this),n=[];return new t(function(r,o){J(e,!1,Nn,n);var i=n.length,a=Tt(i);i?_n.call(n,function(e,n){t.resolve(e).then(function(e){a[n]=e,--i||r(a)},o)}):r(a)})},race:function(e){var t=d(this);return new t(function(n,r){J(e,!1,function(e){t.resolve(e).then(n,r)})})},reject:function(e){return new(d(this))(function(t,n){n(e)})},resolve:function(e){return o(e)&&n in e&&cn(e)===this[gt]?e:new(d(this))(function(t){t(e)})}})}(zt||Wt,Vn("record")),a(e,ht),F(e),j(Yn+Kn*!rn(e),{Promise:e})}(t[ht]),!function(){function e(e,t,o,i,s,u){function c(e,t){return t!=r&&J(t,s,e[f],e),e}function l(e,t){var r=h[e];n&&(h[e]=function(e,n){var o=r.call(this,0===e?0:e,n);return t?this:o})}var f=s?"set":"add",h=e&&e[gt],y={};if(rn(e)&&(u||!tr&&gn(h,bt)&&gn(h,"entries"))){var N,_=e,b=new e,C=b[f](u?{}:-0,1);X(function(t){new e(t)})&&(e=function(n){return P(this,e,t),c(new _,n)},e[gt]=h,n&&(h[yt]=e)),u||b[bt](function(e,t){N=1/t===-tn}),N&&(l("delete"),l("has"),s&&l("get")),(N||C!==b)&&l(f,!0)}else e=u?function(n){P(this,e,t),kn(this,p,E++),c(this,n)}:function(n){var o=this;P(o,e,t),kn(o,d,un(null)),kn(o,g,0),kn(o,m,r),kn(o,v,r),c(o,n)},U(U(e[gt],o),i),u||!Rn||pn(e[gt],"size",{get:function(){return T(this[g])}});return a(e,t),F(e),y[t]=e,j(Yn+Xn+Kn*!rn(e),y),u||K(e,t,function(e,t){kn(this,Qn,{o:e,k:t})},function(){for(var e=this[Qn],t=e.k,n=e.l;n&&n.r;)n=n.p;return e.o&&(e.l=n=n?n.n:e.o[v])?t==$n?Y(0,n.k):t==Jn?Y(0,n.v):Y(0,[n.k,n.v]):(e.o=r,Y(1))},s?$n+Jn:Jn,!s),e}function t(e,t){if(!o(e))return("string"==typeof e?"S":"P")+e;if(vn(e))return"F";if(!gn(e,p)){if(!t)return"E";Sn(e,p,++E)}return"O"+e[p]}function i(e,n){var r,o=t(n);if("F"!=o)return e[d][o];for(r=e[v];r;r=r.n)if(r.k==n)return r}function s(e,n,o){var a,s,u=i(e,n);return u?u.v=o:(e[m]=u={i:s=t(n,!0),k:n,v:o,p:a=e[m],n:r,r:!1},e[v]||(e[v]=u),a&&(a.n=u),e[g]++,"F"!=s&&(e[d][s]=u)),e}function u(e,t,n){return vn(R(t))?c(e).set(t,n):(gn(t,f)||Sn(t,f,{}),t[f][e[p]]=n),e}function c(e){return e[h]||Sn(e,h,new St)[h]}var p=Vn("uid"),d=Vn("O1"),f=Vn("weak"),h=Vn("leak"),m=Vn("last"),v=Vn("first"),g=Rn?Vn("size"):"size",E=0,N={},_={clear:function(){for(var e=this,t=e[d],n=e[v];n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=r),delete t[n.i];e[v]=e[m]=r,e[g]=0},"delete":function(e){var t=this,n=i(t,e);if(n){var r=n.n,o=n.p;delete t[d][n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t[v]==n&&(t[v]=r),t[m]==n&&(t[m]=o),t[g]--}return!!n},forEach:function(e){for(var t,n=l(e,arguments[1],3);t=t?t.n:this[v];)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!i(this,e)}};St=e(St,ct,{get:function(e){var t=i(this,e);return t&&t.v},set:function(e,t){return s(this,0===e?0:e,t)}},_,!0),kt=e(kt,lt,{add:function(e){return s(this,e=0===e?0:e,e)}},_);var b={"delete":function(e){return o(e)?vn(e)?c(this)["delete"](e):gn(e,f)&&gn(e[f],this[p])&&delete e[f][this[p]]:!1},has:function(e){return o(e)?vn(e)?c(this).has(e):gn(e,f)&&gn(e[f],this[p]):!1}};Vt=e(Vt,pt,{get:function(e){if(o(e)){if(vn(e))return c(this).get(e);if(gn(e,f))return e[f][this[p]]}},set:function(e,t){return u(this,e,t)}},b,!0,!0),n&&7!=(new Vt).set(Mt.freeze(N),7).get(N)&&_n.call(y("delete,has,get,set"),function(e){var t=Vt[gt][e];Vt[gt][e]=function(n,r){if(o(n)&&vn(n)){var i=c(this)[e](n,r);return"set"==e?this:i}return t.call(this,n,r)}}),Lt=e(Lt,dt,{add:function(e){return u(this,e,!0)}},b,!1,!0)}(),!function(){function e(e){var t,n=[];for(t in e)n.push(t);kn(this,Qn,{o:e,a:n,i:0})}function t(e){return function(t){R(t);try{return e.apply(r,arguments),!0}catch(n){return!1}}}function n(e,t){var i,a=arguments.length<3?e:arguments[2],s=dn(R(e),t);return s?gn(s,"value")?s.value:s.get===r?r:s.get.call(a):o(i=cn(e))?n(i,t,a):r}function i(e,t,n){var a,s,u=arguments.length<4?e:arguments[3],c=dn(R(e),t);if(!c){if(o(s=cn(e)))return i(s,t,n,u);c=S(0)}return gn(c,"value")?c.writable!==!1&&o(u)?(a=dn(u,t)||S(0),a.value=n,pn(u,t,a),!0):!1:c.set===r?!1:(c.set.call(u,n),!0)}W(e,nt,function(){var e,t=this[Qn],n=t.a;do if(t.i>=n.length)return Y(1);while(!((e=n[t.i++])in t.o));return Y(0,e)});var a=Mt.isExtensible||f,s={apply:l(an,sn,3),construct:function(e,t){var n=I(arguments.length<3?e:arguments[2])[gt],r=un(o(n)?n:Zt),i=sn.call(e,r,t);return o(i)?i:r},defineProperty:t(pn),deleteProperty:function(e,t){var n=dn(R(e),t);return n&&!n.configurable?!1:delete e[t]},enumerate:function(t){return new e(R(t))},get:n,getOwnPropertyDescriptor:function(e,t){return dn(R(e),t)},getPrototypeOf:function(e){return cn(R(e))},has:function(e,t){return t in e},isExtensible:function(e){return!!a(R(e))},ownKeys:v,preventExtensions:t(Mt.preventExtensions||f),set:i};ln&&(s.setPrototypeOf=function(e,t){return ln(R(e),t),!0}),j(Yn,{Reflect:{}}),j(Gn,"Reflect",s)}(),!function(){function e(e){return function(t){var n,r=d(t),o=fn(t),i=o.length,a=0,s=Tt(i);if(e)for(;i>a;)s[a]=[n=o[a++],r[n]];else for(;i>a;)s[a]=r[o[a++]];return s}}j(zn,ot,{includes:N(!0)}),j(zn,it,{at:x(!0)}),j(Gn,nt,{getOwnPropertyDescriptors:function(e){var t=d(e),n={};return _n.call(v(t),function(e){pn(n,e,S(0,dn(t,e)))}),n},values:e(!1),entries:e(!0)}),j(Gn,st,{escape:w(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(e){function t(e){if(e){var t=e[gt];Sn(t,Z,t.get),Sn(t,n,t.set),Sn(t,r,t["delete"])}}Z=A(e+"Get",!0);var n=A(e+lt,!0),r=A(e+"Delete",!0);j(Gn,ft,{referenceGet:Z,referenceSet:n,referenceDelete:r}),Sn(en,Z,h),t(St),t(Vt)}("reference"),!function(e){function t(t,n){_n.call(y(t),function(t){t in Jt&&(e[t]=l(an,Jt[t],n))})}t("pop,reverse,shift,keys,values,entries",1),t("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),t("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),j(Gn,ot,e)}({}),!function(e){!n||!e||et in e[gt]||Sn(e[gt],et,Zn[ot]),Zn.NodeList=Zn[ot]}(t.NodeList)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!0)},function(e,t){(function(t){!function(t){"use strict";function n(e,t,n,r){return new a(e,t,n||null,r||[])}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function o(){}function i(){}function a(e,t,n,o){function i(t,o){if(u===E)throw new Error("Generator is already running");if(u===N)return p();for(;;){var i=s.delegate;if(i){var a=r(i.iterator[t],i.iterator,o);if("throw"===a.type){s.delegate=null,t="throw",o=a.arg;continue}t="next",o=d;var c=a.arg;if(!c.done)return u=y,c;s[i.resultName]=c.value,s.next=i.nextLoc,s.delegate=null}if("next"===t){if(u===g&&"undefined"!=typeof o)throw new TypeError("attempt to send "+JSON.stringify(o)+" to newborn generator");u===y?s.sent=o:delete s.sent}else if("throw"===t){if(u===g)throw u=N,o;s.dispatchException(o)&&(t="next",o=d)}else"return"===t&&s.abrupt("return",o);u=E;var a=r(e,n,s);if("normal"===a.type){u=s.done?N:y;var c={value:a.arg,done:s.done};if(a.arg!==_)return c;s.delegate&&"next"===t&&(o=d)}else"throw"===a.type&&(u=N,"next"===t?s.dispatchException(a.arg):o=a.arg)}}var a=t?Object.create(t.prototype):this,s=new c(o),u=g;return a.next=i.bind(a,"next"),a["throw"]=i.bind(a,"throw"),a["return"]=i.bind(a,"return"),a}function s(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function u(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function c(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(s,this),this.reset()}function l(e){if(e){var t=e[h];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function o(){for(;++nt;++t)this[e]=null},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),s=f.call(o,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&f.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc)}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;u(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:l(e),resultName:t,nextLoc:n},_}}}("object"==typeof t?t:"object"==typeof window?window:this)}).call(t,function(){return this}())},function(e,t,n){e.exports=n(90)},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}var i=n(7),a=n(22),s=n(5),u=n(138),c=n(14),l=s.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||r()),p=32,d=String.fromCharCode(p),f=i.topLevelTypes,h={beforeInput:{phasedRegistrationNames:{bubbled:c({onBeforeInput:null}),captured:c({onBeforeInputCapture:null})},dependencies:[f.topCompositionEnd,f.topKeyPress,f.topTextInput,f.topPaste]}},m=null,v=!1,g={eventTypes:h,extractEvents:function(e,t,n,r){var i;if(l)switch(e){case f.topKeyPress:var s=r.which;if(s!==p)return;v=!0,i=d;break;case f.topTextInput:if(i=r.data,i===d&&v)return;break;default:return}else{switch(e){case f.topPaste:m=null;break;case f.topKeyPress:r.which&&!o(r)&&(m=String.fromCharCode(r.which));break;case f.topCompositionEnd:m=r.data}if(null===m)return;i=m}if(i){var c=u.getPooled(h.beforeInput,n,r);return c.data=i,m=null,a.accumulateTwoPhaseDispatches(c),c}}};e.exports=g},function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=C.getPooled(M.change,I,e);N.accumulateTwoPhaseDispatches(t),b.batchedUpdates(i,t)}function i(e){E.enqueueEvents(e),E.processEventQueue()}function a(e,t){T=e,I=t,T.attachEvent("onchange",o)}function s(){T&&(T.detachEvent("onchange",o),T=null,I=null)}function u(e,t,n){return e===x.topChange?n:void 0}function c(e,t,n){e===x.topFocus?(s(),a(t,n)):e===x.topBlur&&s()}function l(e,t){T=e,I=t,R=e.value,P=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",V),T.attachEvent("onpropertychange",d)}function p(){T&&(delete T.value,T.detachEvent("onpropertychange",d),T=null,I=null,R=null,P=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,o(e))}}function f(e,t,n){return e===x.topInput?n:void 0}function h(e,t,n){e===x.topFocus?(p(),l(t,n)):e===x.topBlur&&p()}function m(e){return e!==x.topSelectionChange&&e!==x.topKeyUp&&e!==x.topKeyDown||!T||T.value===R?void 0:(R=T.value,I)}function v(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===x.topClick?n:void 0}var y=n(7),E=n(27),N=n(22),_=n(5),b=n(12),C=n(19),D=n(51),O=n(77),w=n(14),x=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:w({onChange:null}),captured:w({onChangeCapture:null})},dependencies:[x.topBlur,x.topChange,x.topClick,x.topFocus,x.topInput,x.topKeyDown,x.topKeyUp,x.topSelectionChange]}},T=null,I=null,R=null,P=null,S=!1;_.canUseDOM&&(S=D("change")&&(!("documentMode"in document)||document.documentMode>8));var k=!1;_.canUseDOM&&(k=D("input")&&(!("documentMode"in document)||document.documentMode>9));var V={get:function(){return P.get.call(this)},set:function(e){R=""+e,P.set.call(this,e)}},L={eventTypes:M,extractEvents:function(e,t,n,o){var i,a;if(r(t)?S?i=u:a=c:O(t)?k?i=f:(i=m,a=h):v(t)&&(i=g),i){var s=i(e,t,n);if(s){var l=C.getPooled(M.change,s,o);return N.accumulateTwoPhaseDispatches(l),l}}a&&a(e,t,n)}};e.exports=L},function(e){"use strict";var t=0,n={createReactRootIndex:function(){return t++}};e.exports=n},function(e,t,n){"use strict";function r(e){switch(e){case y.topCompositionStart:return N.compositionStart;case y.topCompositionEnd:return N.compositionEnd;case y.topCompositionUpdate:return N.compositionUpdate}}function o(e,t){return e===y.topKeyDown&&t.keyCode===m}function i(e,t){switch(e){case y.topKeyUp:return-1!==h.indexOf(t.keyCode);case y.topKeyDown:return t.keyCode!==m;case y.topKeyPress:case y.topMouseDown:case y.topBlur:return!0;default:return!1}}function a(e){this.root=e,this.startSelection=l.getSelection(e),this.startValue=this.getText()}var s=n(7),u=n(22),c=n(5),l=n(42),p=n(135),d=n(50),f=n(14),h=[9,13,27,32],m=229,v=c.canUseDOM&&"CompositionEvent"in window,g=!v||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,y=s.topLevelTypes,E=null,N={compositionEnd:{phasedRegistrationNames:{bubbled:f({onCompositionEnd:null}),captured:f({onCompositionEndCapture:null})},dependencies:[y.topBlur,y.topCompositionEnd,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:f({onCompositionStart:null}),captured:f({onCompositionStartCapture:null})},dependencies:[y.topBlur,y.topCompositionStart,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:f({onCompositionUpdate:null}),captured:f({onCompositionUpdateCapture:null})},dependencies:[y.topBlur,y.topCompositionUpdate,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]}};a.prototype.getText=function(){return this.root.value||this.root[d()]},a.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var _={eventTypes:N,extractEvents:function(e,t,n,s){var c,l;if(v?c=r(e):E?i(e,s)&&(c=N.compositionEnd):o(e,s)&&(c=N.compositionStart),g&&(E||c!==N.compositionStart?c===N.compositionEnd&&E&&(l=E.getData(),E=null):E=new a(t)),c){var d=p.getPooled(c,n,s);return l&&(d.data=l),u.accumulateTwoPhaseDispatches(d),d}}};e.exports=_},function(e,t,n){(function(t){"use strict";function r(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var o,i=n(100),a=n(61),s=n(50),u=n(2),c=s();o="textContent"===c?function(e,t){e.textContent=t}:function(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=e.ownerDocument||document;e.appendChild(n.createTextNode(t))}};var l={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:o,processUpdates:function(e,n){for(var s,c=null,l=null,p=0;s=e[p];p++)if(s.type===a.MOVE_EXISTING||s.type===a.REMOVE_NODE){var d=s.fromIndex,f=s.parentNode.childNodes[d],h=s.parentID;"production"!==t.env.NODE_ENV?u(f,"processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a when using tables, nesting tags like ,

, or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",d,h):u(f),c=c||{},c[h]=c[h]||[],c[h][d]=f,l=l||[],l.push(f)}var m=i.dangerouslyRenderMarkup(n);if(l)for(var v=0;v]+)/,l="data-danger-index",p={dangerouslyRenderMarkup:function(e){"production"!==t.env.NODE_ENV?u(o.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):u(o.canUseDOM); 19 | for(var n,p={},d=0;d node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See renderComponentToString()."):u("html"!==e.tagName.toLowerCase());var r=i(n,a)[0];e.parentNode.replaceChild(r,e)}};e.exports=p}).call(t,n(1))},function(e,t,n){"use strict";var r=n(14),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({CompositionEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(7),o=n(22),i=n(32),a=n(9),s=n(14),u=r.topLevelTypes,c=a.getFirstReactDOM,l={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],d={eventTypes:l,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var s;if(t.window===t)s=t;else{var d=t.ownerDocument;s=d?d.defaultView||d.parentWindow:window}var f,h;if(e===u.topMouseOut?(f=t,h=c(r.relatedTarget||r.toElement)||s):(f=s,h=t),f===h)return null;var m=f?a.getID(f):"",v=h?a.getID(h):"",g=i.getPooled(l.mouseLeave,m,r);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=i.getPooled(l.mouseEnter,v,r);return y.type="mouseenter",y.target=h,y.relatedTarget=f,o.accumulateEnterLeaveDispatches(g,y,m,v),p[0]=g,p[1]=y,p}};e.exports=d},function(e,t,n){(function(t){var r=n(13),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,n,o){return e.addEventListener?(e.addEventListener(n,o,!0),{remove:function(){e.removeEventListener(n,o,!0)}}):("production"!==t.env.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:r})},registerDefault:function(){}};e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";var r,o=n(17),i=n(5),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,c=o.injection.HAS_SIDE_EFFECTS,l=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,height:a,hidden:a|u,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|u,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|u,muted:s|u,name:null,noValidate:u,open:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:l,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|c,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|u,itemType:a,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(7),o=n(13),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};e.exports=a},function(e,t,n){(function(t){"use strict";var r=n(21),o=n(38),i=n(107),a=n(24),s=n(8),u=n(40),c=n(18),l=n(4),p=n(41),d=n(16),f=n(58),h=n(119),m=n(25),v=n(28),g=n(9),y=n(60),E=n(11),N=n(66),_=n(128),b=n(69),C=n(3),D=n(44),O=n(159);h.inject();var w=l.createElement,x=l.createFactory;"production"!==t.env.NODE_ENV&&(w=p.createElement,x=p.createFactory),w=v.wrapCreateElement(w),x=v.wrapCreateFactory(x);var M=E.measure("React","render",g.render),T={Children:{map:i.map,forEach:i.forEach,count:i.count,only:O},DOM:d,PropTypes:N,initializeTouchEvents:function(e){o.useTouchEvents=e},createClass:s.createClass,createElement:w,createFactory:x,constructAndRenderComponent:g.constructAndRenderComponent,constructAndRenderComponentByID:g.constructAndRenderComponentByID,render:M,renderToString:_.renderToString,renderToStaticMarkup:_.renderToStaticMarkup,unmountComponentAtNode:g.unmountComponentAtNode,isValidClass:v.isValidClass,isValidElement:l.isValidElement,withContext:u.withContext,__spread:C,renderComponent:D("React","renderComponent","render",this,M),renderComponentToString:D("React","renderComponentToString","renderToString",this,_.renderToString),renderComponentToStaticMarkup:D("React","renderComponentToStaticMarkup","renderToStaticMarkup",this,_.renderToStaticMarkup),isValidComponent:D("React","isValidComponent","isValidElement",this,l.isValidElement)};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({Component:a,CurrentOwner:c,DOMComponent:f,DOMPropertyOperations:r,InstanceHandles:m,Mount:g,MultiChild:y,TextComponent:b}),"production"!==t.env.NODE_ENV){var I=n(5);if(I.canUseDOM&&window.top===window.self){navigator.userAgent.indexOf("Chrome")>-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: http://fb.me/react-devtools");for(var R=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],P=0;Pl;l++){var m=c[l];if(m!==s&&m.form===s.form){var g=p.getID(m);"production"!==t.env.NODE_ENV?h(g,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."):h(g);var y=v[g];"production"!==t.env.NODE_ENV?h(y,"ReactDOMInput: Unknown radio button ID %s.",g):h(y),d.asap(r,y)}}}return n}});e.exports=g}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var r=n(10),o=n(8),i=n(4),a=n(16),s=n(6),u=i.createFactory(a.option.type),c=o.createClass({displayName:"ReactDOMOption",mixins:[r],componentWillMount:function(){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?s(null==this.props.selected,"Use the `defaultValue` or `value` props on , and ) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this.constructor.displayName):a(!1)},render:function(){return n(this.props)}});return r}var o=n(8),i=n(4),a=n(2);e.exports=r}).call(t,n(1))},function(e,t,n){(function(t){function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,n){var o=c;"production"!==t.env.NODE_ENV?u(!!c,"createNodesFromMarkup dummy not initialized"):u(!!c);var i=r(e),l=i&&s(i);if(l){o.innerHTML=l[1]+e+l[2];for(var p=l[0];p--;)o=o.lastChild}else o.innerHTML=e;var d=o.getElementsByTagName("script");d.length&&("production"!==t.env.NODE_ENV?u(n,"createNodesFromMarkup(...): Unexpected 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | require('babel/register'); 3 | import React from 'react'; 4 | import ApplicationView from './views/application'; 5 | 6 | React.render( 7 | , 8 | document.body 9 | ); -------------------------------------------------------------------------------- /src/styles/application.styl: -------------------------------------------------------------------------------- 1 | body 2 | .application 3 | height: 100vh 4 | overflow: hidden 5 | 6 | .application 7 | display: flex 8 | flex-direction: row 9 | background: #F0F0F0 10 | 11 | .application.is-accepting 12 | .application.is-loading 13 | align-items: center 14 | justify-content: center 15 | 16 | .application.is-ready 17 | align-items: stretch 18 | justify-content: stretch 19 | 20 | .application--loader::before 21 | display: block 22 | content: " " 23 | width: 52px 24 | height: 8px 25 | mergin-bottom: 15px 26 | border-radius: 999px 27 | border: solid thick gray 28 | animation: rotate infinite 1.5s 29 | background: white 30 | -------------------------------------------------------------------------------- /src/styles/base.styl: -------------------------------------------------------------------------------- 1 | * 2 | box-sizing: border-box 3 | 4 | html 5 | font-family: sans-serif 6 | font-variant-ligatures: common-ligatures 7 | vendor(font-feature-settings, "kern") 8 | line-height: 1.3 9 | font-size: 18px 10 | 11 | html 12 | body 13 | margin: 0 14 | padding: 0 15 | 16 | img 17 | display: block 18 | max-width: 100% 19 | 20 | @keyframes rotate { 21 | from { transform: rotate(0deg) } 22 | to { transform: rotate(359deg) } 23 | } 24 | -------------------------------------------------------------------------------- /src/styles/editor.styl: -------------------------------------------------------------------------------- 1 | .editor 2 | flex: 1 3 | padding: 25px 4 | background: white 5 | overflow-y: scroll 6 | 7 | .editor .layer--info 8 | display: flex 9 | flex-direction: row 10 | border-top: solid thin #DDD 11 | border-bottom: solid thin #DDD 12 | padding: 8px 12px 13 | 14 | .editor .layer--info:hover 15 | color: steelblue 16 | 17 | .editor .layer--visibility 18 | margin-right: 12px 19 | cursor: pointer 20 | 21 | .editor .layer.is-hidden 22 | color: gray 23 | 24 | .editor .layer--children 25 | padding: 0 26 | padding-left: 40px 27 | margin-top: -1px 28 | -------------------------------------------------------------------------------- /src/styles/index.styl: -------------------------------------------------------------------------------- 1 | @import nib 2 | @import base 3 | @import application 4 | @import editor 5 | @import preview 6 | -------------------------------------------------------------------------------- /src/styles/preview.styl: -------------------------------------------------------------------------------- 1 | .preview 2 | display: flex 3 | flex: 1 4 | padding: 25px 5 | overflow-y: auto 6 | background: #EEE 7 | 8 | .preview--container 9 | position: relative 10 | width: 100% 11 | 12 | .preview--layers 13 | position: absolute 14 | overflow: hidden 15 | width: 100% 16 | height: 100% 17 | 18 | .preview .layer 19 | position: absolute 20 | 21 | .preview .highlight 22 | position: absolute 23 | background: rgba(steelblue, .3) 24 | outline: solid thin steelblue 25 | z-index: 10 26 | 27 | .preview .highlight--coords 28 | position: absolute 29 | transform: translateY(-100%); 30 | left: -1px; 31 | z-index: 10 32 | padding: 5px 12px; 33 | font-size: .7rem; 34 | color: white; 35 | background: rgba(steelblue); 36 | white-space: nowrap 37 | -------------------------------------------------------------------------------- /src/utils/get-layer-id.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function getLayerId(layer) { 4 | if (!layer) return; 5 | let pos = layer.layer.layerEnd || 0; 6 | let path = layer.path(); 7 | return `${pos}-${path}`; 8 | }; -------------------------------------------------------------------------------- /src/utils/get-layer-offset.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let defaults = { 4 | left: 0, right: 0, 5 | top: 0, bottom: 0, 6 | width: 0, height: 0, 7 | }; 8 | 9 | export default function(layer, scale=1) { 10 | if (!layer) return defaults; 11 | let offset = layer.parent || defaults; 12 | return { 13 | left: scale * (layer.left - offset.left), 14 | top: scale * (layer.top - offset.top), 15 | width: scale * (layer.width), 16 | height: scale * (layer.height), 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /src/utils/get-layer-position.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let defaults = { 4 | left: 0, right: 0, 5 | top: 0, bottom: 0, 6 | width: 0, height: 0, 7 | }; 8 | 9 | export default function(layer, scale=1) { 10 | if (!layer) return defaults; 11 | return { 12 | left: scale * layer.left, 13 | top: scale * layer.top, 14 | width: scale * layer.width, 15 | height: scale * layer.height, 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /src/views/application.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import PSD from 'psd'; 3 | import React from 'react'; 4 | import Preview from './preview'; 5 | import Editor from './editor'; 6 | import getLayerId from '../utils/get-layer-id'; 7 | 8 | 9 | export default React.createClass({ 10 | 11 | getInitialState() { 12 | return {}; 13 | }, 14 | 15 | enableFileDrop(event) { 16 | event.preventDefault(); 17 | }, 18 | 19 | async dropFile(event) { 20 | event.preventDefault(); 21 | this.setState({ loading:true, psd:null }); 22 | let psd = await PSD.fromEvent(event); 23 | this.setState({ loading:false, psd }); 24 | }, 25 | 26 | toggleLayer(layer) { 27 | layer.layer.visible = !layer.visible(); 28 | this.forceUpdate(); 29 | }, 30 | 31 | highlightLayer(layer) { 32 | this.setState({ highlightedLayer: layer }); 33 | }, 34 | 35 | currentState() { 36 | if (this.state.loading) return 'loading'; 37 | else if (this.state.psd) return 'ready'; 38 | else return 'accepting'; 39 | }, 40 | 41 | render() { 42 | return ( 43 |

49 | ); 50 | }, 51 | 52 | renderContent() { 53 | return { 54 | accepting: this.renderAcceptor(), 55 | loading: this.renderLoader(), 56 | ready: this.renderApplication(), 57 | }[this.currentState()]; 58 | }, 59 | 60 | renderApplication() { 61 | return { 62 | preview: , 64 | editor: , 68 | }; 69 | }, 70 | 71 | renderAcceptor() { 72 | return
73 | Drop a PSD document here. 74 |
; 75 | }, 76 | 77 | renderLoader() { 78 | return
; 79 | }, 80 | 81 | }); -------------------------------------------------------------------------------- /src/views/editor-layer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import React from 'react'; 3 | import getLayerId from '../utils/get-layer-id'; 4 | let T = React.PropTypes; 5 | 6 | 7 | let Layer = React.createClass({ 8 | 9 | propTypes: { 10 | layer: T.object.isRequired, 11 | onToggle: T.func, 12 | onHover: T.func, 13 | onLeave: T.func, 14 | }, 15 | 16 | getDefaultProps() { 17 | return { 18 | onToggle() {}, 19 | onHover() {}, 20 | onLeave() {}, 21 | }; 22 | }, 23 | 24 | isHidden() { 25 | return this.props.layer.visible() === false; 26 | }, 27 | 28 | render() { 29 | let {layer} = this.props; 30 | return ( 31 |
32 | {this.renderInfo(layer)} 33 | {this.renderChildren(layer.children())} 34 |
35 | ); 36 | }, 37 | 38 | renderInfo(layer) { 39 | let onClick = () => this.props.onToggle(layer); 40 | let onHover = () => this.props.onHover(layer); 41 | let onLeave = () => this.props.onLeave(); 42 | return ( 43 |
46 | 47 | 50 | 51 | 52 | {layer.name || 'Root layer'} 53 | 54 |
55 | ); 56 | }, 57 | 58 | renderChildren(layers) { 59 | return ( 60 |
    61 | {layers.map(function(layer) { 62 | return ; 67 | }, this)} 68 |
69 | ); 70 | }, 71 | 72 | }); 73 | 74 | export default Layer; -------------------------------------------------------------------------------- /src/views/editor.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import React from 'react'; 3 | import PSD from 'psd'; 4 | import Layer from './editor-layer'; 5 | let T = React.PropTypes; 6 | 7 | 8 | export default React.createClass({ 9 | 10 | propTypes: { 11 | psd: T.instanceOf(PSD), 12 | onToggleLayer: T.func, 13 | onHoverLayer: T.func, 14 | onLeaveLayer: T.func, 15 | }, 16 | 17 | getLayerTree() { 18 | return this.props.psd.tree(); 19 | }, 20 | 21 | render() { 22 | if (!this.props.psd) return; 23 | let root = this.getLayerTree(); 24 | return ( 25 |
26 | 30 |
31 | ); 32 | } 33 | 34 | }); -------------------------------------------------------------------------------- /src/views/preview-highlight.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import React from 'react'; 3 | import getLayerPosition from '../utils/get-layer-position'; 4 | let T = React.PropTypes; 5 | 6 | 7 | export default React.createClass({ 8 | 9 | propTypes: { 10 | layer: T.object, 11 | scale: T.number, 12 | }, 13 | 14 | getStyle(layer) { 15 | let scale = this.props.scale; 16 | return getLayerPosition(layer, scale); 17 | }, 18 | 19 | getLayerHeader(layer) { 20 | return `${layer.name || 'Root'} — ` 21 | + `${layer.left} x ${layer.top} - ` 22 | + `${layer.width} x ${layer.height}`; 23 | }, 24 | 25 | render() { 26 | if (!this.props.layer) return false; 27 | let {layer} = this.props; 28 | let style = this.getStyle(layer); 29 | return ( 30 |
32 |
33 | {this.getLayerHeader(layer)} 34 |
35 |
36 | ); 37 | }, 38 | 39 | }); 40 | -------------------------------------------------------------------------------- /src/views/preview-layer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import React from 'react'; 3 | import cx from 'react/lib/cx'; 4 | import getLayerId from '../utils/get-layer-id'; 5 | import getLayerOffset from '../utils/get-layer-offset'; 6 | let T = React.PropTypes; 7 | 8 | 9 | let Layer = React.createClass({ 10 | 11 | propTypes: { 12 | layer: T.object.isRequired, 13 | scale: T.number, 14 | }, 15 | 16 | getInitialState() { 17 | return {}; 18 | }, 19 | 20 | getDefaultProps() { 21 | return { 22 | scale: 1 23 | }; 24 | }, 25 | 26 | componentDidMount() { 27 | this.cacheImage(); 28 | }, 29 | 30 | cacheImage() { 31 | let {layer} = this.props; 32 | if (!layer.isLayer()) return; 33 | this.setState({ image: layer.toPng().src }); 34 | }, 35 | 36 | render() { 37 | let {layer} = this.props; 38 | if (layer.isRoot() || layer.isGroup()) { 39 | return this.renderGroup(layer); 40 | } else { 41 | return this.renderLayer(layer); 42 | } 43 | }, 44 | 45 | getStyle(layer) { 46 | let scale = this.props.scale; 47 | return getLayerOffset(layer, scale); 48 | }, 49 | 50 | isVisible(layer) { 51 | return this.props.visible !== false 52 | && layer.visible() !== false; 53 | }, 54 | 55 | getClassName(layer) { 56 | return cx({ 57 | 'layer': true, 58 | 'is-group': layer.isGroup(), 59 | 'is-layer': layer.isLayer(), 60 | }); 61 | }, 62 | 63 | renderGroup(layer) { 64 | return ( 65 |
67 | {layer.children().reverse().map(this.renderChild)} 68 |
69 | ); 70 | }, 71 | 72 | renderLayer(layer) { 73 | return ( 74 |
76 | {this.isVisible(layer)? : ''} 77 |
78 | ); 79 | }, 80 | 81 | renderChild(layer) { 82 | return ( 83 | 87 | ); 88 | }, 89 | 90 | }); 91 | 92 | export default Layer; -------------------------------------------------------------------------------- /src/views/preview.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | import React from 'react'; 3 | import PSD from 'psd'; 4 | import Highlight from './preview-highlight'; 5 | import Layer from './preview-layer'; 6 | let T = React.PropTypes; 7 | 8 | 9 | export default React.createClass({ 10 | 11 | propTypes: { 12 | psd: T.instanceOf(PSD).isRequired, 13 | highlightedLayer: T.object 14 | }, 15 | 16 | getInitialState() { 17 | return {}; 18 | }, 19 | 20 | getScale() { 21 | let {maxWidth} = this.state; 22 | let image = this.props.psd.tree().width; 23 | if (maxWidth && image > maxWidth) { 24 | return maxWidth / image; 25 | } else { 26 | return 1; 27 | } 28 | }, 29 | 30 | componentDidMount() { 31 | let container = this.refs.container.getDOMNode().clientWidth; 32 | this.setState({ maxWidth: container }); 33 | }, 34 | 35 | render() { 36 | let root = this.props.psd.tree(); 37 | let scale = this.getScale(); 38 | let height = scale * root.height; 39 | let {highlightedLayer} = this.props; 40 | return ( 41 |
42 |
45 | 46 |
47 | 48 |
49 | 50 | 52 |
53 |
54 | ); 55 | }, 56 | 57 | }); -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | // Assertion library. 2 | require('should'); 3 | 4 | // Run tests 5 | require('./module'); -------------------------------------------------------------------------------- /test/module.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | var ... = require('../src/...'); 4 | 5 | describe('...', function(){ 6 | 7 | var ... 8 | 9 | it('...', function(){ 10 | // ... 11 | }); 12 | 13 | }); 14 | 15 | */ --------------------------------------------------------------------------------