Index: package-lock.json
===================================================================
--- package-lock.json (revision 43688)
+++ package-lock.json (working copy)
@@ -4,6 +4,14 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@babel/runtime": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz",
+ "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==",
+ "requires": {
+ "regenerator-runtime": "^0.12.0"
+ }
+ },
"@webassemblyjs/ast": {
"version": "1.7.8",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.8.tgz",
@@ -176,6 +184,387 @@
"@xtuc/long": "4.2.1"
}
},
+ "@wordpress/a11y": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-2.0.1.tgz",
+ "integrity": "sha512-YG5TGbyKoGrb41cyFMp0+GkgPlcWkgAjXmLTkh8OPsH0mOvjKg1eaDy+Ehk3XQzHJrv7mqTl5EONZ1LoAkHnIw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/dom-ready": "^2.0.1"
+ }
+ },
+ "@wordpress/api-fetch": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-2.0.1.tgz",
+ "integrity": "sha512-Bi3ZdgGm7k3Ki7MO6n0NuSpas2bf1NRm6Hv+Z5M1iXoRM7UkVg+3m/Hz291uO812cnTwmrDXS7oqHUqVBhEh3w==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/hooks": "^2.0.1",
+ "@wordpress/i18n": "^3.0.0"
+ }
+ },
+ "@wordpress/autop": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-2.0.1.tgz",
+ "integrity": "sha512-/iQLiW0ufCPMLOGzcd7q2f3i1JE8xLfmxeVHmkDR+Oxz5k8pEjL4IK9sy2b1F4TmHr8Exu5FhkCHBnHqtjxe1w==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/blob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-2.0.1.tgz",
+ "integrity": "sha512-YL7fWkpNhTJxqgrJXp+nHChovktsvfCo3FNrbXJSt9O+viyvuOo4ZyQOf7u5sPIHsnBOyXDiZPdQ6V/2Gqu6ew==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/block-serialization-default-parser": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-1.0.0.tgz",
+ "integrity": "sha512-A03gT/vD4xWkbgZ0gwukzaoYmxfWFnr5cep8Q8+p7PUsvC3oGj6vktJLteIYsZjAqsimKrHbH5fCAvP0vqgteg==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/block-serialization-spec-parser": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-spec-parser/-/block-serialization-spec-parser-1.0.2.tgz",
+ "integrity": "sha512-MLEvTGIg4jYWnwLw2Gyp/jMHcS3wueuXsIRZPi+f4h2IfFwlF/H2R1jV6gjbjQig8hhAQ5xGGsClcHdENQYCTg=="
+ },
+ "@wordpress/blocks": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-4.0.0.tgz",
+ "integrity": "sha512-Qkj1BoR59gL/+7IdDQPOMHEOeJhlh7uH3aZ2WzpnAHXHSPF5X6nbOO6+DTJQVElZc8+RespPwC3zfKmqqZNuGw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/autop": "^2.0.1",
+ "@wordpress/blob": "^2.0.1",
+ "@wordpress/block-serialization-default-parser": "^1.0.0",
+ "@wordpress/block-serialization-spec-parser": "^1.0.2",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/deprecated": "^2.0.1",
+ "@wordpress/dom": "^2.0.1",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/hooks": "^2.0.1",
+ "@wordpress/i18n": "^3.0.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "@wordpress/shortcode": "^2.0.1",
+ "hpq": "^1.2.0",
+ "lodash": "^4.17.10",
+ "rememo": "^3.0.0",
+ "showdown": "^1.8.6",
+ "simple-html-tokenizer": "^0.4.1",
+ "tinycolor2": "^1.4.1",
+ "uuid": "^3.1.0"
+ }
+ },
+ "@wordpress/components": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-4.0.0.tgz",
+ "integrity": "sha512-c/V8L5Zy87UeiuKfEbYRAbcwutWTTia5KqIDLvXdX4Vj1HR8lV+7H4IZAusejbt+ebZ8g0aTxQT7VCvLLA7n0A==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/a11y": "^2.0.1",
+ "@wordpress/api-fetch": "^2.0.1",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/deprecated": "^2.0.1",
+ "@wordpress/dom": "^2.0.1",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/hooks": "^2.0.1",
+ "@wordpress/i18n": "^3.0.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "@wordpress/keycodes": "^2.0.1",
+ "@wordpress/url": "^2.0.1",
+ "classnames": "^2.2.5",
+ "clipboard": "^1.7.1",
+ "diff": "^3.5.0",
+ "dom-scroll-into-view": "^1.2.1",
+ "lodash": "^4.17.10",
+ "memize": "^1.0.5",
+ "moment": "^2.22.1",
+ "mousetrap": "^1.6.2",
+ "react-click-outside": "^2.3.1",
+ "react-color": "^2.13.4",
+ "react-datepicker": "^1.4.1",
+ "rememo": "^3.0.0",
+ "uuid": "^3.1.0"
+ }
+ },
+ "@wordpress/compose": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-2.0.1.tgz",
+ "integrity": "sha512-NtcAcut7Z3P95wFRrbzQkNe/qva8iv7PSe7q9FA/C2/3Z4XrASQdGJV89B9O+fWejnLgbhqp4WpU9N1oOnc9xw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/core-data": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-2.0.1.tgz",
+ "integrity": "sha512-nvnvIUqmul74SHkb4+cfetB1lRglACI/fjY12+iUHsM9Fh0u3bzC9cNSvoXe6NLaO5+OwqTeMBDRk5mkn1td8g==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/api-fetch": "^2.0.1",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/url": "^2.0.1",
+ "equivalent-key-map": "^0.2.1",
+ "lodash": "^4.17.10",
+ "rememo": "^3.0.0"
+ }
+ },
+ "@wordpress/data": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-2.1.0.tgz",
+ "integrity": "sha512-z+LtIBnNrH+I2HrosyQuKBGDu3EkjBGwPxHE8zU8sbPZwATflxgeWbbFBh7uAVaYhA56f1dK1rGeQICwtZnZiA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/deprecated": "^2.0.1",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "@wordpress/redux-routine": "^3.0.0",
+ "equivalent-key-map": "^0.2.0",
+ "lodash": "^4.17.10",
+ "redux": "^3.7.2"
+ }
+ },
+ "@wordpress/date": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-2.0.1.tgz",
+ "integrity": "sha512-DnAqy552fSEhLLjlAAEQal95otYtwp8SpCvWff49UIl71DV9FJK/ybcHJE6dpWvA5FFlzFo4QL3Yc25R0jNKMQ==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "moment": "^2.22.1",
+ "moment-timezone": "^0.5.16"
+ }
+ },
+ "@wordpress/deprecated": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-2.0.1.tgz",
+ "integrity": "sha512-EI7v+L4rflmGwgAGxz/piWfZ7Sqhb9FLnFMK3B7s7brG/CXvap85ZO7l4/4SBsOBBD0c+Ac16/dpjGZb6SRExg==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/hooks": "^2.0.1"
+ }
+ },
+ "@wordpress/dom": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-2.0.1.tgz",
+ "integrity": "sha512-IBIKsr3uNpQ/ZHKEFpb/+E7Qz8ea+lKbqd21euciZq+h1A6i1YfFvI1mjtFgcAq9eM4V2na/A44nJZmpHpNxiA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/dom-ready": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-2.0.1.tgz",
+ "integrity": "sha512-ikUYNvPGLx1JsjtdWLEjpwcONf+EtsonOn0mvpF9WNvNHx5oi+dUsyyd+i+ROoeC6suKXeTz/5ZwLTrTc4F8ag==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/editor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-4.0.0.tgz",
+ "integrity": "sha512-cxnAUrzeEUPA61xPuLWmcZazQ2VTk0PR/ggdx2qbtXWO1IiPA2EY+NJcuHad3oyoGETKr5U98qQbIQtzpvDzBg==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/a11y": "^2.0.1",
+ "@wordpress/api-fetch": "^2.0.1",
+ "@wordpress/blob": "^2.0.1",
+ "@wordpress/blocks": "^4.0.0",
+ "@wordpress/components": "^4.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/core-data": "^2.0.1",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/date": "^2.0.1",
+ "@wordpress/deprecated": "^2.0.1",
+ "@wordpress/dom": "^2.0.1",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/hooks": "^2.0.1",
+ "@wordpress/html-entities": "^2.0.1",
+ "@wordpress/i18n": "^3.0.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "@wordpress/keycodes": "^2.0.1",
+ "@wordpress/nux": "^2.0.1",
+ "@wordpress/token-list": "^1.0.1",
+ "@wordpress/url": "^2.0.1",
+ "@wordpress/viewport": "^2.0.1",
+ "@wordpress/wordcount": "^2.0.1",
+ "classnames": "^2.2.5",
+ "dom-scroll-into-view": "^1.2.1",
+ "inherits": "^2.0.3",
+ "lodash": "^4.17.10",
+ "memize": "^1.0.5",
+ "react-autosize-textarea": "^3.0.2",
+ "redux-multi": "^0.1.12",
+ "redux-optimist": "^1.0.0",
+ "refx": "^3.0.0",
+ "rememo": "^3.0.0",
+ "tinycolor2": "^1.4.1",
+ "tinymce": "^4.7.2",
+ "traverse": "^0.6.6",
+ "uuid": "^3.1.0"
+ }
+ },
+ "@wordpress/element": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-2.1.0.tgz",
+ "integrity": "sha512-U8wKK9Lycvzx5wymGbXKVkZ+R35JBltabHWIin0DGqwTW9Pmtyg7LR/uWdsbJI+GfRLGa2kGuHtafLJkKkx3XA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10",
+ "react": "^16.4.1",
+ "react-dom": "^16.4.1"
+ }
+ },
+ "@wordpress/hooks": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-2.0.1.tgz",
+ "integrity": "sha512-9S7oyAh7KYtfMdNQFhvPC8y6O1M0EAcJHdRwc9yoh7ST1AdsyKmeWbcGqRRJrBTh8Rqsq8b40MI+4K2tv1DlSg==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/html-entities": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-2.0.1.tgz",
+ "integrity": "sha512-Z8N7u+NhPKgCeIaLwqPfrETPtpdqlB6oTeuLrkY2nfTN3/Y2cql9sjea6gyzVKCOvgQ8gHusd/soI/gkaA0rMw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/i18n": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.0.0.tgz",
+ "integrity": "sha512-m7bPh5nj10jyNmZtDGKSv6VQQ9ioEYBXR40fPQnvc/YvuJ1UByxXiXJxyCwkkY9Ar5NT68BnWJNLcF/uCU/UrA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/deprecated": "^2.0.1",
+ "gettext-parser": "^1.3.1",
+ "jed": "^1.1.1",
+ "lodash": "^4.17.10",
+ "memize": "^1.0.5"
+ }
+ },
+ "@wordpress/is-shallow-equal": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-1.1.4.tgz",
+ "integrity": "sha512-ihJrYrW+G9GWtQjyB44DVKMCoiTTYPl5T/g1Ix9PMrKl2rk5uVbJw9yMmhik/jTIQqubpzhxGtrqsddwuUH1sw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0"
+ }
+ },
+ "@wordpress/keycodes": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.0.1.tgz",
+ "integrity": "sha512-BJvXg4gHKaHHzv3rwggsKo8yETrGbNVFya8xKIECjTZDMbND+iQ5QKt353nzLB3i5g5Wd5ZbBTjMWBoVC3UMxQ==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/library-export-default-webpack-plugin": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@wordpress/library-export-default-webpack-plugin/-/library-export-default-webpack-plugin-1.0.4.tgz",
+ "integrity": "sha512-7+Hjw/xqFKXkMKCMz2Yb5jkQW6hHkihfIw0qvHLUPvo5eWrha8l+gUYVgh2is9p/17tFlSvt0zUK4IhWomUwsw==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10",
+ "webpack-sources": "^1.1.0"
+ }
+ },
+ "@wordpress/nux": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-2.0.1.tgz",
+ "integrity": "sha512-4rvylvuGC0n7fgdK9O0zayutCzofOVcjMBkK1p9WqVFMlV/tTNrR/Z3j6d50uCeU4o/FIq9EKN+h2paTCqYm0Q==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/components": "^4.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/i18n": "^3.0.0",
+ "lodash": "^4.17.10",
+ "rememo": "^3.0.0"
+ }
+ },
+ "@wordpress/plugins": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-2.0.1.tgz",
+ "integrity": "sha512-t/SmLKkGbcTY6uoQehkXgtKIoLOwLJ7M6nfWsJyM+HkwxP+pgBOeAfWqu5XUZz6kDVRi3GTy0pTzDapWQyTzrA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/hooks": "^2.0.1",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/redux-routine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-3.0.0.tgz",
+ "integrity": "sha512-Bs3uu2CMcLr/838EjcbVRgxaypl6ANvldIrtN6+jklFHJm1/2wSoD12NiBxFXEb2D6cr4bOSWm9N/oEkxr2Hxw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "rungen": "^0.3.2"
+ }
+ },
+ "@wordpress/shortcode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-2.0.1.tgz",
+ "integrity": "sha512-cOPnZZvzrSBkFA+9wLPPp03mqfUqhPFRAElFu3T7I1QP1rJbFv+wY8MnnIsAMV10Z1fx4Mh3JBOwmc45Gcsrsw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10",
+ "memize": "^1.0.5"
+ }
+ },
+ "@wordpress/token-list": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-1.0.1.tgz",
+ "integrity": "sha512-T0eIKETtU7cCqHE2zEh5pyLYlawmCA/Dhb5O9C3n+dcO9v9jQkiCoE3rquHVoLkUQl8HXySoeJkSyi0PjUOLfA==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/url": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.0.1.tgz",
+ "integrity": "sha512-jmeSPJPzYuRF9kUkMS11HzwcWkK4QIQjITxttLNPAsfnkrEhDMRNEvBHqA9IA2eX+T39qjoU/I76FGJ1yNMWFQ==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "qs": "^6.5.2"
+ }
+ },
+ "@wordpress/viewport": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-2.0.1.tgz",
+ "integrity": "sha512-pXowYjBGFkJ7NSvCaIvIO6HoULW9Lup/+WFKF3f+2rNw9RQG9wy/UpBMeCMt/gp6W7V5WLa6mYkvZqK9O3tkSQ==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/element": "^2.1.0",
+ "lodash": "^4.17.10"
+ }
+ },
+ "@wordpress/wordcount": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-2.0.1.tgz",
+ "integrity": "sha512-tss0X9CQik/CgiHlev96BtEolWMRP7TxTD6OwcsWS72Gf2I0ULtIqeNcaZg4Ll1JEe/AnhMdYAyYc3bu6GgPvw==",
+ "requires": {
+ "@babel/runtime": "^7.0.0",
+ "lodash": "^4.17.10"
+ }
+ },
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@@ -254,6 +643,12 @@
"repeat-string": "^1.5.2"
}
},
+ "alphanum-sort": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
+ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
+ "dev": true
+ },
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
@@ -290,8 +685,7 @@
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "3.2.1",
@@ -786,6 +1180,12 @@
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true
},
+ "arrify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+ "dev": true
+ },
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@@ -895,6 +1295,11 @@
"postcss-value-parser": "^3.2.3"
}
},
+ "autosize": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.2.tgz",
+ "integrity": "sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA=="
+ },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -1252,6 +1657,12 @@
"multicast-dns-service-types": "^1.1.0"
}
},
+ "boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
+ "dev": true
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -1545,6 +1956,18 @@
"map-obj": "^1.0.0"
}
},
+ "caniuse-api": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
+ "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "caniuse-lite": "^1.0.0",
+ "lodash.memoize": "^4.1.2",
+ "lodash.uniq": "^4.5.0"
+ }
+ },
"caniuse-lite": {
"version": "1.0.30000890",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000890.tgz",
@@ -1802,6 +2225,11 @@
}
}
},
+ "classnames": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
+ "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
+ },
"clean-css": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
@@ -1852,6 +2280,16 @@
"integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
"dev": true
},
+ "clipboard": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-1.7.1.tgz",
+ "integrity": "sha1-Ng1taUbpmnof7zleQrqStem1oWs=",
+ "requires": {
+ "good-listener": "^1.2.2",
+ "select": "^1.1.2",
+ "tiny-emitter": "^2.0.0"
+ }
+ },
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
@@ -1894,8 +2332,7 @@
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "dev": true
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"coffeescript": {
"version": "1.10.0",
@@ -2014,6 +2451,11 @@
}
}
},
+ "computed-style": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/computed-style/-/computed-style-0.1.4.tgz",
+ "integrity": "sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ="
+ },
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -2125,6 +2567,67 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
"dev": true
},
+ "copy-webpack-plugin": {
+ "version": "4.5.2",
+ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz",
+ "integrity": "sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ==",
+ "dev": true,
+ "requires": {
+ "cacache": "^10.0.4",
+ "find-cache-dir": "^1.0.0",
+ "globby": "^7.1.1",
+ "is-glob": "^4.0.0",
+ "loader-utils": "^1.1.0",
+ "minimatch": "^3.0.4",
+ "p-limit": "^1.0.0",
+ "serialize-javascript": "^1.4.0"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "globby": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz",
+ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=",
+ "dev": true,
+ "requires": {
+ "array-union": "^1.0.1",
+ "dir-glob": "^2.0.0",
+ "glob": "^7.1.2",
+ "ignore": "^3.3.5",
+ "pify": "^3.0.0",
+ "slash": "^1.0.0"
+ }
+ },
+ "is-glob": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
+ }
+ },
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@@ -2131,6 +2634,45 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
+ "cosmiconfig": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.6.tgz",
+ "integrity": "sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ==",
+ "dev": true,
+ "requires": {
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.9.0",
+ "parse-json": "^4.0.0"
+ },
+ "dependencies": {
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
+ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ }
+ }
+ }
+ },
"crc": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
@@ -2200,8 +2742,6 @@
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "dev": true,
- "optional": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
@@ -2244,6 +2784,165 @@
}
}
},
+ "css-color-names": {
+ "version": "0.0.4",
+ "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
+ "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
+ "dev": true
+ },
+ "css-declaration-sorter": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz",
+ "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.1",
+ "timsort": "^0.3.0"
+ }
+ },
+ "css-select": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.0.tgz",
+ "integrity": "sha512-MGhoq1S9EyPgZIGnts8Yz5WwUOyHmPMdlqeifsYs/xFX7AAm3hY0RJe1dqVlXtYPI66Nsk39R/sa5/ree6L2qg==",
+ "dev": true,
+ "requires": {
+ "boolbase": "^1.0.0",
+ "css-what": "2.1",
+ "domutils": "^1.7.0",
+ "nth-check": "^1.0.1"
+ },
+ "dependencies": {
+ "domutils": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
+ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
+ "dev": true,
+ "requires": {
+ "dom-serializer": "0",
+ "domelementtype": "1"
+ }
+ }
+ }
+ },
+ "css-select-base-adapter": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.0.tgz",
+ "integrity": "sha1-AQKz0UYw34bD65+p9UVicBBs+ZA=",
+ "dev": true
+ },
+ "css-tree": {
+ "version": "1.0.0-alpha.28",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz",
+ "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==",
+ "dev": true,
+ "requires": {
+ "mdn-data": "~1.1.0",
+ "source-map": "^0.5.3"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ }
+ }
+ },
+ "css-unit-converter": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz",
+ "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=",
+ "dev": true
+ },
+ "css-url-regex": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz",
+ "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=",
+ "dev": true
+ },
+ "css-what": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz",
+ "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=",
+ "dev": true
+ },
+ "cssnano": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.4.tgz",
+ "integrity": "sha512-wP0wbOM9oqsek14CiNRYrK9N3w3jgadtGZKHXysgC/OMVpy0KZgWVPdNqODSZbz7txO9Gekr9taOfcCgL0pOOw==",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^5.0.0",
+ "cssnano-preset-default": "^4.0.2",
+ "is-resolvable": "^1.0.0",
+ "postcss": "^7.0.0"
+ }
+ },
+ "cssnano-preset-default": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.2.tgz",
+ "integrity": "sha512-zO9PeP84l1E4kbrdyF7NSLtA/JrJY1paX5FHy5+w/ziIXO2kDqDMfJ/mosXkaHHSa3RPiIY3eB6aEgwx3IiGqA==",
+ "dev": true,
+ "requires": {
+ "css-declaration-sorter": "^4.0.1",
+ "cssnano-util-raw-cache": "^4.0.1",
+ "postcss": "^7.0.0",
+ "postcss-calc": "^6.0.2",
+ "postcss-colormin": "^4.0.2",
+ "postcss-convert-values": "^4.0.1",
+ "postcss-discard-comments": "^4.0.1",
+ "postcss-discard-duplicates": "^4.0.2",
+ "postcss-discard-empty": "^4.0.1",
+ "postcss-discard-overridden": "^4.0.1",
+ "postcss-merge-longhand": "^4.0.6",
+ "postcss-merge-rules": "^4.0.2",
+ "postcss-minify-font-values": "^4.0.2",
+ "postcss-minify-gradients": "^4.0.1",
+ "postcss-minify-params": "^4.0.1",
+ "postcss-minify-selectors": "^4.0.1",
+ "postcss-normalize-charset": "^4.0.1",
+ "postcss-normalize-display-values": "^4.0.1",
+ "postcss-normalize-positions": "^4.0.1",
+ "postcss-normalize-repeat-style": "^4.0.1",
+ "postcss-normalize-string": "^4.0.1",
+ "postcss-normalize-timing-functions": "^4.0.1",
+ "postcss-normalize-unicode": "^4.0.1",
+ "postcss-normalize-url": "^4.0.1",
+ "postcss-normalize-whitespace": "^4.0.1",
+ "postcss-ordered-values": "^4.1.1",
+ "postcss-reduce-initial": "^4.0.2",
+ "postcss-reduce-transforms": "^4.0.1",
+ "postcss-svgo": "^4.0.1",
+ "postcss-unique-selectors": "^4.0.1"
+ }
+ },
+ "cssnano-util-get-arguments": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz",
+ "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=",
+ "dev": true
+ },
+ "cssnano-util-get-match": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz",
+ "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=",
+ "dev": true
+ },
+ "cssnano-util-raw-cache": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz",
+ "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "cssnano-util-same-parent": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz",
+ "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==",
+ "dev": true
+ },
"csso": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz",
@@ -2323,8 +3022,7 @@
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"decode-uri-component": {
"version": "0.2.0",
@@ -2568,6 +3266,15 @@
}
}
},
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dev": true,
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@@ -2649,6 +3356,11 @@
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
+ "delegate": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
+ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
+ },
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@@ -2699,8 +3411,7 @@
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
- "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
- "dev": true
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
},
"diffie-hellman": {
"version": "5.0.3",
@@ -2713,6 +3424,33 @@
"randombytes": "^2.0.0"
}
},
+ "dir-glob": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
+ "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
+ "dev": true,
+ "requires": {
+ "arrify": "^1.0.1",
+ "path-type": "^3.0.0"
+ },
+ "dependencies": {
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
+ }
+ },
"dns-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
@@ -2738,6 +3476,11 @@
"buffer-indexof": "^1.0.0"
}
},
+ "dom-scroll-into-view": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz",
+ "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4="
+ },
"dom-serializer": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
@@ -2793,6 +3536,15 @@
"domelementtype": "1"
}
},
+ "dot-prop": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
+ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
+ "dev": true,
+ "requires": {
+ "is-obj": "^1.0.0"
+ }
+ },
"download": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/download/-/download-4.4.3.tgz",
@@ -2903,6 +3655,14 @@
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
"dev": true
},
+ "encoding": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
+ "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
+ "requires": {
+ "iconv-lite": "~0.4.13"
+ }
+ },
"end-of-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
@@ -2929,6 +3689,11 @@
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
"dev": true
},
+ "equivalent-key-map": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/equivalent-key-map/-/equivalent-key-map-0.2.2.tgz",
+ "integrity": "sha512-xvHeyCDbZzkpN4VHQj/n+j2lOwL0VWszG30X4cOrc9Y7Tuo2qCdZK/0AMod23Z5dCtNUbaju6p0rwOhHUk05ew=="
+ },
"errno": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
@@ -2957,6 +3722,30 @@
"is-arrayish": "^0.2.1"
}
},
+ "es-abstract": {
+ "version": "1.12.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
+ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.1.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.1",
+ "is-callable": "^1.1.3",
+ "is-regex": "^1.0.4"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
+ "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
+ "dev": true,
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
"es6-promise": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
@@ -3087,8 +3876,6 @@
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
- "dev": true,
- "optional": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
@@ -3497,6 +4284,12 @@
"integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=",
"dev": true
},
+ "flatten": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz",
+ "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=",
+ "dev": true
+ },
"flush-write-stream": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz",
@@ -4177,6 +4970,12 @@
"rimraf": "2"
}
},
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
@@ -4205,8 +5004,7 @@
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
- "dev": true
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
},
"get-proxy": {
"version": "1.1.0",
@@ -4226,8 +5024,7 @@
"get-stream": {
"version": "3.0.0",
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
- "dev": true
+ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-value": {
"version": "2.0.6",
@@ -4250,6 +5047,15 @@
"assert-plus": "^1.0.0"
}
},
+ "gettext-parser": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.4.0.tgz",
+ "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==",
+ "requires": {
+ "encoding": "^0.1.12",
+ "safe-buffer": "^5.1.1"
+ }
+ },
"gifsicle": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-3.0.4.tgz",
@@ -4433,6 +5239,14 @@
"sparkles": "^1.0.0"
}
},
+ "good-listener": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
+ "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
+ "requires": {
+ "delegate": "^3.1.2"
+ }
+ },
"got": {
"version": "5.7.1",
"resolved": "http://registry.npmjs.org/got/-/got-5.7.1.tgz",
@@ -5285,6 +6099,15 @@
"har-schema": "^2.0.0"
}
},
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
@@ -5309,6 +6132,12 @@
"sparkles": "^1.0.0"
}
},
+ "has-symbols": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
+ "dev": true
+ },
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
@@ -5405,6 +6234,12 @@
"pinkie-promise": "^2.0.0"
}
},
+ "hex-color-regex": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
+ "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==",
+ "dev": true
+ },
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@@ -5416,6 +6251,11 @@
"minimalistic-crypto-utils": "^1.0.1"
}
},
+ "hoist-non-react-statics": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz",
+ "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs="
+ },
"homedir-polyfill": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
@@ -5449,12 +6289,28 @@
"wbuf": "^1.1.0"
}
},
+ "hpq": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/hpq/-/hpq-1.2.0.tgz",
+ "integrity": "sha1-nGGLI5YqLXPW6Cugh0l4vLNov6I="
+ },
+ "hsl-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz",
+ "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=",
+ "dev": true
+ },
+ "hsla-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz",
+ "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=",
+ "dev": true
+ },
"html-comment-regex": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz",
"integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=",
- "dev": true,
- "optional": true
+ "dev": true
},
"html-entities": {
"version": "1.2.1",
@@ -5875,7 +6731,6 @@
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dev": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
@@ -5892,6 +6747,12 @@
"integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
"dev": true
},
+ "ignore": {
+ "version": "3.3.10",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz",
+ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
+ "dev": true
+ },
"iltorb": {
"version": "1.3.10",
"resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz",
@@ -6057,6 +6918,12 @@
"repeating": "^2.0.0"
}
},
+ "indexes-of": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
+ "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
+ "dev": true
+ },
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
@@ -6076,8 +6943,7 @@
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.5",
@@ -6171,8 +7037,7 @@
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
- "dev": true
+ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
},
"ip": {
"version": "1.1.5",
@@ -6208,6 +7073,12 @@
"is-relative": "^0.1.0"
}
},
+ "is-absolute-url": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz",
+ "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=",
+ "dev": true
+ },
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
@@ -6253,6 +7124,26 @@
"integrity": "sha1-XuWOqlounIDiFAe+3yOuWsCRs/w=",
"dev": true
},
+ "is-callable": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
+ "dev": true
+ },
+ "is-color-stop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz",
+ "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=",
+ "dev": true,
+ "requires": {
+ "css-color-names": "^0.0.4",
+ "hex-color-regex": "^1.1.0",
+ "hsl-regex": "^1.0.0",
+ "hsla-regex": "^1.0.0",
+ "rgb-regex": "^1.0.1",
+ "rgba-regex": "^1.0.0"
+ }
+ },
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -6262,6 +7153,12 @@
"kind-of": "^3.0.2"
}
},
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+ "dev": true
+ },
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
@@ -6281,6 +7178,12 @@
}
}
},
+ "is-directory": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+ "dev": true
+ },
"is-dotfile": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
@@ -6321,7 +7224,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6448,6 +7350,15 @@
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
"dev": true
},
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1"
+ }
+ },
"is-relative": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz",
@@ -6454,6 +7365,12 @@
"integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=",
"dev": true
},
+ "is-resolvable": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
+ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
+ "dev": true
+ },
"is-retry-allowed": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
@@ -6463,8 +7380,7 @@
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
- "dev": true
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-svg": {
"version": "2.1.0",
@@ -6476,6 +7392,15 @@
"html-comment-regex": "^1.1.0"
}
},
+ "is-symbol": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
+ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
+ "dev": true,
+ "requires": {
+ "has-symbols": "^1.0.0"
+ }
+ },
"is-tar": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-tar/-/is-tar-1.0.0.tgz",
@@ -6533,8 +7458,7 @@
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
- "dev": true
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isobject": {
"version": "2.1.0",
@@ -6551,6 +7475,11 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
},
+ "jed": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/jed/-/jed-1.1.1.tgz",
+ "integrity": "sha1-elSbvZ/+FYWwzQoZHiAwVb7ldLQ="
+ },
"jpegtran-bin": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz",
@@ -6569,6 +7498,11 @@
"integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==",
"dev": true
},
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
"js-yaml": {
"version": "3.5.5",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz",
@@ -6787,11 +7721,18 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "dev": true,
"requires": {
"invert-kv": "^1.0.0"
}
},
+ "line-height": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/line-height/-/line-height-0.3.1.tgz",
+ "integrity": "sha1-SxIF7d4YKHKl76PI9iCzGHqcVMk=",
+ "requires": {
+ "computed-style": "~0.1.3"
+ }
+ },
"livereload-js": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz",
@@ -6832,7 +7773,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
@@ -6841,8 +7781,7 @@
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
}
}
},
@@ -6849,9 +7788,13 @@
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
- "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
- "dev": true
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
+ "lodash-es": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.11.tgz",
+ "integrity": "sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q=="
+ },
"lodash._basecopy": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
@@ -6980,6 +7923,12 @@
"lodash.isarray": "^3.0.0"
}
},
+ "lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
+ "dev": true
+ },
"lodash.mergewith": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
@@ -7019,6 +7968,12 @@
"lodash.escape": "^3.0.0"
}
},
+ "lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
+ "dev": true
+ },
"logalot": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz",
@@ -7042,6 +7997,14 @@
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"dev": true
},
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "requires": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ }
+ },
"loud-rejection": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
@@ -7075,7 +8038,6 @@
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
"integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
- "dev": true,
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
@@ -7464,6 +8426,11 @@
}
}
},
+ "material-colors": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz",
+ "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg=="
+ },
"math-random": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
@@ -7529,6 +8496,12 @@
"safe-buffer": "^5.1.2"
}
},
+ "mdn-data": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz",
+ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==",
+ "dev": true
+ },
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -7546,6 +8519,11 @@
"p-is-promise": "^1.1.0"
}
},
+ "memize": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/memize/-/memize-1.0.5.tgz",
+ "integrity": "sha512-Dm8Jhb5kiC4+ynYsVR4QDXKt+o2dfqGuY4hE2x+XlXZkdndlT80bJxfcMv5QGp/FCy6MhG7f5ElpmKPFKOSEpg=="
+ },
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
@@ -7667,8 +8645,7 @@
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
- "dev": true
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
"mimic-response": {
"version": "1.0.1",
@@ -7775,9 +8752,21 @@
"moment": {
"version": "2.22.2",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
- "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=",
- "dev": true
+ "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
},
+ "moment-timezone": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.21.tgz",
+ "integrity": "sha512-j96bAh4otsgj3lKydm3K7kdtA3iKf2m6MY2iSYCzCm5a1zmHo1g+aK3068dDEeocLZQIS9kU8bsdQHLqEvgW0A==",
+ "requires": {
+ "moment": ">= 2.9.0"
+ }
+ },
+ "mousetrap": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.2.tgz",
+ "integrity": "sha512-jDjhi7wlHwdO6q6DS7YRmSHcuI+RVxadBkLt3KHrhd3C2b+w5pKefg3oj5beTcHZyVFA9Aksf+yEE1y5jxUjVA=="
+ },
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@@ -8209,11 +9198,16 @@
"integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
"dev": true
},
+ "normalize-url": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz",
+ "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==",
+ "dev": true
+ },
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "dev": true,
"requires": {
"path-key": "^2.0.0"
}
@@ -8230,6 +9224,15 @@
"set-blocking": "~2.0.0"
}
},
+ "nth-check": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
+ "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=",
+ "dev": true,
+ "requires": {
+ "boolbase": "~1.0.0"
+ }
+ },
"num2fraction": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
@@ -8239,8 +9242,7 @@
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
- "dev": true
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.9.0",
@@ -8251,8 +9253,7 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "dev": true
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-copy": {
"version": "0.1.0",
@@ -8276,6 +9277,12 @@
}
}
},
+ "object-keys": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
+ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
+ "dev": true
+ },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@@ -8293,6 +9300,16 @@
}
}
},
+ "object.getownpropertydescriptors": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
+ "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.5.1"
+ }
+ },
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
@@ -8320,6 +9337,18 @@
}
}
},
+ "object.values": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.0.4.tgz",
+ "integrity": "sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo=",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.6.1",
+ "function-bind": "^1.1.0",
+ "has": "^1.0.1"
+ }
+ },
"obuf": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
@@ -8449,8 +9478,7 @@
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
- "dev": true
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-is-promise": {
"version": "1.1.0",
@@ -8462,7 +9490,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
"requires": {
"p-try": "^1.0.0"
}
@@ -8471,7 +9498,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
"requires": {
"p-limit": "^1.1.0"
}
@@ -8491,8 +9517,7 @@
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
},
"package": {
"version": "1.0.1",
@@ -8622,8 +9647,7 @@
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
- "dev": true
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-parse": {
"version": "1.0.6",
@@ -8752,6 +9776,11 @@
"irregular-plurals": "^1.0.0"
}
},
+ "popper.js": {
+ "version": "1.14.4",
+ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz",
+ "integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY="
+ },
"portfinder": {
"version": "1.0.17",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz",
@@ -8780,6 +9809,452 @@
"supports-color": "^5.5.0"
}
},
+ "postcss-calc": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-6.0.2.tgz",
+ "integrity": "sha512-fiznXjEN5T42Qm7qqMCVJXS3roaj9r4xsSi+meaBVe7CJBl8t/QLOXu02Z2E6oWAMWIvCuF6JrvzFekmVEbOKA==",
+ "dev": true,
+ "requires": {
+ "css-unit-converter": "^1.1.1",
+ "postcss": "^7.0.2",
+ "postcss-selector-parser": "^2.2.2",
+ "reduce-css-calc": "^2.0.0"
+ }
+ },
+ "postcss-colormin": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.2.tgz",
+ "integrity": "sha512-1QJc2coIehnVFsz0otges8kQLsryi4lo19WD+U5xCWvXd0uw/Z+KKYnbiNDCnO9GP+PvErPHCG0jNvWTngk9Rw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "color": "^3.0.0",
+ "has": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ },
+ "dependencies": {
+ "color": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/color/-/color-3.1.0.tgz",
+ "integrity": "sha512-CwyopLkuRYO5ei2EpzpIh6LqJMt6Mt+jZhO5VI5f/wJLZriXQE32/SSqzmrh+QB+AZT81Cj8yv+7zwToW8ahZg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.1",
+ "color-string": "^1.5.2"
+ }
+ },
+ "color-string": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz",
+ "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==",
+ "dev": true,
+ "requires": {
+ "color-name": "^1.0.0",
+ "simple-swizzle": "^0.2.2"
+ }
+ }
+ }
+ },
+ "postcss-convert-values": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz",
+ "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-discard-comments": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.1.tgz",
+ "integrity": "sha512-Ay+rZu1Sz6g8IdzRjUgG2NafSNpp2MSMOQUb+9kkzzzP+kh07fP0yNbhtFejURnyVXSX3FYy2nVNW1QTnNjgBQ==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-discard-duplicates": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz",
+ "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-discard-empty": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz",
+ "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-discard-overridden": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz",
+ "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-merge-longhand": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.6.tgz",
+ "integrity": "sha512-JavnI+V4IHWsaUAfOoKeMEiJQGXTraEy1nHM0ILlE6NIQPEZrJDAnPh3lNGZ5HAk2mSSrwp66JoGhvjp6SqShA==",
+ "dev": true,
+ "requires": {
+ "css-color-names": "0.0.4",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0",
+ "stylehacks": "^4.0.0"
+ }
+ },
+ "postcss-merge-rules": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.2.tgz",
+ "integrity": "sha512-UiuXwCCJtQy9tAIxsnurfF0mrNHKc4NnNx6NxqmzNNjXpQwLSukUxELHTRF0Rg1pAmcoKLih8PwvZbiordchag==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "caniuse-api": "^3.0.0",
+ "cssnano-util-same-parent": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-selector-parser": "^3.0.0",
+ "vendors": "^1.0.0"
+ },
+ "dependencies": {
+ "postcss-selector-parser": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz",
+ "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=",
+ "dev": true,
+ "requires": {
+ "dot-prop": "^4.1.1",
+ "indexes-of": "^1.0.1",
+ "uniq": "^1.0.1"
+ }
+ }
+ }
+ },
+ "postcss-minify-font-values": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz",
+ "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-minify-gradients": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.1.tgz",
+ "integrity": "sha512-pySEW3E6Ly5mHm18rekbWiAjVi/Wj8KKt2vwSfVFAWdW6wOIekgqxKxLU7vJfb107o3FDNPkaYFCxGAJBFyogA==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-arguments": "^4.0.0",
+ "is-color-stop": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-minify-params": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.1.tgz",
+ "integrity": "sha512-h4W0FEMEzBLxpxIVelRtMheskOKKp52ND6rJv+nBS33G1twu2tCyurYj/YtgU76+UDCvWeNs0hs8HFAWE2OUFg==",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.0",
+ "browserslist": "^4.0.0",
+ "cssnano-util-get-arguments": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0",
+ "uniqs": "^2.0.0"
+ }
+ },
+ "postcss-minify-selectors": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.1.tgz",
+ "integrity": "sha512-8+plQkomve3G+CodLCgbhAKrb5lekAnLYuL1d7Nz+/7RANpBEVdgBkPNwljfSKvZ9xkkZTZITd04KP+zeJTJqg==",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.0",
+ "has": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-selector-parser": "^3.0.0"
+ },
+ "dependencies": {
+ "postcss-selector-parser": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz",
+ "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=",
+ "dev": true,
+ "requires": {
+ "dot-prop": "^4.1.1",
+ "indexes-of": "^1.0.1",
+ "uniq": "^1.0.1"
+ }
+ }
+ }
+ },
+ "postcss-normalize-charset": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz",
+ "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-normalize-display-values": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.1.tgz",
+ "integrity": "sha512-R5mC4vaDdvsrku96yXP7zak+O3Mm9Y8IslUobk7IMP+u/g+lXvcN4jngmHY5zeJnrQvE13dfAg5ViU05ZFDwdg==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-match": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-positions": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.1.tgz",
+ "integrity": "sha512-GNoOaLRBM0gvH+ZRb2vKCIujzz4aclli64MBwDuYGU2EY53LwiP7MxOZGE46UGtotrSnmarPPZ69l2S/uxdaWA==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-arguments": "^4.0.0",
+ "has": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-repeat-style": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.1.tgz",
+ "integrity": "sha512-fFHPGIjBUyUiswY2rd9rsFcC0t3oRta4wxE1h3lpwfQZwFeFjXFSiDtdJ7APCmHQOnUZnqYBADNRPKPwFAONgA==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-arguments": "^4.0.0",
+ "cssnano-util-get-match": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-string": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.1.tgz",
+ "integrity": "sha512-IJoexFTkAvAq5UZVxWXAGE0yLoNN/012v7TQh5nDo6imZJl2Fwgbhy3J2qnIoaDBrtUP0H7JrXlX1jjn2YcvCQ==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-timing-functions": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.1.tgz",
+ "integrity": "sha512-1nOtk7ze36+63ONWD8RCaRDYsnzorrj+Q6fxkQV+mlY5+471Qx9kspqv0O/qQNMeApg8KNrRf496zHwJ3tBZ7w==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-match": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-unicode": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz",
+ "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-url": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz",
+ "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==",
+ "dev": true,
+ "requires": {
+ "is-absolute-url": "^2.0.0",
+ "normalize-url": "^3.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-normalize-whitespace": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.1.tgz",
+ "integrity": "sha512-U8MBODMB2L+nStzOk6VvWWjZgi5kQNShCyjRhMT3s+W9Jw93yIjOnrEkKYD3Ul7ChWbEcjDWmXq0qOL9MIAnAw==",
+ "dev": true,
+ "requires": {
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-ordered-values": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.1.tgz",
+ "integrity": "sha512-PeJiLgJWPzkVF8JuKSBcylaU+hDJ/TX3zqAMIjlghgn1JBi6QwQaDZoDIlqWRcCAI8SxKrt3FCPSRmOgKRB97Q==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-arguments": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-reduce-initial": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.2.tgz",
+ "integrity": "sha512-epUiC39NonKUKG+P3eAOKKZtm5OtAtQJL7Ye0CBN1f+UQTHzqotudp+hki7zxXm7tT0ZAKDMBj1uihpPjP25ug==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "caniuse-api": "^3.0.0",
+ "has": "^1.0.0",
+ "postcss": "^7.0.0"
+ }
+ },
+ "postcss-reduce-transforms": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.1.tgz",
+ "integrity": "sha512-sZVr3QlGs0pjh6JAIe6DzWvBaqYw05V1t3d9Tp+VnFRT5j+rsqoWsysh/iSD7YNsULjq9IAylCznIwVd5oU/zA==",
+ "dev": true,
+ "requires": {
+ "cssnano-util-get-match": "^4.0.0",
+ "has": "^1.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0"
+ }
+ },
+ "postcss-selector-parser": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz",
+ "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=",
+ "dev": true,
+ "requires": {
+ "flatten": "^1.0.2",
+ "indexes-of": "^1.0.1",
+ "uniq": "^1.0.1"
+ }
+ },
+ "postcss-svgo": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.1.tgz",
+ "integrity": "sha512-YD5uIk5NDRySy0hcI+ZJHwqemv2WiqqzDgtvgMzO8EGSkK5aONyX8HMVFRFJSdO8wUWTuisUFn/d7yRRbBr5Qw==",
+ "dev": true,
+ "requires": {
+ "is-svg": "^3.0.0",
+ "postcss": "^7.0.0",
+ "postcss-value-parser": "^3.0.0",
+ "svgo": "^1.0.0"
+ },
+ "dependencies": {
+ "coa": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.1.tgz",
+ "integrity": "sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==",
+ "dev": true,
+ "requires": {
+ "q": "^1.1.2"
+ }
+ },
+ "csso": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz",
+ "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==",
+ "dev": true,
+ "requires": {
+ "css-tree": "1.0.0-alpha.29"
+ },
+ "dependencies": {
+ "css-tree": {
+ "version": "1.0.0-alpha.29",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz",
+ "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==",
+ "dev": true,
+ "requires": {
+ "mdn-data": "~1.1.0",
+ "source-map": "^0.5.3"
+ }
+ }
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "is-svg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
+ "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==",
+ "dev": true,
+ "requires": {
+ "html-comment-regex": "^1.1.0"
+ }
+ },
+ "js-yaml": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
+ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ },
+ "svgo": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.1.1.tgz",
+ "integrity": "sha512-GBkJbnTuFpM4jFbiERHDWhZc/S/kpHToqmZag3aEBjPYK44JAN2QBjvrGIxLOoCyMZjuFQIfTO2eJd8uwLY/9g==",
+ "dev": true,
+ "requires": {
+ "coa": "~2.0.1",
+ "colors": "~1.1.2",
+ "css-select": "^2.0.0",
+ "css-select-base-adapter": "~0.1.0",
+ "css-tree": "1.0.0-alpha.28",
+ "css-url-regex": "^1.1.0",
+ "csso": "^3.5.0",
+ "js-yaml": "^3.12.0",
+ "mkdirp": "~0.5.1",
+ "object.values": "^1.0.4",
+ "sax": "~1.2.4",
+ "stable": "~0.1.6",
+ "unquote": "~1.1.1",
+ "util.promisify": "~1.0.0"
+ }
+ }
+ }
+ },
+ "postcss-unique-selectors": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz",
+ "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.0",
+ "postcss": "^7.0.0",
+ "uniqs": "^2.0.0"
+ }
+ },
"postcss-value-parser": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz",
@@ -8861,6 +10336,15 @@
"integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
"dev": true
},
+ "prop-types": {
+ "version": "15.6.2",
+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz",
+ "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==",
+ "requires": {
+ "loose-envify": "^1.3.1",
+ "object-assign": "^4.1.1"
+ }
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -8880,8 +10364,7 @@
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"psl": {
"version": "1.1.29",
@@ -8934,14 +10417,12 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
- "dev": true,
- "optional": true
+ "dev": true
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
- "dev": true
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"querystring": {
"version": "0.2.0",
@@ -9041,6 +10522,91 @@
"strip-json-comments": "~2.0.1"
}
},
+ "react": {
+ "version": "16.5.2",
+ "resolved": "https://registry.npmjs.org/react/-/react-16.5.2.tgz",
+ "integrity": "sha512-FDCSVd3DjVTmbEAjUNX6FgfAmQ+ypJfHUsqUJOYNCBUp1h8lqmtC+0mXJ+JjsWx4KAVTkk1vKd1hLQPvEviSuw==",
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1",
+ "prop-types": "^15.6.2",
+ "schedule": "^0.5.0"
+ }
+ },
+ "react-autosize-textarea": {
+ "version": "3.0.3",
+ "resolved": "http://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
+ "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==",
+ "requires": {
+ "autosize": "^4.0.0",
+ "line-height": "^0.3.1",
+ "prop-types": "^15.5.6"
+ }
+ },
+ "react-click-outside": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/react-click-outside/-/react-click-outside-2.3.1.tgz",
+ "integrity": "sha1-MYc3698IGko7zUaCVmNnTL6YNus=",
+ "requires": {
+ "hoist-non-react-statics": "^1.2.0"
+ }
+ },
+ "react-color": {
+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/react-color/-/react-color-2.14.1.tgz",
+ "integrity": "sha512-ssv2ArSZdhTbIs29hyfw8JW+s3G4BCx/ILkwCajWZzrcx/2ZQfRpsaLVt38LAPbxe50LLszlmGtRerA14JzzRw==",
+ "requires": {
+ "lodash": "^4.0.1",
+ "material-colors": "^1.2.1",
+ "prop-types": "^15.5.10",
+ "reactcss": "^1.2.0",
+ "tinycolor2": "^1.4.1"
+ }
+ },
+ "react-datepicker": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-1.6.0.tgz",
+ "integrity": "sha512-wfFfw3Tn+CCTtP7PPPhSAfkfVT3UTifFb8BmuhtwWKK3g4S83EEPRQE18XFtxd22dKGqp336NVtDTTyUJ1p9+g==",
+ "requires": {
+ "classnames": "^2.2.5",
+ "prop-types": "^15.6.0",
+ "react-onclickoutside": "^6.7.1",
+ "react-popper": "^0.9.1"
+ }
+ },
+ "react-dom": {
+ "version": "16.5.2",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.2.tgz",
+ "integrity": "sha512-RC8LDw8feuZOHVgzEf7f+cxBr/DnKdqp56VU0lAs1f4UfKc4cU8wU4fTq/mgnvynLQo8OtlPC19NUFh/zjZPuA==",
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1",
+ "prop-types": "^15.6.2",
+ "schedule": "^0.5.0"
+ }
+ },
+ "react-onclickoutside": {
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.7.1.tgz",
+ "integrity": "sha512-p84kBqGaMoa7VYT0vZ/aOYRfJB+gw34yjpda1Z5KeLflg70HipZOT+MXQenEhdkPAABuE2Astq4zEPdMqUQxcg=="
+ },
+ "react-popper": {
+ "version": "0.9.5",
+ "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-0.9.5.tgz",
+ "integrity": "sha1-AqJO8+7DOvnlToNYq3DrDjMe3QU=",
+ "requires": {
+ "popper.js": "^1.14.1",
+ "prop-types": "^15.6.1"
+ }
+ },
+ "reactcss": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz",
+ "integrity": "sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A==",
+ "requires": {
+ "lodash": "^4.0.1"
+ }
+ },
"read-all-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz",
@@ -9405,6 +10971,54 @@
"strip-indent": "^1.0.1"
}
},
+ "reduce-css-calc": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.5.tgz",
+ "integrity": "sha512-AybiBU03FKbjYzyvJvwkJZY6NLN+80Ufc2EqEs+41yQH+8wqBEslD6eGiS0oIeq5TNLA5PrhBeYHXWdn8gtW7A==",
+ "dev": true,
+ "requires": {
+ "css-unit-converter": "^1.1.1",
+ "postcss-value-parser": "^3.3.0"
+ }
+ },
+ "redux": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz",
+ "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==",
+ "requires": {
+ "lodash": "^4.2.1",
+ "lodash-es": "^4.2.1",
+ "loose-envify": "^1.1.0",
+ "symbol-observable": "^1.0.3"
+ },
+ "dependencies": {
+ "symbol-observable": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
+ "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
+ }
+ }
+ },
+ "redux-multi": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/redux-multi/-/redux-multi-0.1.12.tgz",
+ "integrity": "sha1-KOH+XklnLLxb2KB/Cyrq8O+DVcI="
+ },
+ "redux-optimist": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/redux-optimist/-/redux-optimist-1.0.0.tgz",
+ "integrity": "sha512-AG1v8o6UZcGXTEH2jVcWG6KD+gEix+Cj9JXAAzln9MPkauSVd98H7N7EOOyT/v4c9N1mJB4sm1zfspGlLDkUEw=="
+ },
+ "refx": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/refx/-/refx-3.1.1.tgz",
+ "integrity": "sha512-lwN27W5iYyagpCxxYDYDl0IIiKh0Vgi3wvafqfthbzTfBgLOYAstcftp+G2X612xVaB8rhn5wDxd4er4KEeb8A=="
+ },
+ "regenerator-runtime": {
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
+ "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg=="
+ },
"regex-cache": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
@@ -9445,6 +11059,11 @@
}
}
},
+ "rememo": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz",
+ "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ=="
+ },
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -9518,14 +11137,12 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "dev": true
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
- "dev": true
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"requires-port": {
"version": "1.0.0",
@@ -9614,6 +11231,18 @@
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
"dev": true
},
+ "rgb-regex": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz",
+ "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=",
+ "dev": true
+ },
+ "rgba-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz",
+ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=",
+ "dev": true
+ },
"right-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
@@ -9686,6 +11315,11 @@
"aproba": "^1.1.1"
}
},
+ "rungen": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/rungen/-/rungen-0.3.2.tgz",
+ "integrity": "sha1-QAwJ6+kU57F+C27zJjQA/Cq8fLM="
+ },
"rxjs": {
"version": "5.5.12",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz",
@@ -9698,8 +11332,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safe-json-parse": {
"version": "1.0.1",
@@ -9719,8 +11352,7 @@
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sanitize-html": {
"version": "1.19.1",
@@ -9791,6 +11423,14 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
+ "schedule": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz",
+ "integrity": "sha512-HUcJicG5Ou8xfR//c2rPT0lPIRR09vVvN81T9fqfVgBmhERUbDEQoYKjpBxbueJnCPpSu2ujXzOnRQt6x9o/jw==",
+ "requires": {
+ "object-assign": "^4.1.1"
+ }
+ },
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
@@ -9857,6 +11497,11 @@
"commander": "~2.8.1"
}
},
+ "select": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
+ "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0="
+ },
"select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -9952,8 +11597,7 @@
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
- "dev": true
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"set-immediate-shim": {
"version": "1.0.1",
@@ -9999,7 +11643,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
@@ -10007,8 +11650,7 @@
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
- "dev": true
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"shelljs": {
"version": "0.3.0",
@@ -10016,11 +11658,120 @@
"integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
"dev": true
},
+ "showdown": {
+ "version": "1.8.6",
+ "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.8.6.tgz",
+ "integrity": "sha1-kepO47elRIqspoIKTifmkMatdxw=",
+ "requires": {
+ "yargs": "^10.0.3"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
+ },
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
+ },
+ "cliui": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
+ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
+ "requires": {
+ "string-width": "^2.1.1",
+ "strip-ansi": "^4.0.0",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
+ },
+ "mem": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
+ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
+ "requires": {
+ "mimic-fn": "^1.0.0"
+ }
+ },
+ "os-locale": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
+ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
+ "requires": {
+ "execa": "^0.7.0",
+ "lcid": "^1.0.0",
+ "mem": "^1.1.0"
+ }
+ },
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "requires": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "requires": {
+ "ansi-regex": "^3.0.0"
+ }
+ },
+ "which-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
+ },
+ "yargs": {
+ "version": "10.1.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz",
+ "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==",
+ "requires": {
+ "cliui": "^4.0.0",
+ "decamelize": "^1.1.1",
+ "find-up": "^2.1.0",
+ "get-caller-file": "^1.0.1",
+ "os-locale": "^2.0.0",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^1.0.1",
+ "set-blocking": "^2.0.0",
+ "string-width": "^2.0.0",
+ "which-module": "^2.0.0",
+ "y18n": "^3.2.1",
+ "yargs-parser": "^8.1.0"
+ }
+ },
+ "yargs-parser": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz",
+ "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==",
+ "requires": {
+ "camelcase": "^4.1.0"
+ }
+ }
+ }
+ },
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"simple-concat": {
"version": "1.0.0",
@@ -10041,6 +11792,34 @@
"simple-concat": "^1.0.0"
}
},
+ "simple-html-tokenizer": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.4.3.tgz",
+ "integrity": "sha512-OpUzgR+P/Qsu6ztZehr4PxvTbV4sDW91hAqc2tnz4fjuFTqErWIUdUMbnzX+19F4IEpSSfa0vCAz5xJSs0LpPw=="
+ },
+ "simple-swizzle": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
+ "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
+ "dev": true,
+ "requires": {
+ "is-arrayish": "^0.3.1"
+ },
+ "dependencies": {
+ "is-arrayish": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
+ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
+ "dev": true
+ }
+ }
+ },
+ "slash": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+ "dev": true
+ },
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -10193,6 +11972,27 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
+ "source-map-loader": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz",
+ "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==",
+ "dev": true,
+ "requires": {
+ "async": "^2.5.0",
+ "loader-utils": "^1.1.0"
+ },
+ "dependencies": {
+ "async": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
+ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.10"
+ }
+ }
+ }
+ },
"source-map-resolve": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
@@ -10403,6 +12203,12 @@
"safe-buffer": "^5.1.1"
}
},
+ "stable": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
+ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
+ "dev": true
+ },
"stack-trace": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
@@ -10516,7 +12322,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -10536,7 +12341,6 @@
"version": "3.0.1",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -10604,8 +12408,7 @@
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
- "dev": true
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strip-indent": {
"version": "1.0.1",
@@ -10631,6 +12434,30 @@
"escape-string-regexp": "^1.0.2"
}
},
+ "stylehacks": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.1.tgz",
+ "integrity": "sha512-TK5zEPeD9NyC1uPIdjikzsgWxdQQN/ry1X3d1iOz1UkYDCmcr928gWD1KHgyC27F50UnE0xCTrBOO1l6KR8M4w==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "postcss": "^7.0.0",
+ "postcss-selector-parser": "^3.0.0"
+ },
+ "dependencies": {
+ "postcss-selector-parser": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz",
+ "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=",
+ "dev": true,
+ "requires": {
+ "dot-prop": "^4.1.1",
+ "indexes-of": "^1.0.1",
+ "uniq": "^1.0.1"
+ }
+ }
+ }
+ },
"sum-up": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sum-up/-/sum-up-1.0.3.tgz",
@@ -10899,6 +12726,17 @@
"setimmediate": "^1.0.4"
}
},
+ "timsort": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
+ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
+ "dev": true
+ },
+ "tiny-emitter": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz",
+ "integrity": "sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow=="
+ },
"tiny-lr": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz",
@@ -10930,6 +12768,16 @@
}
}
},
+ "tinycolor2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz",
+ "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
+ },
+ "tinymce": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.8.3.tgz",
+ "integrity": "sha512-kNEsKTqUYZRG+GTZ7tcVAktUlDeApz6d3IqnNaZXNX0CP0BsK8NPC02FCJ0EVYxdNnq6fvvknWkItmbreXD9aA=="
+ },
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -11033,6 +12881,11 @@
"punycode": "^1.4.1"
}
},
+ "traverse": {
+ "version": "0.6.6",
+ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz",
+ "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc="
+ },
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
@@ -11277,6 +13130,18 @@
}
}
},
+ "uniq": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
+ "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=",
+ "dev": true
+ },
+ "uniqs": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz",
+ "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=",
+ "dev": true
+ },
"unique-filename": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
@@ -11311,6 +13176,12 @@
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
"dev": true
},
+ "unquote": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
+ "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=",
+ "dev": true
+ },
"unset-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@@ -11466,6 +13337,16 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
+ "util.promisify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
+ "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "object.getownpropertydescriptors": "^2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
@@ -11475,8 +13356,7 @@
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
- "dev": true
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"vali-date": {
"version": "1.0.0",
@@ -11500,6 +13380,12 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true
},
+ "vendors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",
+ "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==",
+ "dev": true
+ },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
@@ -12290,6 +14176,15 @@
}
}
},
+ "webpack-livereload-plugin": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/webpack-livereload-plugin/-/webpack-livereload-plugin-2.1.1.tgz",
+ "integrity": "sha512-W7Q55QbPvVJotpIZSjjwzmqQ22333ExYxWM3WFlHKkbPStQqVRSmJkjntUqXF9jtpdeXi8r8HLkA1RVnAP0SQA==",
+ "dev": true,
+ "requires": {
+ "tiny-lr": "^1.1.1"
+ }
+ },
"webpack-log": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz",
@@ -12337,7 +14232,6 @@
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "dev": true,
"requires": {
"isexe": "^2.0.0"
}
@@ -12420,7 +14314,6 @@
"version": "2.1.0",
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
- "dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
@@ -12486,14 +14379,12 @@
"y18n": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
- "dev": true
+ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargs": {
"version": "7.1.0",
Index: package.json
===================================================================
--- package.json (revision 43688)
+++ package.json (working copy)
@@ -13,7 +13,10 @@
"author": "The WordPress Contributors",
"license": "GPL-2.0+",
"devDependencies": {
+ "@wordpress/library-export-default-webpack-plugin": "^1.0.4",
"autoprefixer": "^9.1.5",
+ "copy-webpack-plugin": "^4.5.2",
+ "cssnano": "^4.1.4",
"grunt": "~1.0.3",
"grunt-banner": "^0.6.0",
"grunt-contrib-clean": "~2.0.0",
@@ -38,7 +41,40 @@
"grunt-webpack": "^3.0.2",
"ink-docstrap": "^1.3.0",
"matchdep": "~2.0.0",
+ "source-map-loader": "^0.2.4",
"webpack": "^4.20.2",
- "webpack-dev-server": "^3.1.9"
+ "webpack-dev-server": "^3.1.9",
+ "webpack-livereload-plugin": "^2.1.1"
+ },
+ "dependencies": {
+ "@wordpress/a11y": "^2.0.1",
+ "@wordpress/api-fetch": "^2.0.1",
+ "@wordpress/autop": "^2.0.1",
+ "@wordpress/blob": "^2.0.1",
+ "@wordpress/block-serialization-default-parser": "^1.0.0",
+ "@wordpress/block-serialization-spec-parser": "^1.0.2",
+ "@wordpress/blocks": "^4.0.0",
+ "@wordpress/compose": "^2.0.1",
+ "@wordpress/core-data": "^2.0.1",
+ "@wordpress/data": "^2.1.0",
+ "@wordpress/date": "^2.0.1",
+ "@wordpress/deprecated": "^2.0.1",
+ "@wordpress/dom": "^2.0.1",
+ "@wordpress/dom-ready": "^2.0.1",
+ "@wordpress/editor": "^4.0.0",
+ "@wordpress/element": "^2.1.0",
+ "@wordpress/hooks": "^2.0.1",
+ "@wordpress/html-entities": "^2.0.1",
+ "@wordpress/i18n": "^3.0.0",
+ "@wordpress/is-shallow-equal": "^1.1.4",
+ "@wordpress/keycodes": "^2.0.1",
+ "@wordpress/nux": "^2.0.1",
+ "@wordpress/plugins": "^2.0.1",
+ "@wordpress/redux-routine": "^3.0.0",
+ "@wordpress/shortcode": "^2.0.1",
+ "@wordpress/token-list": "^1.0.1",
+ "@wordpress/url": "^2.0.1",
+ "@wordpress/viewport": "^2.0.1",
+ "@wordpress/wordcount": "^2.0.1"
}
}
Index: src/wp-includes/js/media-audiovideo.js
===================================================================
--- src/wp-includes/js/media-audiovideo.js (revision 43688)
+++ src/wp-includes/js/media-audiovideo.js (working copy)
@@ -81,1046 +81,119 @@
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ return __webpack_require__(__webpack_require__.s = "./src/wp-includes/js/media/audiovideo.manifest.js");
/******/ })
/************************************************************************/
-/******/ ([
-/* 0 */
+/******/ ({
+
+/***/ "./src/wp-includes/js/media/audiovideo.manifest.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/audiovideo.manifest.js ***!
+ \*********************************************************/
+/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-var media = wp.media,
- baseSettings = window._wpmejsSettings || {},
- l10n = window._wpMediaViewsL10n || {};
+eval("var media = wp.media,\n\tbaseSettings = window._wpmejsSettings || {},\n\tl10n = window._wpMediaViewsL10n || {};\n\n/**\n *\n * @summary Defines the wp.media.mixin object.\n *\n * @mixin\n *\n * @since 4.2.0\n */\nwp.media.mixin = {\n\tmejsSettings: baseSettings,\n\n\t/**\n\t * @summary Pauses and removes all players.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @return {void}\n\t */\n\tremoveAllPlayers: function() {\n\t\tvar p;\n\n\t\tif ( window.mejs && window.mejs.players ) {\n\t\t\tfor ( p in window.mejs.players ) {\n\t\t\t\twindow.mejs.players[p].pause();\n\t\t\t\tthis.removePlayer( window.mejs.players[p] );\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * @summary Removes the player.\n\t *\n\t * Override the MediaElement method for removing a player.\n\t * MediaElement tries to pull the audio/video tag out of\n\t * its container and re-add it to the DOM.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @return {void}\n\t */\n\tremovePlayer: function(t) {\n\t\tvar featureIndex, feature;\n\n\t\tif ( ! t.options ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// invoke features cleanup\n\t\tfor ( featureIndex in t.options.features ) {\n\t\t\tfeature = t.options.features[featureIndex];\n\t\t\tif ( t['clean' + feature] ) {\n\t\t\t\ttry {\n\t\t\t\t\tt['clean' + feature](t);\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! t.isDynamic ) {\n\t\t\tt.node.remove();\n\t\t}\n\n\t\tif ( 'html5' !== t.media.rendererName ) {\n\t\t\tt.media.remove();\n\t\t}\n\n\t\tdelete window.mejs.players[t.id];\n\n\t\tt.container.remove();\n\t\tt.globalUnbind('resize', t.globalResizeCallback);\n\t\tt.globalUnbind('keydown', t.globalKeydownCallback);\n\t\tt.globalUnbind('click', t.globalClickCallback);\n\t\tdelete t.media.player;\n\t},\n\n\t/**\n\t *\n\t * @summary Removes and resets all players.\n\t *\n\t * Allows any class that has set 'player' to a MediaElementPlayer\n\t * instance to remove the player when listening to events.\n\t *\n\t * Examples: modal closes, shortcode properties are removed, etc.\n\t *\n\t * @since 4.2.0\n\t */\n\tunsetPlayers : function() {\n\t\tif ( this.players && this.players.length ) {\n\t\t\t_.each( this.players, function (player) {\n\t\t\t\tplayer.pause();\n\t\t\t\twp.media.mixin.removePlayer( player );\n\t\t\t} );\n\t\t\tthis.players = [];\n\t\t}\n\t}\n};\n\n/**\n * @summary Shortcode modeling for playlists.\n *\n * @since 4.2.0\n */\nwp.media.playlist = new wp.media.collection({\n\ttag: 'playlist',\n\teditTitle : l10n.editPlaylistTitle,\n\tdefaults : {\n\t\tid: wp.media.view.settings.post.id,\n\t\tstyle: 'light',\n\t\ttracklist: true,\n\t\ttracknumbers: true,\n\t\timages: true,\n\t\tartists: true,\n\t\ttype: 'audio'\n\t}\n});\n\n/**\n * @summary Shortcode modeling for audio.\n *\n * `edit()` prepares the shortcode for the media modal.\n * `shortcode()` builds the new shortcode after an update.\n *\n * @namespace\n *\n * @since 4.2.0\n */\nwp.media.audio = {\n\tcoerce : wp.media.coerce,\n\n\tdefaults : {\n\t\tid : wp.media.view.settings.post.id,\n\t\tsrc : '',\n\t\tloop : false,\n\t\tautoplay : false,\n\t\tpreload : 'none',\n\t\twidth : 400\n\t},\n\n\t/**\n\t * @summary Instantiates a new media object with the next matching shortcode.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @param {string} data The text to apply the shortcode on.\n\t * @returns {wp.media} The media object.\n\t */\n\tedit : function( data ) {\n\t\tvar frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode;\n\n\t\tframe = wp.media({\n\t\t\tframe: 'audio',\n\t\t\tstate: 'audio-details',\n\t\t\tmetadata: _.defaults( shortcode.attrs.named, this.defaults )\n\t\t});\n\n\t\treturn frame;\n\t},\n\n\t/**\n\t * @summary Generates an audio shortcode.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @param {Array} model Array with attributes for the shortcode.\n\t * @returns {wp.shortcode} The audio shortcode object.\n\t */\n\tshortcode : function( model ) {\n\t\tvar content;\n\n\t\t_.each( this.defaults, function( value, key ) {\n\t\t\tmodel[ key ] = this.coerce( model, key );\n\n\t\t\tif ( value === model[ key ] ) {\n\t\t\t\tdelete model[ key ];\n\t\t\t}\n\t\t}, this );\n\n\t\tcontent = model.content;\n\t\tdelete model.content;\n\n\t\treturn new wp.shortcode({\n\t\t\ttag: 'audio',\n\t\t\tattrs: model,\n\t\t\tcontent: content\n\t\t});\n\t}\n};\n\n/**\n * @summary Shortcode modeling for video.\n *\n * `edit()` prepares the shortcode for the media modal.\n * `shortcode()` builds the new shortcode after update.\n *\n * @since 4.2.0\n *\n * @namespace\n */\nwp.media.video = {\n\tcoerce : wp.media.coerce,\n\n\tdefaults : {\n\t\tid : wp.media.view.settings.post.id,\n\t\tsrc : '',\n\t\tposter : '',\n\t\tloop : false,\n\t\tautoplay : false,\n\t\tpreload : 'metadata',\n\t\tcontent : '',\n\t\twidth : 640,\n\t\theight : 360\n\t},\n\n\t/**\n\t * @summary Instantiates a new media object with the next matching shortcode.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @param {string} data The text to apply the shortcode on.\n\t * @returns {wp.media} The media object.\n\t */\n\tedit : function( data ) {\n\t\tvar frame,\n\t\t\tshortcode = wp.shortcode.next( 'video', data ).shortcode,\n\t\t\tattrs;\n\n\t\tattrs = shortcode.attrs.named;\n\t\tattrs.content = shortcode.content;\n\n\t\tframe = wp.media({\n\t\t\tframe: 'video',\n\t\t\tstate: 'video-details',\n\t\t\tmetadata: _.defaults( attrs, this.defaults )\n\t\t});\n\n\t\treturn frame;\n\t},\n\n\t/**\n\t * @summary Generates an video shortcode.\n\t *\n\t * @since 4.2.0\n\t *\n\t * @param {Array} model Array with attributes for the shortcode.\n\t * @returns {wp.shortcode} The video shortcode object.\n\t */\n\tshortcode : function( model ) {\n\t\tvar content;\n\n\t\t_.each( this.defaults, function( value, key ) {\n\t\t\tmodel[ key ] = this.coerce( model, key );\n\n\t\t\tif ( value === model[ key ] ) {\n\t\t\t\tdelete model[ key ];\n\t\t\t}\n\t\t}, this );\n\n\t\tcontent = model.content;\n\t\tdelete model.content;\n\n\t\treturn new wp.shortcode({\n\t\t\ttag: 'video',\n\t\t\tattrs: model,\n\t\t\tcontent: content\n\t\t});\n\t}\n};\n\nmedia.model.PostMedia = __webpack_require__( /*! ./models/post-media.js */ \"./src/wp-includes/js/media/models/post-media.js\" );\nmedia.controller.AudioDetails = __webpack_require__( /*! ./controllers/audio-details.js */ \"./src/wp-includes/js/media/controllers/audio-details.js\" );\nmedia.controller.VideoDetails = __webpack_require__( /*! ./controllers/video-details.js */ \"./src/wp-includes/js/media/controllers/video-details.js\" );\nmedia.view.MediaFrame.MediaDetails = __webpack_require__( /*! ./views/frame/media-details.js */ \"./src/wp-includes/js/media/views/frame/media-details.js\" );\nmedia.view.MediaFrame.AudioDetails = __webpack_require__( /*! ./views/frame/audio-details.js */ \"./src/wp-includes/js/media/views/frame/audio-details.js\" );\nmedia.view.MediaFrame.VideoDetails = __webpack_require__( /*! ./views/frame/video-details.js */ \"./src/wp-includes/js/media/views/frame/video-details.js\" );\nmedia.view.MediaDetails = __webpack_require__( /*! ./views/media-details.js */ \"./src/wp-includes/js/media/views/media-details.js\" );\nmedia.view.AudioDetails = __webpack_require__( /*! ./views/audio-details.js */ \"./src/wp-includes/js/media/views/audio-details.js\" );\nmedia.view.VideoDetails = __webpack_require__( /*! ./views/video-details.js */ \"./src/wp-includes/js/media/views/video-details.js\" );\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/audiovideo.manifest.js?");
-/**
- *
- * @summary Defines the wp.media.mixin object.
- *
- * @mixin
- *
- * @since 4.2.0
- */
-wp.media.mixin = {
- mejsSettings: baseSettings,
+/***/ }),
- /**
- * @summary Pauses and removes all players.
- *
- * @since 4.2.0
- *
- * @return {void}
- */
- removeAllPlayers: function() {
- var p;
+/***/ "./src/wp-includes/js/media/controllers/audio-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/audio-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- if ( window.mejs && window.mejs.players ) {
- for ( p in window.mejs.players ) {
- window.mejs.players[p].pause();
- this.removePlayer( window.mejs.players[p] );
- }
- }
- },
+eval("var State = wp.media.controller.State,\n\tl10n = wp.media.view.l10n,\n\tAudioDetails;\n\n/**\n * wp.media.controller.AudioDetails\n *\n * The controller for the Audio Details state\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nAudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{\n\tdefaults: {\n\t\tid: 'audio-details',\n\t\ttoolbar: 'audio-details',\n\t\ttitle: l10n.audioDetailsTitle,\n\t\tcontent: 'audio-details',\n\t\tmenu: 'audio-details',\n\t\trouter: false,\n\t\tpriority: 60\n\t},\n\n\tinitialize: function( options ) {\n\t\tthis.media = options.media;\n\t\tState.prototype.initialize.apply( this, arguments );\n\t}\n});\n\nmodule.exports = AudioDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/audio-details.js?");
- /**
- * @summary Removes the player.
- *
- * Override the MediaElement method for removing a player.
- * MediaElement tries to pull the audio/video tag out of
- * its container and re-add it to the DOM.
- *
- * @since 4.2.0
- *
- * @return {void}
- */
- removePlayer: function(t) {
- var featureIndex, feature;
+/***/ }),
- if ( ! t.options ) {
- return;
- }
+/***/ "./src/wp-includes/js/media/controllers/video-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/video-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // invoke features cleanup
- for ( featureIndex in t.options.features ) {
- feature = t.options.features[featureIndex];
- if ( t['clean' + feature] ) {
- try {
- t['clean' + feature](t);
- } catch (e) {}
- }
- }
+eval("/**\n * wp.media.controller.VideoDetails\n *\n * The controller for the Video Details state\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nvar State = wp.media.controller.State,\n\tl10n = wp.media.view.l10n,\n\tVideoDetails;\n\nVideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{\n\tdefaults: {\n\t\tid: 'video-details',\n\t\ttoolbar: 'video-details',\n\t\ttitle: l10n.videoDetailsTitle,\n\t\tcontent: 'video-details',\n\t\tmenu: 'video-details',\n\t\trouter: false,\n\t\tpriority: 60\n\t},\n\n\tinitialize: function( options ) {\n\t\tthis.media = options.media;\n\t\tState.prototype.initialize.apply( this, arguments );\n\t}\n});\n\nmodule.exports = VideoDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/video-details.js?");
- if ( ! t.isDynamic ) {
- t.node.remove();
- }
+/***/ }),
- if ( 'html5' !== t.media.rendererName ) {
- t.media.remove();
- }
+/***/ "./src/wp-includes/js/media/models/post-media.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/models/post-media.js ***!
+ \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- delete window.mejs.players[t.id];
+eval("/**\n * wp.media.model.PostMedia\n *\n * Shared model class for audio and video. Updates the model after\n * \"Add Audio|Video Source\" and \"Replace Audio|Video\" states return\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments Backbone.Model\n */\nvar PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{\n\tinitialize: function() {\n\t\tthis.attachment = false;\n\t},\n\n\tsetSource: function( attachment ) {\n\t\tthis.attachment = attachment;\n\t\tthis.extension = attachment.get( 'filename' ).split('.').pop();\n\n\t\tif ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) {\n\t\t\tthis.unset( 'src' );\n\t\t}\n\n\t\tif ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {\n\t\t\tthis.set( this.extension, this.attachment.get( 'url' ) );\n\t\t} else {\n\t\t\tthis.unset( this.extension );\n\t\t}\n\t},\n\n\tchangeAttachment: function( attachment ) {\n\t\tthis.setSource( attachment );\n\n\t\tthis.unset( 'src' );\n\t\t_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) {\n\t\t\tthis.unset( ext );\n\t\t}, this );\n\t}\n});\n\nmodule.exports = PostMedia;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/post-media.js?");
- t.container.remove();
- t.globalUnbind('resize', t.globalResizeCallback);
- t.globalUnbind('keydown', t.globalKeydownCallback);
- t.globalUnbind('click', t.globalClickCallback);
- delete t.media.player;
- },
+/***/ }),
- /**
- *
- * @summary Removes and resets all players.
- *
- * Allows any class that has set 'player' to a MediaElementPlayer
- * instance to remove the player when listening to events.
- *
- * Examples: modal closes, shortcode properties are removed, etc.
- *
- * @since 4.2.0
- */
- unsetPlayers : function() {
- if ( this.players && this.players.length ) {
- _.each( this.players, function (player) {
- player.pause();
- wp.media.mixin.removePlayer( player );
- } );
- this.players = [];
- }
- }
-};
+/***/ "./src/wp-includes/js/media/views/audio-details.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/views/audio-details.js ***!
+ \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-/**
- * @summary Shortcode modeling for playlists.
- *
- * @since 4.2.0
- */
-wp.media.playlist = new wp.media.collection({
- tag: 'playlist',
- editTitle : l10n.editPlaylistTitle,
- defaults : {
- id: wp.media.view.settings.post.id,
- style: 'light',
- tracklist: true,
- tracknumbers: true,
- images: true,
- artists: true,
- type: 'audio'
- }
-});
+eval("var MediaDetails = wp.media.view.MediaDetails,\n\tAudioDetails;\n\n/**\n * wp.media.view.AudioDetails\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.MediaDetails\n * @augments wp.media.view.Settings.AttachmentDisplay\n * @augments wp.media.view.Settings\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{\n\tclassName: 'audio-details',\n\ttemplate: wp.template('audio-details'),\n\n\tsetMedia: function() {\n\t\tvar audio = this.$('.wp-audio-shortcode');\n\n\t\tif ( audio.find( 'source' ).length ) {\n\t\t\tif ( audio.is(':hidden') ) {\n\t\t\t\taudio.show();\n\t\t\t}\n\t\t\tthis.media = MediaDetails.prepareSrc( audio.get(0) );\n\t\t} else {\n\t\t\taudio.hide();\n\t\t\tthis.media = false;\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\nmodule.exports = AudioDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/audio-details.js?");
-/**
- * @summary Shortcode modeling for audio.
- *
- * `edit()` prepares the shortcode for the media modal.
- * `shortcode()` builds the new shortcode after an update.
- *
- * @namespace
- *
- * @since 4.2.0
- */
-wp.media.audio = {
- coerce : wp.media.coerce,
+/***/ }),
- defaults : {
- id : wp.media.view.settings.post.id,
- src : '',
- loop : false,
- autoplay : false,
- preload : 'none',
- width : 400
- },
-
- /**
- * @summary Instantiates a new media object with the next matching shortcode.
- *
- * @since 4.2.0
- *
- * @param {string} data The text to apply the shortcode on.
- * @returns {wp.media} The media object.
- */
- edit : function( data ) {
- var frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode;
-
- frame = wp.media({
- frame: 'audio',
- state: 'audio-details',
- metadata: _.defaults( shortcode.attrs.named, this.defaults )
- });
-
- return frame;
- },
-
- /**
- * @summary Generates an audio shortcode.
- *
- * @since 4.2.0
- *
- * @param {Array} model Array with attributes for the shortcode.
- * @returns {wp.shortcode} The audio shortcode object.
- */
- shortcode : function( model ) {
- var content;
-
- _.each( this.defaults, function( value, key ) {
- model[ key ] = this.coerce( model, key );
-
- if ( value === model[ key ] ) {
- delete model[ key ];
- }
- }, this );
-
- content = model.content;
- delete model.content;
-
- return new wp.shortcode({
- tag: 'audio',
- attrs: model,
- content: content
- });
- }
-};
-
-/**
- * @summary Shortcode modeling for video.
- *
- * `edit()` prepares the shortcode for the media modal.
- * `shortcode()` builds the new shortcode after update.
- *
- * @since 4.2.0
- *
- * @namespace
- */
-wp.media.video = {
- coerce : wp.media.coerce,
-
- defaults : {
- id : wp.media.view.settings.post.id,
- src : '',
- poster : '',
- loop : false,
- autoplay : false,
- preload : 'metadata',
- content : '',
- width : 640,
- height : 360
- },
-
- /**
- * @summary Instantiates a new media object with the next matching shortcode.
- *
- * @since 4.2.0
- *
- * @param {string} data The text to apply the shortcode on.
- * @returns {wp.media} The media object.
- */
- edit : function( data ) {
- var frame,
- shortcode = wp.shortcode.next( 'video', data ).shortcode,
- attrs;
-
- attrs = shortcode.attrs.named;
- attrs.content = shortcode.content;
-
- frame = wp.media({
- frame: 'video',
- state: 'video-details',
- metadata: _.defaults( attrs, this.defaults )
- });
-
- return frame;
- },
-
- /**
- * @summary Generates an video shortcode.
- *
- * @since 4.2.0
- *
- * @param {Array} model Array with attributes for the shortcode.
- * @returns {wp.shortcode} The video shortcode object.
- */
- shortcode : function( model ) {
- var content;
-
- _.each( this.defaults, function( value, key ) {
- model[ key ] = this.coerce( model, key );
-
- if ( value === model[ key ] ) {
- delete model[ key ];
- }
- }, this );
-
- content = model.content;
- delete model.content;
-
- return new wp.shortcode({
- tag: 'video',
- attrs: model,
- content: content
- });
- }
-};
-
-media.model.PostMedia = __webpack_require__( 1 );
-media.controller.AudioDetails = __webpack_require__( 2 );
-media.controller.VideoDetails = __webpack_require__( 3 );
-media.view.MediaFrame.MediaDetails = __webpack_require__( 4 );
-media.view.MediaFrame.AudioDetails = __webpack_require__( 5 );
-media.view.MediaFrame.VideoDetails = __webpack_require__( 6 );
-media.view.MediaDetails = __webpack_require__( 7 );
-media.view.AudioDetails = __webpack_require__( 8 );
-media.view.VideoDetails = __webpack_require__( 9 );
-
-
-/***/ }),
-/* 1 */
+/***/ "./src/wp-includes/js/media/views/frame/audio-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/frame/audio-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.model.PostMedia
- *
- * Shared model class for audio and video. Updates the model after
- * "Add Audio|Video Source" and "Replace Audio|Video" states return
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments Backbone.Model
- */
-var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{
- initialize: function() {
- this.attachment = false;
- },
+eval("var MediaDetails = wp.media.view.MediaFrame.MediaDetails,\n\tMediaLibrary = wp.media.controller.MediaLibrary,\n\n\tl10n = wp.media.view.l10n,\n\tAudioDetails;\n\n/**\n * wp.media.view.MediaFrame.AudioDetails\n *\n * @memberOf wp.media.view.MediaFrame\n *\n * @class\n * @augments wp.media.view.MediaFrame.MediaDetails\n * @augments wp.media.view.MediaFrame.Select\n * @augments wp.media.view.MediaFrame\n * @augments wp.media.view.Frame\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n * @mixes wp.media.controller.StateMachine\n */\nAudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDetails.prototype */{\n\tdefaults: {\n\t\tid: 'audio',\n\t\turl: '',\n\t\tmenu: 'audio-details',\n\t\tcontent: 'audio-details',\n\t\ttoolbar: 'audio-details',\n\t\ttype: 'link',\n\t\ttitle: l10n.audioDetailsTitle,\n\t\tpriority: 120\n\t},\n\n\tinitialize: function( options ) {\n\t\toptions.DetailsView = wp.media.view.AudioDetails;\n\t\toptions.cancelText = l10n.audioDetailsCancel;\n\t\toptions.addText = l10n.audioAddSourceTitle;\n\n\t\tMediaDetails.prototype.initialize.call( this, options );\n\t},\n\n\tbindHandlers: function() {\n\t\tMediaDetails.prototype.bindHandlers.apply( this, arguments );\n\n\t\tthis.on( 'toolbar:render:replace-audio', this.renderReplaceToolbar, this );\n\t\tthis.on( 'toolbar:render:add-audio-source', this.renderAddSourceToolbar, this );\n\t},\n\n\tcreateStates: function() {\n\t\tthis.states.add([\n\t\t\tnew wp.media.controller.AudioDetails( {\n\t\t\t\tmedia: this.media\n\t\t\t} ),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'audio',\n\t\t\t\tid: 'replace-audio',\n\t\t\t\ttitle: l10n.audioReplaceTitle,\n\t\t\t\ttoolbar: 'replace-audio',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: 'audio-details'\n\t\t\t} ),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'audio',\n\t\t\t\tid: 'add-audio-source',\n\t\t\t\ttitle: l10n.audioAddSourceTitle,\n\t\t\t\ttoolbar: 'add-audio-source',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: false\n\t\t\t} )\n\t\t]);\n\t}\n});\n\nmodule.exports = AudioDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/frame/audio-details.js?");
- setSource: function( attachment ) {
- this.attachment = attachment;
- this.extension = attachment.get( 'filename' ).split('.').pop();
-
- if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) {
- this.unset( 'src' );
- }
-
- if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
- this.set( this.extension, this.attachment.get( 'url' ) );
- } else {
- this.unset( this.extension );
- }
- },
-
- changeAttachment: function( attachment ) {
- this.setSource( attachment );
-
- this.unset( 'src' );
- _.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) {
- this.unset( ext );
- }, this );
- }
-});
-
-module.exports = PostMedia;
-
-
/***/ }),
-/* 2 */
-/***/ (function(module, exports) {
-var State = wp.media.controller.State,
- l10n = wp.media.view.l10n,
- AudioDetails;
-
-/**
- * wp.media.controller.AudioDetails
- *
- * The controller for the Audio Details state
- *
- * @memberOf wp.media.controller
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- */
-AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{
- defaults: {
- id: 'audio-details',
- toolbar: 'audio-details',
- title: l10n.audioDetailsTitle,
- content: 'audio-details',
- menu: 'audio-details',
- router: false,
- priority: 60
- },
-
- initialize: function( options ) {
- this.media = options.media;
- State.prototype.initialize.apply( this, arguments );
- }
-});
-
-module.exports = AudioDetails;
-
-
-/***/ }),
-/* 3 */
+/***/ "./src/wp-includes/js/media/views/frame/media-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/frame/media-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.controller.VideoDetails
- *
- * The controller for the Video Details state
- *
- * @memberOf wp.media.controller
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- */
-var State = wp.media.controller.State,
- l10n = wp.media.view.l10n,
- VideoDetails;
+eval("var Select = wp.media.view.MediaFrame.Select,\n\tl10n = wp.media.view.l10n,\n\tMediaDetails;\n\n/**\n * wp.media.view.MediaFrame.MediaDetails\n *\n * @memberOf wp.media.view.MediaFrame\n *\n * @class\n * @augments wp.media.view.MediaFrame.Select\n * @augments wp.media.view.MediaFrame\n * @augments wp.media.view.Frame\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n * @mixes wp.media.controller.StateMachine\n */\nMediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.prototype */{\n\tdefaults: {\n\t\tid: 'media',\n\t\turl: '',\n\t\tmenu: 'media-details',\n\t\tcontent: 'media-details',\n\t\ttoolbar: 'media-details',\n\t\ttype: 'link',\n\t\tpriority: 120\n\t},\n\n\tinitialize: function( options ) {\n\t\tthis.DetailsView = options.DetailsView;\n\t\tthis.cancelText = options.cancelText;\n\t\tthis.addText = options.addText;\n\n\t\tthis.media = new wp.media.model.PostMedia( options.metadata );\n\t\tthis.options.selection = new wp.media.model.Selection( this.media.attachment, { multiple: false } );\n\t\tSelect.prototype.initialize.apply( this, arguments );\n\t},\n\n\tbindHandlers: function() {\n\t\tvar menu = this.defaults.menu;\n\n\t\tSelect.prototype.bindHandlers.apply( this, arguments );\n\n\t\tthis.on( 'menu:create:' + menu, this.createMenu, this );\n\t\tthis.on( 'content:render:' + menu, this.renderDetailsContent, this );\n\t\tthis.on( 'menu:render:' + menu, this.renderMenu, this );\n\t\tthis.on( 'toolbar:render:' + menu, this.renderDetailsToolbar, this );\n\t},\n\n\trenderDetailsContent: function() {\n\t\tvar view = new this.DetailsView({\n\t\t\tcontroller: this,\n\t\t\tmodel: this.state().media,\n\t\t\tattachment: this.state().media.attachment\n\t\t}).render();\n\n\t\tthis.content.set( view );\n\t},\n\n\trenderMenu: function( view ) {\n\t\tvar lastState = this.lastState(),\n\t\t\tprevious = lastState && lastState.id,\n\t\t\tframe = this;\n\n\t\tview.set({\n\t\t\tcancel: {\n\t\t\t\ttext: this.cancelText,\n\t\t\t\tpriority: 20,\n\t\t\t\tclick: function() {\n\t\t\t\t\tif ( previous ) {\n\t\t\t\t\t\tframe.setState( previous );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tframe.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tseparateCancel: new wp.media.View({\n\t\t\t\tclassName: 'separator',\n\t\t\t\tpriority: 40\n\t\t\t})\n\t\t});\n\n\t},\n\n\tsetPrimaryButton: function(text, handler) {\n\t\tthis.toolbar.set( new wp.media.view.Toolbar({\n\t\t\tcontroller: this,\n\t\t\titems: {\n\t\t\t\tbutton: {\n\t\t\t\t\tstyle: 'primary',\n\t\t\t\t\ttext: text,\n\t\t\t\t\tpriority: 80,\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tvar controller = this.controller;\n\t\t\t\t\t\thandler.call( this, controller, controller.state() );\n\t\t\t\t\t\t// Restore and reset the default state.\n\t\t\t\t\t\tcontroller.setState( controller.options.state );\n\t\t\t\t\t\tcontroller.reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}) );\n\t},\n\n\trenderDetailsToolbar: function() {\n\t\tthis.setPrimaryButton( l10n.update, function( controller, state ) {\n\t\t\tcontroller.close();\n\t\t\tstate.trigger( 'update', controller.media.toJSON() );\n\t\t} );\n\t},\n\n\trenderReplaceToolbar: function() {\n\t\tthis.setPrimaryButton( l10n.replace, function( controller, state ) {\n\t\t\tvar attachment = state.get( 'selection' ).single();\n\t\t\tcontroller.media.changeAttachment( attachment );\n\t\t\tstate.trigger( 'replace', controller.media.toJSON() );\n\t\t} );\n\t},\n\n\trenderAddSourceToolbar: function() {\n\t\tthis.setPrimaryButton( this.addText, function( controller, state ) {\n\t\t\tvar attachment = state.get( 'selection' ).single();\n\t\t\tcontroller.media.setSource( attachment );\n\t\t\tstate.trigger( 'add-source', controller.media.toJSON() );\n\t\t} );\n\t}\n});\n\nmodule.exports = MediaDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/frame/media-details.js?");
-VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{
- defaults: {
- id: 'video-details',
- toolbar: 'video-details',
- title: l10n.videoDetailsTitle,
- content: 'video-details',
- menu: 'video-details',
- router: false,
- priority: 60
- },
-
- initialize: function( options ) {
- this.media = options.media;
- State.prototype.initialize.apply( this, arguments );
- }
-});
-
-module.exports = VideoDetails;
-
-
/***/ }),
-/* 4 */
-/***/ (function(module, exports) {
-var Select = wp.media.view.MediaFrame.Select,
- l10n = wp.media.view.l10n,
- MediaDetails;
-
-/**
- * wp.media.view.MediaFrame.MediaDetails
- *
- * @memberOf wp.media.view.MediaFrame
- *
- * @class
- * @augments wp.media.view.MediaFrame.Select
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-MediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.prototype */{
- defaults: {
- id: 'media',
- url: '',
- menu: 'media-details',
- content: 'media-details',
- toolbar: 'media-details',
- type: 'link',
- priority: 120
- },
-
- initialize: function( options ) {
- this.DetailsView = options.DetailsView;
- this.cancelText = options.cancelText;
- this.addText = options.addText;
-
- this.media = new wp.media.model.PostMedia( options.metadata );
- this.options.selection = new wp.media.model.Selection( this.media.attachment, { multiple: false } );
- Select.prototype.initialize.apply( this, arguments );
- },
-
- bindHandlers: function() {
- var menu = this.defaults.menu;
-
- Select.prototype.bindHandlers.apply( this, arguments );
-
- this.on( 'menu:create:' + menu, this.createMenu, this );
- this.on( 'content:render:' + menu, this.renderDetailsContent, this );
- this.on( 'menu:render:' + menu, this.renderMenu, this );
- this.on( 'toolbar:render:' + menu, this.renderDetailsToolbar, this );
- },
-
- renderDetailsContent: function() {
- var view = new this.DetailsView({
- controller: this,
- model: this.state().media,
- attachment: this.state().media.attachment
- }).render();
-
- this.content.set( view );
- },
-
- renderMenu: function( view ) {
- var lastState = this.lastState(),
- previous = lastState && lastState.id,
- frame = this;
-
- view.set({
- cancel: {
- text: this.cancelText,
- priority: 20,
- click: function() {
- if ( previous ) {
- frame.setState( previous );
- } else {
- frame.close();
- }
- }
- },
- separateCancel: new wp.media.View({
- className: 'separator',
- priority: 40
- })
- });
-
- },
-
- setPrimaryButton: function(text, handler) {
- this.toolbar.set( new wp.media.view.Toolbar({
- controller: this,
- items: {
- button: {
- style: 'primary',
- text: text,
- priority: 80,
- click: function() {
- var controller = this.controller;
- handler.call( this, controller, controller.state() );
- // Restore and reset the default state.
- controller.setState( controller.options.state );
- controller.reset();
- }
- }
- }
- }) );
- },
-
- renderDetailsToolbar: function() {
- this.setPrimaryButton( l10n.update, function( controller, state ) {
- controller.close();
- state.trigger( 'update', controller.media.toJSON() );
- } );
- },
-
- renderReplaceToolbar: function() {
- this.setPrimaryButton( l10n.replace, function( controller, state ) {
- var attachment = state.get( 'selection' ).single();
- controller.media.changeAttachment( attachment );
- state.trigger( 'replace', controller.media.toJSON() );
- } );
- },
-
- renderAddSourceToolbar: function() {
- this.setPrimaryButton( this.addText, function( controller, state ) {
- var attachment = state.get( 'selection' ).single();
- controller.media.setSource( attachment );
- state.trigger( 'add-source', controller.media.toJSON() );
- } );
- }
-});
-
-module.exports = MediaDetails;
-
-
-/***/ }),
-/* 5 */
+/***/ "./src/wp-includes/js/media/views/frame/video-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/frame/video-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
- MediaLibrary = wp.media.controller.MediaLibrary,
+eval("var MediaDetails = wp.media.view.MediaFrame.MediaDetails,\n\tMediaLibrary = wp.media.controller.MediaLibrary,\n\tl10n = wp.media.view.l10n,\n\tVideoDetails;\n\n/**\n * wp.media.view.MediaFrame.VideoDetails\n *\n * @memberOf wp.media.view.MediaFrame\n *\n * @class\n * @augments wp.media.view.MediaFrame.MediaDetails\n * @augments wp.media.view.MediaFrame.Select\n * @augments wp.media.view.MediaFrame\n * @augments wp.media.view.Frame\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n * @mixes wp.media.controller.StateMachine\n */\nVideoDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.VideoDetails.prototype */{\n\tdefaults: {\n\t\tid: 'video',\n\t\turl: '',\n\t\tmenu: 'video-details',\n\t\tcontent: 'video-details',\n\t\ttoolbar: 'video-details',\n\t\ttype: 'link',\n\t\ttitle: l10n.videoDetailsTitle,\n\t\tpriority: 120\n\t},\n\n\tinitialize: function( options ) {\n\t\toptions.DetailsView = wp.media.view.VideoDetails;\n\t\toptions.cancelText = l10n.videoDetailsCancel;\n\t\toptions.addText = l10n.videoAddSourceTitle;\n\n\t\tMediaDetails.prototype.initialize.call( this, options );\n\t},\n\n\tbindHandlers: function() {\n\t\tMediaDetails.prototype.bindHandlers.apply( this, arguments );\n\n\t\tthis.on( 'toolbar:render:replace-video', this.renderReplaceToolbar, this );\n\t\tthis.on( 'toolbar:render:add-video-source', this.renderAddSourceToolbar, this );\n\t\tthis.on( 'toolbar:render:select-poster-image', this.renderSelectPosterImageToolbar, this );\n\t\tthis.on( 'toolbar:render:add-track', this.renderAddTrackToolbar, this );\n\t},\n\n\tcreateStates: function() {\n\t\tthis.states.add([\n\t\t\tnew wp.media.controller.VideoDetails({\n\t\t\t\tmedia: this.media\n\t\t\t}),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'video',\n\t\t\t\tid: 'replace-video',\n\t\t\t\ttitle: l10n.videoReplaceTitle,\n\t\t\t\ttoolbar: 'replace-video',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: 'video-details'\n\t\t\t} ),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'video',\n\t\t\t\tid: 'add-video-source',\n\t\t\t\ttitle: l10n.videoAddSourceTitle,\n\t\t\t\ttoolbar: 'add-video-source',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: false\n\t\t\t} ),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'image',\n\t\t\t\tid: 'select-poster-image',\n\t\t\t\ttitle: l10n.videoSelectPosterImageTitle,\n\t\t\t\ttoolbar: 'select-poster-image',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: 'video-details'\n\t\t\t} ),\n\n\t\t\tnew MediaLibrary( {\n\t\t\t\ttype: 'text',\n\t\t\t\tid: 'add-track',\n\t\t\t\ttitle: l10n.videoAddTrackTitle,\n\t\t\t\ttoolbar: 'add-track',\n\t\t\t\tmedia: this.media,\n\t\t\t\tmenu: 'video-details'\n\t\t\t} )\n\t\t]);\n\t},\n\n\trenderSelectPosterImageToolbar: function() {\n\t\tthis.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {\n\t\t\tvar urls = [], attachment = state.get( 'selection' ).single();\n\n\t\t\tcontroller.media.set( 'poster', attachment.get( 'url' ) );\n\t\t\tstate.trigger( 'set-poster-image', controller.media.toJSON() );\n\n\t\t\t_.each( wp.media.view.settings.embedExts, function (ext) {\n\t\t\t\tif ( controller.media.get( ext ) ) {\n\t\t\t\t\turls.push( controller.media.get( ext ) );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twp.ajax.send( 'set-attachment-thumbnail', {\n\t\t\t\tdata : {\n\t\t\t\t\turls: urls,\n\t\t\t\t\tthumbnail_id: attachment.get( 'id' )\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t},\n\n\trenderAddTrackToolbar: function() {\n\t\tthis.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {\n\t\t\tvar attachment = state.get( 'selection' ).single(),\n\t\t\t\tcontent = controller.media.get( 'content' );\n\n\t\t\tif ( -1 === content.indexOf( attachment.get( 'url' ) ) ) {\n\t\t\t\tcontent += [\n\t\t\t\t\t''\n\t\t\t\t].join('');\n\n\t\t\t\tcontroller.media.set( 'content', content );\n\t\t\t}\n\t\t\tstate.trigger( 'add-track', controller.media.toJSON() );\n\t\t} );\n\t}\n});\n\nmodule.exports = VideoDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/frame/video-details.js?");
- l10n = wp.media.view.l10n,
- AudioDetails;
-
-/**
- * wp.media.view.MediaFrame.AudioDetails
- *
- * @memberOf wp.media.view.MediaFrame
- *
- * @class
- * @augments wp.media.view.MediaFrame.MediaDetails
- * @augments wp.media.view.MediaFrame.Select
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-AudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDetails.prototype */{
- defaults: {
- id: 'audio',
- url: '',
- menu: 'audio-details',
- content: 'audio-details',
- toolbar: 'audio-details',
- type: 'link',
- title: l10n.audioDetailsTitle,
- priority: 120
- },
-
- initialize: function( options ) {
- options.DetailsView = wp.media.view.AudioDetails;
- options.cancelText = l10n.audioDetailsCancel;
- options.addText = l10n.audioAddSourceTitle;
-
- MediaDetails.prototype.initialize.call( this, options );
- },
-
- bindHandlers: function() {
- MediaDetails.prototype.bindHandlers.apply( this, arguments );
-
- this.on( 'toolbar:render:replace-audio', this.renderReplaceToolbar, this );
- this.on( 'toolbar:render:add-audio-source', this.renderAddSourceToolbar, this );
- },
-
- createStates: function() {
- this.states.add([
- new wp.media.controller.AudioDetails( {
- media: this.media
- } ),
-
- new MediaLibrary( {
- type: 'audio',
- id: 'replace-audio',
- title: l10n.audioReplaceTitle,
- toolbar: 'replace-audio',
- media: this.media,
- menu: 'audio-details'
- } ),
-
- new MediaLibrary( {
- type: 'audio',
- id: 'add-audio-source',
- title: l10n.audioAddSourceTitle,
- toolbar: 'add-audio-source',
- media: this.media,
- menu: false
- } )
- ]);
- }
-});
-
-module.exports = AudioDetails;
-
-
/***/ }),
-/* 6 */
-/***/ (function(module, exports) {
-var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
- MediaLibrary = wp.media.controller.MediaLibrary,
- l10n = wp.media.view.l10n,
- VideoDetails;
-
-/**
- * wp.media.view.MediaFrame.VideoDetails
- *
- * @memberOf wp.media.view.MediaFrame
- *
- * @class
- * @augments wp.media.view.MediaFrame.MediaDetails
- * @augments wp.media.view.MediaFrame.Select
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-VideoDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.VideoDetails.prototype */{
- defaults: {
- id: 'video',
- url: '',
- menu: 'video-details',
- content: 'video-details',
- toolbar: 'video-details',
- type: 'link',
- title: l10n.videoDetailsTitle,
- priority: 120
- },
-
- initialize: function( options ) {
- options.DetailsView = wp.media.view.VideoDetails;
- options.cancelText = l10n.videoDetailsCancel;
- options.addText = l10n.videoAddSourceTitle;
-
- MediaDetails.prototype.initialize.call( this, options );
- },
-
- bindHandlers: function() {
- MediaDetails.prototype.bindHandlers.apply( this, arguments );
-
- this.on( 'toolbar:render:replace-video', this.renderReplaceToolbar, this );
- this.on( 'toolbar:render:add-video-source', this.renderAddSourceToolbar, this );
- this.on( 'toolbar:render:select-poster-image', this.renderSelectPosterImageToolbar, this );
- this.on( 'toolbar:render:add-track', this.renderAddTrackToolbar, this );
- },
-
- createStates: function() {
- this.states.add([
- new wp.media.controller.VideoDetails({
- media: this.media
- }),
-
- new MediaLibrary( {
- type: 'video',
- id: 'replace-video',
- title: l10n.videoReplaceTitle,
- toolbar: 'replace-video',
- media: this.media,
- menu: 'video-details'
- } ),
-
- new MediaLibrary( {
- type: 'video',
- id: 'add-video-source',
- title: l10n.videoAddSourceTitle,
- toolbar: 'add-video-source',
- media: this.media,
- menu: false
- } ),
-
- new MediaLibrary( {
- type: 'image',
- id: 'select-poster-image',
- title: l10n.videoSelectPosterImageTitle,
- toolbar: 'select-poster-image',
- media: this.media,
- menu: 'video-details'
- } ),
-
- new MediaLibrary( {
- type: 'text',
- id: 'add-track',
- title: l10n.videoAddTrackTitle,
- toolbar: 'add-track',
- media: this.media,
- menu: 'video-details'
- } )
- ]);
- },
-
- renderSelectPosterImageToolbar: function() {
- this.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {
- var urls = [], attachment = state.get( 'selection' ).single();
-
- controller.media.set( 'poster', attachment.get( 'url' ) );
- state.trigger( 'set-poster-image', controller.media.toJSON() );
-
- _.each( wp.media.view.settings.embedExts, function (ext) {
- if ( controller.media.get( ext ) ) {
- urls.push( controller.media.get( ext ) );
- }
- } );
-
- wp.ajax.send( 'set-attachment-thumbnail', {
- data : {
- urls: urls,
- thumbnail_id: attachment.get( 'id' )
- }
- } );
- } );
- },
-
- renderAddTrackToolbar: function() {
- this.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {
- var attachment = state.get( 'selection' ).single(),
- content = controller.media.get( 'content' );
-
- if ( -1 === content.indexOf( attachment.get( 'url' ) ) ) {
- content += [
- ''
- ].join('');
-
- controller.media.set( 'content', content );
- }
- state.trigger( 'add-track', controller.media.toJSON() );
- } );
- }
-});
-
-module.exports = VideoDetails;
-
-
-/***/ }),
-/* 7 */
+/***/ "./src/wp-includes/js/media/views/media-details.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/views/media-details.js ***!
+ \*********************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/* global MediaElementPlayer */
-var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
- $ = jQuery,
- MediaDetails;
+eval("/* global MediaElementPlayer */\nvar AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,\n\t$ = jQuery,\n\tMediaDetails;\n\n/**\n * wp.media.view.MediaDetails\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.Settings.AttachmentDisplay\n * @augments wp.media.view.Settings\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nMediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.prototype */{\n\tinitialize: function() {\n\t\t_.bindAll(this, 'success');\n\t\tthis.players = [];\n\t\tthis.listenTo( this.controller, 'close', wp.media.mixin.unsetPlayers );\n\t\tthis.on( 'ready', this.setPlayer );\n\t\tthis.on( 'media:setting:remove', wp.media.mixin.unsetPlayers, this );\n\t\tthis.on( 'media:setting:remove', this.render );\n\t\tthis.on( 'media:setting:remove', this.setPlayer );\n\n\t\tAttachmentDisplay.prototype.initialize.apply( this, arguments );\n\t},\n\n\tevents: function(){\n\t\treturn _.extend( {\n\t\t\t'click .remove-setting' : 'removeSetting',\n\t\t\t'change .content-track' : 'setTracks',\n\t\t\t'click .remove-track' : 'setTracks',\n\t\t\t'click .add-media-source' : 'addSource'\n\t\t}, AttachmentDisplay.prototype.events );\n\t},\n\n\tprepare: function() {\n\t\treturn _.defaults({\n\t\t\tmodel: this.model.toJSON()\n\t\t}, this.options );\n\t},\n\n\t/**\n\t * Remove a setting's UI when the model unsets it\n\t *\n\t * @fires wp.media.view.MediaDetails#media:setting:remove\n\t *\n\t * @param {Event} e\n\t */\n\tremoveSetting : function(e) {\n\t\tvar wrap = $( e.currentTarget ).parent(), setting;\n\t\tsetting = wrap.find( 'input' ).data( 'setting' );\n\n\t\tif ( setting ) {\n\t\t\tthis.model.unset( setting );\n\t\t\tthis.trigger( 'media:setting:remove', this );\n\t\t}\n\n\t\twrap.remove();\n\t},\n\n\t/**\n\t *\n\t * @fires wp.media.view.MediaDetails#media:setting:remove\n\t */\n\tsetTracks : function() {\n\t\tvar tracks = '';\n\n\t\t_.each( this.$('.content-track'), function(track) {\n\t\t\ttracks += $( track ).val();\n\t\t} );\n\n\t\tthis.model.set( 'content', tracks );\n\t\tthis.trigger( 'media:setting:remove', this );\n\t},\n\n\taddSource : function( e ) {\n\t\tthis.controller.lastMime = $( e.currentTarget ).data( 'mime' );\n\t\tthis.controller.setState( 'add-' + this.controller.defaults.id + '-source' );\n\t},\n\n\tloadPlayer: function () {\n\t\tthis.players.push( new MediaElementPlayer( this.media, this.settings ) );\n\t\tthis.scriptXhr = false;\n\t},\n\n\tsetPlayer : function() {\n\t\tvar src;\n\n\t\tif ( this.players.length || ! this.media || this.scriptXhr ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsrc = this.model.get( 'src' );\n\n\t\tif ( src && src.indexOf( 'vimeo' ) > -1 && ! ( 'Vimeo' in window ) ) {\n\t\t\tthis.scriptXhr = $.getScript( 'https://player.vimeo.com/api/player.js', _.bind( this.loadPlayer, this ) );\n\t\t} else {\n\t\t\tthis.loadPlayer();\n\t\t}\n\t},\n\n\t/**\n\t * @abstract\n\t */\n\tsetMedia : function() {\n\t\treturn this;\n\t},\n\n\tsuccess : function(mejs) {\n\t\tvar autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;\n\n\t\tif ( 'flash' === mejs.pluginType && autoplay ) {\n\t\t\tmejs.addEventListener( 'canplay', function() {\n\t\t\t\tmejs.play();\n\t\t\t}, false );\n\t\t}\n\n\t\tthis.mejs = mejs;\n\t},\n\n\t/**\n\t * @returns {media.view.MediaDetails} Returns itself to allow chaining\n\t */\n\trender: function() {\n\t\tAttachmentDisplay.prototype.render.apply( this, arguments );\n\n\t\tsetTimeout( _.bind( function() {\n\t\t\tthis.resetFocus();\n\t\t}, this ), 10 );\n\n\t\tthis.settings = _.defaults( {\n\t\t\tsuccess : this.success\n\t\t}, wp.media.mixin.mejsSettings );\n\n\t\treturn this.setMedia();\n\t},\n\n\tresetFocus: function() {\n\t\tthis.$( '.embed-media-settings' ).scrollTop( 0 );\n\t}\n},/** @lends wp.media.view.MediaDetails */{\n\tinstances : 0,\n\t/**\n\t * When multiple players in the DOM contain the same src, things get weird.\n\t *\n\t * @param {HTMLElement} elem\n\t * @returns {HTMLElement}\n\t */\n\tprepareSrc : function( elem ) {\n\t\tvar i = MediaDetails.instances++;\n\t\t_.each( $( elem ).find( 'source' ), function( source ) {\n\t\t\tsource.src = [\n\t\t\t\tsource.src,\n\t\t\t\tsource.src.indexOf('?') > -1 ? '&' : '?',\n\t\t\t\t'_=',\n\t\t\t\ti\n\t\t\t].join('');\n\t\t} );\n\n\t\treturn elem;\n\t}\n});\n\nmodule.exports = MediaDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/media-details.js?");
-/**
- * wp.media.view.MediaDetails
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.Settings.AttachmentDisplay
- * @augments wp.media.view.Settings
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.prototype */{
- initialize: function() {
- _.bindAll(this, 'success');
- this.players = [];
- this.listenTo( this.controller, 'close', wp.media.mixin.unsetPlayers );
- this.on( 'ready', this.setPlayer );
- this.on( 'media:setting:remove', wp.media.mixin.unsetPlayers, this );
- this.on( 'media:setting:remove', this.render );
- this.on( 'media:setting:remove', this.setPlayer );
-
- AttachmentDisplay.prototype.initialize.apply( this, arguments );
- },
-
- events: function(){
- return _.extend( {
- 'click .remove-setting' : 'removeSetting',
- 'change .content-track' : 'setTracks',
- 'click .remove-track' : 'setTracks',
- 'click .add-media-source' : 'addSource'
- }, AttachmentDisplay.prototype.events );
- },
-
- prepare: function() {
- return _.defaults({
- model: this.model.toJSON()
- }, this.options );
- },
-
- /**
- * Remove a setting's UI when the model unsets it
- *
- * @fires wp.media.view.MediaDetails#media:setting:remove
- *
- * @param {Event} e
- */
- removeSetting : function(e) {
- var wrap = $( e.currentTarget ).parent(), setting;
- setting = wrap.find( 'input' ).data( 'setting' );
-
- if ( setting ) {
- this.model.unset( setting );
- this.trigger( 'media:setting:remove', this );
- }
-
- wrap.remove();
- },
-
- /**
- *
- * @fires wp.media.view.MediaDetails#media:setting:remove
- */
- setTracks : function() {
- var tracks = '';
-
- _.each( this.$('.content-track'), function(track) {
- tracks += $( track ).val();
- } );
-
- this.model.set( 'content', tracks );
- this.trigger( 'media:setting:remove', this );
- },
-
- addSource : function( e ) {
- this.controller.lastMime = $( e.currentTarget ).data( 'mime' );
- this.controller.setState( 'add-' + this.controller.defaults.id + '-source' );
- },
-
- loadPlayer: function () {
- this.players.push( new MediaElementPlayer( this.media, this.settings ) );
- this.scriptXhr = false;
- },
-
- setPlayer : function() {
- var src;
-
- if ( this.players.length || ! this.media || this.scriptXhr ) {
- return;
- }
-
- src = this.model.get( 'src' );
-
- if ( src && src.indexOf( 'vimeo' ) > -1 && ! ( 'Vimeo' in window ) ) {
- this.scriptXhr = $.getScript( 'https://player.vimeo.com/api/player.js', _.bind( this.loadPlayer, this ) );
- } else {
- this.loadPlayer();
- }
- },
-
- /**
- * @abstract
- */
- setMedia : function() {
- return this;
- },
-
- success : function(mejs) {
- var autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
-
- if ( 'flash' === mejs.pluginType && autoplay ) {
- mejs.addEventListener( 'canplay', function() {
- mejs.play();
- }, false );
- }
-
- this.mejs = mejs;
- },
-
- /**
- * @returns {media.view.MediaDetails} Returns itself to allow chaining
- */
- render: function() {
- AttachmentDisplay.prototype.render.apply( this, arguments );
-
- setTimeout( _.bind( function() {
- this.resetFocus();
- }, this ), 10 );
-
- this.settings = _.defaults( {
- success : this.success
- }, wp.media.mixin.mejsSettings );
-
- return this.setMedia();
- },
-
- resetFocus: function() {
- this.$( '.embed-media-settings' ).scrollTop( 0 );
- }
-},/** @lends wp.media.view.MediaDetails */{
- instances : 0,
- /**
- * When multiple players in the DOM contain the same src, things get weird.
- *
- * @param {HTMLElement} elem
- * @returns {HTMLElement}
- */
- prepareSrc : function( elem ) {
- var i = MediaDetails.instances++;
- _.each( $( elem ).find( 'source' ), function( source ) {
- source.src = [
- source.src,
- source.src.indexOf('?') > -1 ? '&' : '?',
- '_=',
- i
- ].join('');
- } );
-
- return elem;
- }
-});
-
-module.exports = MediaDetails;
-
-
/***/ }),
-/* 8 */
-/***/ (function(module, exports) {
-var MediaDetails = wp.media.view.MediaDetails,
- AudioDetails;
-
-/**
- * wp.media.view.AudioDetails
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.MediaDetails
- * @augments wp.media.view.Settings.AttachmentDisplay
- * @augments wp.media.view.Settings
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{
- className: 'audio-details',
- template: wp.template('audio-details'),
-
- setMedia: function() {
- var audio = this.$('.wp-audio-shortcode');
-
- if ( audio.find( 'source' ).length ) {
- if ( audio.is(':hidden') ) {
- audio.show();
- }
- this.media = MediaDetails.prepareSrc( audio.get(0) );
- } else {
- audio.hide();
- this.media = false;
- }
-
- return this;
- }
-});
-
-module.exports = AudioDetails;
-
-
-/***/ }),
-/* 9 */
+/***/ "./src/wp-includes/js/media/views/video-details.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/views/video-details.js ***!
+ \*********************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var MediaDetails = wp.media.view.MediaDetails,
- VideoDetails;
+eval("var MediaDetails = wp.media.view.MediaDetails,\n\tVideoDetails;\n\n/**\n * wp.media.view.VideoDetails\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.MediaDetails\n * @augments wp.media.view.Settings.AttachmentDisplay\n * @augments wp.media.view.Settings\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nVideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{\n\tclassName: 'video-details',\n\ttemplate: wp.template('video-details'),\n\n\tsetMedia: function() {\n\t\tvar video = this.$('.wp-video-shortcode');\n\n\t\tif ( video.find( 'source' ).length ) {\n\t\t\tif ( video.is(':hidden') ) {\n\t\t\t\tvideo.show();\n\t\t\t}\n\n\t\t\tif ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) {\n\t\t\t\tthis.media = MediaDetails.prepareSrc( video.get(0) );\n\t\t\t} else {\n\t\t\t\tthis.media = video.get(0);\n\t\t\t}\n\t\t} else {\n\t\t\tvideo.hide();\n\t\t\tthis.media = false;\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\nmodule.exports = VideoDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/video-details.js?");
-/**
- * wp.media.view.VideoDetails
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.MediaDetails
- * @augments wp.media.view.Settings.AttachmentDisplay
- * @augments wp.media.view.Settings
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{
- className: 'video-details',
- template: wp.template('video-details'),
+/***/ })
- setMedia: function() {
- var video = this.$('.wp-video-shortcode');
-
- if ( video.find( 'source' ).length ) {
- if ( video.is(':hidden') ) {
- video.show();
- }
-
- if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) {
- this.media = MediaDetails.prepareSrc( video.get(0) );
- } else {
- this.media = video.get(0);
- }
- } else {
- video.hide();
- this.media = false;
- }
-
- return this;
- }
-});
-
-module.exports = VideoDetails;
-
-
-/***/ })
-/******/ ]);
\ No newline at end of file
+/******/ });
\ No newline at end of file
Index: src/wp-includes/js/media-grid.js
===================================================================
--- src/wp-includes/js/media-grid.js (revision 43688)
+++ src/wp-includes/js/media-grid.js (working copy)
@@ -81,990 +81,119 @@
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 10);
+/******/ return __webpack_require__(__webpack_require__.s = "./src/wp-includes/js/media/grid.manifest.js");
/******/ })
/************************************************************************/
-/******/ ([
-/* 0 */,
-/* 1 */,
-/* 2 */,
-/* 3 */,
-/* 4 */,
-/* 5 */,
-/* 6 */,
-/* 7 */,
-/* 8 */,
-/* 9 */,
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
+/******/ ({
-var media = wp.media;
+/***/ "./src/wp-includes/js/media/controllers/edit-attachment-metadata.js":
+/*!**************************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/edit-attachment-metadata.js ***!
+ \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-media.controller.EditAttachmentMetadata = __webpack_require__( 11 );
-media.view.MediaFrame.Manage = __webpack_require__( 12 );
-media.view.Attachment.Details.TwoColumn = __webpack_require__( 13 );
-media.view.MediaFrame.Manage.Router = __webpack_require__( 14 );
-media.view.EditImage.Details = __webpack_require__( 15 );
-media.view.MediaFrame.EditAttachments = __webpack_require__( 16 );
-media.view.SelectModeToggleButton = __webpack_require__( 17 );
-media.view.DeleteSelectedButton = __webpack_require__( 18 );
-media.view.DeleteSelectedPermanentlyButton = __webpack_require__( 19 );
+eval("var l10n = wp.media.view.l10n,\n\tEditAttachmentMetadata;\n\n/**\n * wp.media.controller.EditAttachmentMetadata\n *\n * A state for editing an attachment's metadata.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nEditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{\n\tdefaults: {\n\t\tid: 'edit-attachment',\n\t\t// Title string passed to the frame's title region view.\n\t\ttitle: l10n.attachmentDetails,\n\t\t// Region mode defaults.\n\t\tcontent: 'edit-metadata',\n\t\tmenu: false,\n\t\ttoolbar: false,\n\t\trouter: false\n\t}\n});\n\nmodule.exports = EditAttachmentMetadata;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/edit-attachment-metadata.js?");
-
/***/ }),
-/* 11 */
-/***/ (function(module, exports) {
-var l10n = wp.media.view.l10n,
- EditAttachmentMetadata;
+/***/ "./src/wp-includes/js/media/grid.manifest.js":
+/*!***************************************************!*\
+ !*** ./src/wp-includes/js/media/grid.manifest.js ***!
+ \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * wp.media.controller.EditAttachmentMetadata
- *
- * A state for editing an attachment's metadata.
- *
- * @memberOf wp.media.controller
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- */
-EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{
- defaults: {
- id: 'edit-attachment',
- // Title string passed to the frame's title region view.
- title: l10n.attachmentDetails,
- // Region mode defaults.
- content: 'edit-metadata',
- menu: false,
- toolbar: false,
- router: false
- }
-});
+eval("var media = wp.media;\n\nmedia.controller.EditAttachmentMetadata = __webpack_require__( /*! ./controllers/edit-attachment-metadata.js */ \"./src/wp-includes/js/media/controllers/edit-attachment-metadata.js\" );\nmedia.view.MediaFrame.Manage = __webpack_require__( /*! ./views/frame/manage.js */ \"./src/wp-includes/js/media/views/frame/manage.js\" );\nmedia.view.Attachment.Details.TwoColumn = __webpack_require__( /*! ./views/attachment/details-two-column.js */ \"./src/wp-includes/js/media/views/attachment/details-two-column.js\" );\nmedia.view.MediaFrame.Manage.Router = __webpack_require__( /*! ./routers/manage.js */ \"./src/wp-includes/js/media/routers/manage.js\" );\nmedia.view.EditImage.Details = __webpack_require__( /*! ./views/edit-image-details.js */ \"./src/wp-includes/js/media/views/edit-image-details.js\" );\nmedia.view.MediaFrame.EditAttachments = __webpack_require__( /*! ./views/frame/edit-attachments.js */ \"./src/wp-includes/js/media/views/frame/edit-attachments.js\" );\nmedia.view.SelectModeToggleButton = __webpack_require__( /*! ./views/button/select-mode-toggle.js */ \"./src/wp-includes/js/media/views/button/select-mode-toggle.js\" );\nmedia.view.DeleteSelectedButton = __webpack_require__( /*! ./views/button/delete-selected.js */ \"./src/wp-includes/js/media/views/button/delete-selected.js\" );\nmedia.view.DeleteSelectedPermanentlyButton = __webpack_require__( /*! ./views/button/delete-selected-permanently.js */ \"./src/wp-includes/js/media/views/button/delete-selected-permanently.js\" );\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/grid.manifest.js?");
-module.exports = EditAttachmentMetadata;
+/***/ }),
-
-/***/ }),
-/* 12 */
+/***/ "./src/wp-includes/js/media/routers/manage.js":
+/*!****************************************************!*\
+ !*** ./src/wp-includes/js/media/routers/manage.js ***!
+ \****************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var MediaFrame = wp.media.view.MediaFrame,
- Library = wp.media.controller.Library,
+eval("/**\n * wp.media.view.MediaFrame.Manage.Router\n *\n * A router for handling the browser history and application state.\n *\n * @memberOf wp.media.view.MediaFrame.Manage\n *\n * @class\n * @augments Backbone.Router\n */\nvar Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{\n\troutes: {\n\t\t'upload.php?item=:slug&mode=edit': 'editItem',\n\t\t'upload.php?item=:slug': 'showItem',\n\t\t'upload.php?search=:query': 'search',\n\t\t'upload.php': 'reset'\n\t},\n\n\t// Map routes against the page URL\n\tbaseUrl: function( url ) {\n\t\treturn 'upload.php' + url;\n\t},\n\n\treset: function() {\n\t\tvar frame = wp.media.frames.edit;\n\n\t\tif ( frame ) {\n\t\t\tframe.close();\n\t\t}\n\t},\n\n\t// Respond to the search route by filling the search field and trigggering the input event\n\tsearch: function( query ) {\n\t\tjQuery( '#media-search-input' ).val( query ).trigger( 'input' );\n\t},\n\n\t// Show the modal with a specific item\n\tshowItem: function( query ) {\n\t\tvar media = wp.media,\n\t\t\tframe = media.frames.browse,\n\t\t\tlibrary = frame.state().get('library'),\n\t\t\titem;\n\n\t\t// Trigger the media frame to open the correct item\n\t\titem = library.findWhere( { id: parseInt( query, 10 ) } );\n\t\titem.set( 'skipHistory', true );\n\n\t\tif ( item ) {\n\t\t\tframe.trigger( 'edit:attachment', item );\n\t\t} else {\n\t\t\titem = media.attachment( query );\n\t\t\tframe.listenTo( item, 'change', function( model ) {\n\t\t\t\tframe.stopListening( item );\n\t\t\t\tframe.trigger( 'edit:attachment', model );\n\t\t\t} );\n\t\t\titem.fetch();\n\t\t}\n\t},\n\n\t// Show the modal in edit mode with a specific item.\n\teditItem: function( query ) {\n\t\tthis.showItem( query );\n\t\twp.media.frames.edit.content.mode( 'edit-details' );\n\t}\n});\n\nmodule.exports = Router;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/routers/manage.js?");
- $ = Backbone.$,
- Manage;
+/***/ }),
-/**
- * wp.media.view.MediaFrame.Manage
- *
- * A generic management frame workflow.
- *
- * Used in the media grid view.
- *
- * @memberOf wp.media.view.MediaFrame
- *
- * @class
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-Manage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype */{
- /**
- * @constructs
- */
- initialize: function() {
- _.defaults( this.options, {
- title: '',
- modal: false,
- selection: [],
- library: {}, // Options hash for the query to the media library.
- multiple: 'add',
- state: 'library',
- uploader: true,
- mode: [ 'grid', 'edit' ]
- });
+/***/ "./src/wp-includes/js/media/views/attachment/details-two-column.js":
+/*!*************************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/details-two-column.js ***!
+ \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.$body = $( document.body );
- this.$window = $( window );
- this.$adminBar = $( '#wpadminbar' );
- // Store the Add New button for later reuse in wp.media.view.UploaderInline.
- this.$uploaderToggler = $( '.page-title-action' )
- .attr( 'aria-expanded', 'false' )
- .on( 'click', _.bind( this.addNewClickHandler, this ) );
+eval("var Details = wp.media.view.Attachment.Details,\n\tTwoColumn;\n\n/**\n * wp.media.view.Attachment.Details.TwoColumn\n *\n * A similar view to media.view.Attachment.Details\n * for use in the Edit Attachment modal.\n *\n * @memberOf wp.media.view.Attachment.Details\n *\n * @class\n * @augments wp.media.view.Attachment.Details\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nTwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TowColumn.prototype */{\n\ttemplate: wp.template( 'attachment-details-two-column' ),\n\n\tinitialize: function() {\n\t\tthis.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );\n\n\t\tDetails.prototype.initialize.apply( this, arguments );\n\t},\n\n\teditAttachment: function( event ) {\n\t\tif ( event ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tthis.controller.content.mode( 'edit-image' );\n\t},\n\n\t/**\n\t * Noop this from parent class, doesn't apply here.\n\t */\n\ttoggleSelectionHandler: function() {},\n\n\trender: function() {\n\t\tDetails.prototype.render.apply( this, arguments );\n\n\t\twp.media.mixin.removeAllPlayers();\n\t\tthis.$( 'audio, video' ).each( function (i, elem) {\n\t\t\tvar el = wp.media.view.MediaDetails.prepareSrc( elem );\n\t\t\tnew window.MediaElementPlayer( el, wp.media.mixin.mejsSettings );\n\t\t} );\n\t}\n});\n\nmodule.exports = TwoColumn;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/details-two-column.js?");
- this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );
+/***/ }),
- // Ensure core and media grid view UI is enabled.
- this.$el.addClass('wp-core-ui');
+/***/ "./src/wp-includes/js/media/views/button/delete-selected-permanently.js":
+/*!******************************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/button/delete-selected-permanently.js ***!
+ \******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // Force the uploader off if the upload limit has been exceeded or
- // if the browser isn't supported.
- if ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported ) {
- this.options.uploader = false;
- }
+eval("var Button = wp.media.view.Button,\n\tDeleteSelected = wp.media.view.DeleteSelectedButton,\n\tDeleteSelectedPermanently;\n\n/**\n * wp.media.view.DeleteSelectedPermanentlyButton\n *\n * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.DeleteSelectedButton\n * @augments wp.media.view.Button\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nDeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{\n\tinitialize: function() {\n\t\tDeleteSelected.prototype.initialize.apply( this, arguments );\n\t\tthis.controller.on( 'select:activate', this.selectActivate, this );\n\t\tthis.controller.on( 'select:deactivate', this.selectDeactivate, this );\n\t},\n\n\tfilterChange: function( model ) {\n\t\tthis.canShow = ( 'trash' === model.get( 'status' ) );\n\t},\n\n\tselectActivate: function() {\n\t\tthis.toggleDisabled();\n\t\tthis.$el.toggleClass( 'hidden', ! this.canShow );\n\t},\n\n\tselectDeactivate: function() {\n\t\tthis.toggleDisabled();\n\t\tthis.$el.addClass( 'hidden' );\n\t},\n\n\trender: function() {\n\t\tButton.prototype.render.apply( this, arguments );\n\t\tthis.selectActivate();\n\t\treturn this;\n\t}\n});\n\nmodule.exports = DeleteSelectedPermanently;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/button/delete-selected-permanently.js?");
- // Initialize a window-wide uploader.
- if ( this.options.uploader ) {
- this.uploader = new wp.media.view.UploaderWindow({
- controller: this,
- uploader: {
- dropzone: document.body,
- container: document.body
- }
- }).render();
- this.uploader.ready();
- $('body').append( this.uploader.el );
+/***/ }),
- this.options.uploader = false;
- }
+/***/ "./src/wp-includes/js/media/views/button/delete-selected.js":
+/*!******************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/button/delete-selected.js ***!
+ \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.gridRouter = new wp.media.view.MediaFrame.Manage.Router();
+eval("var Button = wp.media.view.Button,\n\tl10n = wp.media.view.l10n,\n\tDeleteSelected;\n\n/**\n * wp.media.view.DeleteSelectedButton\n *\n * A button that handles bulk Delete/Trash logic\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.Button\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nDeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{\n\tinitialize: function() {\n\t\tButton.prototype.initialize.apply( this, arguments );\n\t\tif ( this.options.filters ) {\n\t\t\tthis.options.filters.model.on( 'change', this.filterChange, this );\n\t\t}\n\t\tthis.controller.on( 'selection:toggle', this.toggleDisabled, this );\n\t},\n\n\tfilterChange: function( model ) {\n\t\tif ( 'trash' === model.get( 'status' ) ) {\n\t\t\tthis.model.set( 'text', l10n.untrashSelected );\n\t\t} else if ( wp.media.view.settings.mediaTrash ) {\n\t\t\tthis.model.set( 'text', l10n.trashSelected );\n\t\t} else {\n\t\t\tthis.model.set( 'text', l10n.deleteSelected );\n\t\t}\n\t},\n\n\ttoggleDisabled: function() {\n\t\tthis.model.set( 'disabled', ! this.controller.state().get( 'selection' ).length );\n\t},\n\n\trender: function() {\n\t\tButton.prototype.render.apply( this, arguments );\n\t\tif ( this.controller.isModeActive( 'select' ) ) {\n\t\t\tthis.$el.addClass( 'delete-selected-button' );\n\t\t} else {\n\t\t\tthis.$el.addClass( 'delete-selected-button hidden' );\n\t\t}\n\t\tthis.toggleDisabled();\n\t\treturn this;\n\t}\n});\n\nmodule.exports = DeleteSelected;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/button/delete-selected.js?");
- // Call 'initialize' directly on the parent class.
- MediaFrame.prototype.initialize.apply( this, arguments );
+/***/ }),
- // Append the frame view directly the supplied container.
- this.$el.appendTo( this.options.container );
-
- this.createStates();
- this.bindRegionModeHandlers();
- this.render();
- this.bindSearchHandler();
-
- wp.media.frames.browse = this;
- },
-
- bindSearchHandler: function() {
- var search = this.$( '#media-search-input' ),
- searchView = this.browserView.toolbar.get( 'search' ).$el,
- listMode = this.$( '.view-list' ),
-
- input = _.throttle( function (e) {
- var val = $( e.currentTarget ).val(),
- url = '';
-
- if ( val ) {
- url += '?search=' + val;
- this.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );
- }
- }, 1000 );
-
- // Update the URL when entering search string (at most once per second)
- search.on( 'input', _.bind( input, this ) );
-
- this.gridRouter
- .on( 'route:search', function () {
- var href = window.location.href;
- if ( href.indexOf( 'mode=' ) > -1 ) {
- href = href.replace( /mode=[^&]+/g, 'mode=list' );
- } else {
- href += href.indexOf( '?' ) > -1 ? '&mode=list' : '?mode=list';
- }
- href = href.replace( 'search=', 's=' );
- listMode.prop( 'href', href );
- })
- .on( 'route:reset', function() {
- searchView.val( '' ).trigger( 'input' );
- });
- },
-
- /**
- * Create the default states for the frame.
- */
- createStates: function() {
- var options = this.options;
-
- if ( this.options.states ) {
- return;
- }
-
- // Add the default states.
- this.states.add([
- new Library({
- library: wp.media.query( options.library ),
- multiple: options.multiple,
- title: options.title,
- content: 'browse',
- toolbar: 'select',
- contentUserSetting: false,
- filterable: 'all',
- autoSelect: false
- })
- ]);
- },
-
- /**
- * Bind region mode activation events to proper handlers.
- */
- bindRegionModeHandlers: function() {
- this.on( 'content:create:browse', this.browseContent, this );
-
- // Handle a frame-level event for editing an attachment.
- this.on( 'edit:attachment', this.openEditAttachmentModal, this );
-
- this.on( 'select:activate', this.bindKeydown, this );
- this.on( 'select:deactivate', this.unbindKeydown, this );
- },
-
- handleKeydown: function( e ) {
- if ( 27 === e.which ) {
- e.preventDefault();
- this.deactivateMode( 'select' ).activateMode( 'edit' );
- }
- },
-
- bindKeydown: function() {
- this.$body.on( 'keydown.select', _.bind( this.handleKeydown, this ) );
- },
-
- unbindKeydown: function() {
- this.$body.off( 'keydown.select' );
- },
-
- fixPosition: function() {
- var $browser, $toolbar;
- if ( ! this.isModeActive( 'select' ) ) {
- return;
- }
-
- $browser = this.$('.attachments-browser');
- $toolbar = $browser.find('.media-toolbar');
-
- // Offset doesn't appear to take top margin into account, hence +16
- if ( ( $browser.offset().top + 16 ) < this.$window.scrollTop() + this.$adminBar.height() ) {
- $browser.addClass( 'fixed' );
- $toolbar.css('width', $browser.width() + 'px');
- } else {
- $browser.removeClass( 'fixed' );
- $toolbar.css('width', '');
- }
- },
-
- /**
- * Click handler for the `Add New` button.
- */
- addNewClickHandler: function( event ) {
- event.preventDefault();
- this.trigger( 'toggle:upload:attachment' );
-
- if ( this.uploader ) {
- this.uploader.refresh();
- }
- },
-
- /**
- * Open the Edit Attachment modal.
- */
- openEditAttachmentModal: function( model ) {
- // Create a new EditAttachment frame, passing along the library and the attachment model.
- if ( wp.media.frames.edit ) {
- wp.media.frames.edit.open().trigger( 'refresh', model );
- } else {
- wp.media.frames.edit = wp.media( {
- frame: 'edit-attachments',
- controller: this,
- library: this.state().get('library'),
- model: model
- } );
- }
- },
-
- /**
- * Create an attachments browser view within the content region.
- *
- * @param {Object} contentRegion Basic object with a `view` property, which
- * should be set with the proper region view.
- * @this wp.media.controller.Region
- */
- browseContent: function( contentRegion ) {
- var state = this.state();
-
- // Browse our library of attachments.
- this.browserView = contentRegion.view = new wp.media.view.AttachmentsBrowser({
- controller: this,
- collection: state.get('library'),
- selection: state.get('selection'),
- model: state,
- sortable: state.get('sortable'),
- search: state.get('searchable'),
- filters: state.get('filterable'),
- date: state.get('date'),
- display: state.get('displaySettings'),
- dragInfo: state.get('dragInfo'),
- sidebar: 'errors',
-
- suggestedWidth: state.get('suggestedWidth'),
- suggestedHeight: state.get('suggestedHeight'),
-
- AttachmentView: state.get('AttachmentView'),
-
- scrollElement: document
- });
- this.browserView.on( 'ready', _.bind( this.bindDeferred, this ) );
-
- this.errors = wp.Uploader.errors;
- this.errors.on( 'add remove reset', this.sidebarVisibility, this );
- },
-
- sidebarVisibility: function() {
- this.browserView.$( '.media-sidebar' ).toggle( !! this.errors.length );
- },
-
- bindDeferred: function() {
- if ( ! this.browserView.dfd ) {
- return;
- }
- this.browserView.dfd.done( _.bind( this.startHistory, this ) );
- },
-
- startHistory: function() {
- // Verify pushState support and activate
- if ( window.history && window.history.pushState ) {
- if ( Backbone.History.started ) {
- Backbone.history.stop();
- }
- Backbone.history.start( {
- root: window._wpMediaGridSettings.adminUrl,
- pushState: true
- } );
- }
- }
-});
-
-module.exports = Manage;
-
-
-/***/ }),
-/* 13 */
+/***/ "./src/wp-includes/js/media/views/button/select-mode-toggle.js":
+/*!*********************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/button/select-mode-toggle.js ***!
+ \*********************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var Details = wp.media.view.Attachment.Details,
- TwoColumn;
+eval("\nvar Button = wp.media.view.Button,\n\tl10n = wp.media.view.l10n,\n\tSelectModeToggle;\n\n/**\n * wp.media.view.SelectModeToggleButton\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.view.Button\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nSelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.prototype */{\n\tinitialize: function() {\n\t\t_.defaults( this.options, {\n\t\t\tsize : ''\n\t\t} );\n\n\t\tButton.prototype.initialize.apply( this, arguments );\n\t\tthis.controller.on( 'select:activate select:deactivate', this.toggleBulkEditHandler, this );\n\t\tthis.controller.on( 'selection:action:done', this.back, this );\n\t},\n\n\tback: function () {\n\t\tthis.controller.deactivateMode( 'select' ).activateMode( 'edit' );\n\t},\n\n\tclick: function() {\n\t\tButton.prototype.click.apply( this, arguments );\n\t\tif ( this.controller.isModeActive( 'select' ) ) {\n\t\t\tthis.back();\n\t\t} else {\n\t\t\tthis.controller.deactivateMode( 'edit' ).activateMode( 'select' );\n\t\t}\n\t},\n\n\trender: function() {\n\t\tButton.prototype.render.apply( this, arguments );\n\t\tthis.$el.addClass( 'select-mode-toggle-button' );\n\t\treturn this;\n\t},\n\n\ttoggleBulkEditHandler: function() {\n\t\tvar toolbar = this.controller.content.get().toolbar, children;\n\n\t\tchildren = toolbar.$( '.media-toolbar-secondary > *, .media-toolbar-primary > *' );\n\n\t\t// TODO: the Frame should be doing all of this.\n\t\tif ( this.controller.isModeActive( 'select' ) ) {\n\t\t\tthis.model.set( {\n\t\t\t\tsize: 'large',\n\t\t\t\ttext: l10n.cancelSelection\n\t\t\t} );\n\t\t\tchildren.not( '.spinner, .media-button' ).hide();\n\t\t\tthis.$el.show();\n\t\t\ttoolbar.$( '.delete-selected-button' ).removeClass( 'hidden' );\n\t\t} else {\n\t\t\tthis.model.set( {\n\t\t\t\tsize: '',\n\t\t\t\ttext: l10n.bulkSelect\n\t\t\t} );\n\t\t\tthis.controller.content.get().$el.removeClass( 'fixed' );\n\t\t\ttoolbar.$el.css( 'width', '' );\n\t\t\ttoolbar.$( '.delete-selected-button' ).addClass( 'hidden' );\n\t\t\tchildren.not( '.media-button' ).show();\n\t\t\tthis.controller.state().get( 'selection' ).reset();\n\t\t}\n\t}\n});\n\nmodule.exports = SelectModeToggle;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/button/select-mode-toggle.js?");
-/**
- * wp.media.view.Attachment.Details.TwoColumn
- *
- * A similar view to media.view.Attachment.Details
- * for use in the Edit Attachment modal.
- *
- * @memberOf wp.media.view.Attachment.Details
- *
- * @class
- * @augments wp.media.view.Attachment.Details
- * @augments wp.media.view.Attachment
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TowColumn.prototype */{
- template: wp.template( 'attachment-details-two-column' ),
-
- initialize: function() {
- this.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );
-
- Details.prototype.initialize.apply( this, arguments );
- },
-
- editAttachment: function( event ) {
- if ( event ) {
- event.preventDefault();
- }
- this.controller.content.mode( 'edit-image' );
- },
-
- /**
- * Noop this from parent class, doesn't apply here.
- */
- toggleSelectionHandler: function() {},
-
- render: function() {
- Details.prototype.render.apply( this, arguments );
-
- wp.media.mixin.removeAllPlayers();
- this.$( 'audio, video' ).each( function (i, elem) {
- var el = wp.media.view.MediaDetails.prepareSrc( elem );
- new window.MediaElementPlayer( el, wp.media.mixin.mejsSettings );
- } );
- }
-});
-
-module.exports = TwoColumn;
-
-
/***/ }),
-/* 14 */
-/***/ (function(module, exports) {
-/**
- * wp.media.view.MediaFrame.Manage.Router
- *
- * A router for handling the browser history and application state.
- *
- * @memberOf wp.media.view.MediaFrame.Manage
- *
- * @class
- * @augments Backbone.Router
- */
-var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{
- routes: {
- 'upload.php?item=:slug&mode=edit': 'editItem',
- 'upload.php?item=:slug': 'showItem',
- 'upload.php?search=:query': 'search',
- 'upload.php': 'reset'
- },
-
- // Map routes against the page URL
- baseUrl: function( url ) {
- return 'upload.php' + url;
- },
-
- reset: function() {
- var frame = wp.media.frames.edit;
-
- if ( frame ) {
- frame.close();
- }
- },
-
- // Respond to the search route by filling the search field and trigggering the input event
- search: function( query ) {
- jQuery( '#media-search-input' ).val( query ).trigger( 'input' );
- },
-
- // Show the modal with a specific item
- showItem: function( query ) {
- var media = wp.media,
- frame = media.frames.browse,
- library = frame.state().get('library'),
- item;
-
- // Trigger the media frame to open the correct item
- item = library.findWhere( { id: parseInt( query, 10 ) } );
- item.set( 'skipHistory', true );
-
- if ( item ) {
- frame.trigger( 'edit:attachment', item );
- } else {
- item = media.attachment( query );
- frame.listenTo( item, 'change', function( model ) {
- frame.stopListening( item );
- frame.trigger( 'edit:attachment', model );
- } );
- item.fetch();
- }
- },
-
- // Show the modal in edit mode with a specific item.
- editItem: function( query ) {
- this.showItem( query );
- wp.media.frames.edit.content.mode( 'edit-details' );
- }
-});
-
-module.exports = Router;
-
-
-/***/ }),
-/* 15 */
+/***/ "./src/wp-includes/js/media/views/edit-image-details.js":
+/*!**************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/edit-image-details.js ***!
+ \**************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var View = wp.media.View,
- EditImage = wp.media.view.EditImage,
- Details;
+eval("var View = wp.media.View,\n\tEditImage = wp.media.view.EditImage,\n\tDetails;\n\n/**\n * wp.media.view.EditImage.Details\n *\n * @memberOf wp.media.view.EditImage\n *\n * @class\n * @augments wp.media.view.EditImage\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nDetails = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{\n\tinitialize: function( options ) {\n\t\tthis.editor = window.imageEdit;\n\t\tthis.frame = options.frame;\n\t\tthis.controller = options.controller;\n\t\tView.prototype.initialize.apply( this, arguments );\n\t},\n\n\tback: function() {\n\t\tthis.frame.content.mode( 'edit-metadata' );\n\t},\n\n\tsave: function() {\n\t\tthis.model.fetch().done( _.bind( function() {\n\t\t\tthis.frame.content.mode( 'edit-metadata' );\n\t\t}, this ) );\n\t}\n});\n\nmodule.exports = Details;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/edit-image-details.js?");
-/**
- * wp.media.view.EditImage.Details
- *
- * @memberOf wp.media.view.EditImage
- *
- * @class
- * @augments wp.media.view.EditImage
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{
- initialize: function( options ) {
- this.editor = window.imageEdit;
- this.frame = options.frame;
- this.controller = options.controller;
- View.prototype.initialize.apply( this, arguments );
- },
-
- back: function() {
- this.frame.content.mode( 'edit-metadata' );
- },
-
- save: function() {
- this.model.fetch().done( _.bind( function() {
- this.frame.content.mode( 'edit-metadata' );
- }, this ) );
- }
-});
-
-module.exports = Details;
-
-
/***/ }),
-/* 16 */
-/***/ (function(module, exports) {
-var Frame = wp.media.view.Frame,
- MediaFrame = wp.media.view.MediaFrame,
-
- $ = jQuery,
- EditAttachments;
-
-/**
- * wp.media.view.MediaFrame.EditAttachments
- *
- * A frame for editing the details of a specific media item.
- *
- * Opens in a modal by default.
- *
- * Requires an attachment model to be passed in the options hash under `model`.
- *
- * @memberOf wp.media.view.MediaFrame
- *
- * @class
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAttachments.prototype */{
-
- className: 'edit-attachment-frame',
- template: wp.template( 'edit-attachment-frame' ),
- regions: [ 'title', 'content' ],
-
- events: {
- 'click .left': 'previousMediaItem',
- 'click .right': 'nextMediaItem'
- },
-
- initialize: function() {
- Frame.prototype.initialize.apply( this, arguments );
-
- _.defaults( this.options, {
- modal: true,
- state: 'edit-attachment'
- });
-
- this.controller = this.options.controller;
- this.gridRouter = this.controller.gridRouter;
- this.library = this.options.library;
-
- if ( this.options.model ) {
- this.model = this.options.model;
- }
-
- this.bindHandlers();
- this.createStates();
- this.createModal();
-
- this.title.mode( 'default' );
- this.toggleNav();
- },
-
- bindHandlers: function() {
- // Bind default title creation.
- this.on( 'title:create:default', this.createTitle, this );
-
- this.on( 'content:create:edit-metadata', this.editMetadataMode, this );
- this.on( 'content:create:edit-image', this.editImageMode, this );
- this.on( 'content:render:edit-image', this.editImageModeRender, this );
- this.on( 'refresh', this.rerender, this );
- this.on( 'close', this.detach );
-
- this.bindModelHandlers();
- this.listenTo( this.gridRouter, 'route:search', this.close, this );
- },
-
- bindModelHandlers: function() {
- // Close the modal if the attachment is deleted.
- this.listenTo( this.model, 'change:status destroy', this.close, this );
- },
-
- createModal: function() {
- // Initialize modal container view.
- if ( this.options.modal ) {
- this.modal = new wp.media.view.Modal({
- controller: this,
- title: this.options.title
- });
-
- this.modal.on( 'open', _.bind( function () {
- $( 'body' ).on( 'keydown.media-modal', _.bind( this.keyEvent, this ) );
- }, this ) );
-
- // Completely destroy the modal DOM element when closing it.
- this.modal.on( 'close', _.bind( function() {
- $( 'body' ).off( 'keydown.media-modal' ); /* remove the keydown event */
- // Restore the original focus item if possible
- $( 'li.attachment[data-id="' + this.model.get( 'id' ) +'"]' ).focus();
- this.resetRoute();
- }, this ) );
-
- // Set this frame as the modal's content.
- this.modal.content( this );
- this.modal.open();
- }
- },
-
- /**
- * Add the default states to the frame.
- */
- createStates: function() {
- this.states.add([
- new wp.media.controller.EditAttachmentMetadata({
- model: this.model,
- library: this.library
- })
- ]);
- },
-
- /**
- * Content region rendering callback for the `edit-metadata` mode.
- *
- * @param {Object} contentRegion Basic object with a `view` property, which
- * should be set with the proper region view.
- */
- editMetadataMode: function( contentRegion ) {
- contentRegion.view = new wp.media.view.Attachment.Details.TwoColumn({
- controller: this,
- model: this.model
- });
-
- /**
- * Attach a subview to display fields added via the
- * `attachment_fields_to_edit` filter.
- */
- contentRegion.view.views.set( '.attachment-compat', new wp.media.view.AttachmentCompat({
- controller: this,
- model: this.model
- }) );
-
- // Update browser url when navigating media details, except on load.
- if ( this.model && ! this.model.get( 'skipHistory' ) ) {
- this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id ) );
- }
- },
-
- /**
- * Render the EditImage view into the frame's content region.
- *
- * @param {Object} contentRegion Basic object with a `view` property, which
- * should be set with the proper region view.
- */
- editImageMode: function( contentRegion ) {
- var editImageController = new wp.media.controller.EditImage( {
- model: this.model,
- frame: this
- } );
- // Noop some methods.
- editImageController._toolbar = function() {};
- editImageController._router = function() {};
- editImageController._menu = function() {};
-
- contentRegion.view = new wp.media.view.EditImage.Details( {
- model: this.model,
- frame: this,
- controller: editImageController
- } );
-
- this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id + '&mode=edit' ) );
-
- },
-
- editImageModeRender: function( view ) {
- view.on( 'ready', view.loadEditor );
- },
-
- toggleNav: function() {
- this.$('.left').toggleClass( 'disabled', ! this.hasPrevious() );
- this.$('.right').toggleClass( 'disabled', ! this.hasNext() );
- },
-
- /**
- * Rerender the view.
- */
- rerender: function( model ) {
- this.stopListening( this.model );
-
- this.model = model;
-
- this.bindModelHandlers();
-
- // Only rerender the `content` region.
- if ( this.content.mode() !== 'edit-metadata' ) {
- this.content.mode( 'edit-metadata' );
- } else {
- this.content.render();
- }
-
- this.toggleNav();
- },
-
- /**
- * Click handler to switch to the previous media item.
- */
- previousMediaItem: function() {
- if ( ! this.hasPrevious() ) {
- return;
- }
- this.trigger( 'refresh', this.library.at( this.getCurrentIndex() - 1 ) );
- this.$( '.left' ).focus();
- },
-
- /**
- * Click handler to switch to the next media item.
- */
- nextMediaItem: function() {
- if ( ! this.hasNext() ) {
- return;
- }
- this.trigger( 'refresh', this.library.at( this.getCurrentIndex() + 1 ) );
- this.$( '.right' ).focus();
- },
-
- getCurrentIndex: function() {
- return this.library.indexOf( this.model );
- },
-
- hasNext: function() {
- return ( this.getCurrentIndex() + 1 ) < this.library.length;
- },
-
- hasPrevious: function() {
- return ( this.getCurrentIndex() - 1 ) > -1;
- },
- /**
- * Respond to the keyboard events: right arrow, left arrow, except when
- * focus is in a textarea or input field.
- */
- keyEvent: function( event ) {
- if ( ( 'INPUT' === event.target.nodeName || 'TEXTAREA' === event.target.nodeName ) && ! ( event.target.readOnly || event.target.disabled ) ) {
- return;
- }
-
- // The right arrow key
- if ( 39 === event.keyCode ) {
- this.nextMediaItem();
- }
- // The left arrow key
- if ( 37 === event.keyCode ) {
- this.previousMediaItem();
- }
- },
-
- resetRoute: function() {
- var searchTerm = this.controller.browserView.toolbar.get( 'search' ).$el.val(),
- url = '' !== searchTerm ? '?search=' + searchTerm : '';
- this.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );
- }
-});
-
-module.exports = EditAttachments;
-
-
-/***/ }),
-/* 17 */
+/***/ "./src/wp-includes/js/media/views/frame/edit-attachments.js":
+/*!******************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/frame/edit-attachments.js ***!
+ \******************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
+eval("var Frame = wp.media.view.Frame,\n\tMediaFrame = wp.media.view.MediaFrame,\n\n\t$ = jQuery,\n\tEditAttachments;\n\n/**\n * wp.media.view.MediaFrame.EditAttachments\n *\n * A frame for editing the details of a specific media item.\n *\n * Opens in a modal by default.\n *\n * Requires an attachment model to be passed in the options hash under `model`.\n *\n * @memberOf wp.media.view.MediaFrame\n *\n * @class\n * @augments wp.media.view.Frame\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n * @mixes wp.media.controller.StateMachine\n */\nEditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAttachments.prototype */{\n\n\tclassName: 'edit-attachment-frame',\n\ttemplate: wp.template( 'edit-attachment-frame' ),\n\tregions: [ 'title', 'content' ],\n\n\tevents: {\n\t\t'click .left': 'previousMediaItem',\n\t\t'click .right': 'nextMediaItem'\n\t},\n\n\tinitialize: function() {\n\t\tFrame.prototype.initialize.apply( this, arguments );\n\n\t\t_.defaults( this.options, {\n\t\t\tmodal: true,\n\t\t\tstate: 'edit-attachment'\n\t\t});\n\n\t\tthis.controller = this.options.controller;\n\t\tthis.gridRouter = this.controller.gridRouter;\n\t\tthis.library = this.options.library;\n\n\t\tif ( this.options.model ) {\n\t\t\tthis.model = this.options.model;\n\t\t}\n\n\t\tthis.bindHandlers();\n\t\tthis.createStates();\n\t\tthis.createModal();\n\n\t\tthis.title.mode( 'default' );\n\t\tthis.toggleNav();\n\t},\n\n\tbindHandlers: function() {\n\t\t// Bind default title creation.\n\t\tthis.on( 'title:create:default', this.createTitle, this );\n\n\t\tthis.on( 'content:create:edit-metadata', this.editMetadataMode, this );\n\t\tthis.on( 'content:create:edit-image', this.editImageMode, this );\n\t\tthis.on( 'content:render:edit-image', this.editImageModeRender, this );\n\t\tthis.on( 'refresh', this.rerender, this );\n\t\tthis.on( 'close', this.detach );\n\n\t\tthis.bindModelHandlers();\n\t\tthis.listenTo( this.gridRouter, 'route:search', this.close, this );\n\t},\n\n\tbindModelHandlers: function() {\n\t\t// Close the modal if the attachment is deleted.\n\t\tthis.listenTo( this.model, 'change:status destroy', this.close, this );\n\t},\n\n\tcreateModal: function() {\n\t\t// Initialize modal container view.\n\t\tif ( this.options.modal ) {\n\t\t\tthis.modal = new wp.media.view.Modal({\n\t\t\t\tcontroller: this,\n\t\t\t\ttitle: this.options.title\n\t\t\t});\n\n\t\t\tthis.modal.on( 'open', _.bind( function () {\n\t\t\t\t$( 'body' ).on( 'keydown.media-modal', _.bind( this.keyEvent, this ) );\n\t\t\t}, this ) );\n\n\t\t\t// Completely destroy the modal DOM element when closing it.\n\t\t\tthis.modal.on( 'close', _.bind( function() {\n\t\t\t\t$( 'body' ).off( 'keydown.media-modal' ); /* remove the keydown event */\n\t\t\t\t// Restore the original focus item if possible\n\t\t\t\t$( 'li.attachment[data-id=\"' + this.model.get( 'id' ) +'\"]' ).focus();\n\t\t\t\tthis.resetRoute();\n\t\t\t}, this ) );\n\n\t\t\t// Set this frame as the modal's content.\n\t\t\tthis.modal.content( this );\n\t\t\tthis.modal.open();\n\t\t}\n\t},\n\n\t/**\n\t * Add the default states to the frame.\n\t */\n\tcreateStates: function() {\n\t\tthis.states.add([\n\t\t\tnew wp.media.controller.EditAttachmentMetadata({\n\t\t\t\tmodel: this.model,\n\t\t\t\tlibrary: this.library\n\t\t\t})\n\t\t]);\n\t},\n\n\t/**\n\t * Content region rendering callback for the `edit-metadata` mode.\n\t *\n\t * @param {Object} contentRegion Basic object with a `view` property, which\n\t * should be set with the proper region view.\n\t */\n\teditMetadataMode: function( contentRegion ) {\n\t\tcontentRegion.view = new wp.media.view.Attachment.Details.TwoColumn({\n\t\t\tcontroller: this,\n\t\t\tmodel: this.model\n\t\t});\n\n\t\t/**\n\t\t * Attach a subview to display fields added via the\n\t\t * `attachment_fields_to_edit` filter.\n\t\t */\n\t\tcontentRegion.view.views.set( '.attachment-compat', new wp.media.view.AttachmentCompat({\n\t\t\tcontroller: this,\n\t\t\tmodel: this.model\n\t\t}) );\n\n\t\t// Update browser url when navigating media details, except on load.\n\t\tif ( this.model && ! this.model.get( 'skipHistory' ) ) {\n\t\t\tthis.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id ) );\n\t\t}\n\t},\n\n\t/**\n\t * Render the EditImage view into the frame's content region.\n\t *\n\t * @param {Object} contentRegion Basic object with a `view` property, which\n\t * should be set with the proper region view.\n\t */\n\teditImageMode: function( contentRegion ) {\n\t\tvar editImageController = new wp.media.controller.EditImage( {\n\t\t\tmodel: this.model,\n\t\t\tframe: this\n\t\t} );\n\t\t// Noop some methods.\n\t\teditImageController._toolbar = function() {};\n\t\teditImageController._router = function() {};\n\t\teditImageController._menu = function() {};\n\n\t\tcontentRegion.view = new wp.media.view.EditImage.Details( {\n\t\t\tmodel: this.model,\n\t\t\tframe: this,\n\t\t\tcontroller: editImageController\n\t\t} );\n\n\t\tthis.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id + '&mode=edit' ) );\n\n\t},\n\n\teditImageModeRender: function( view ) {\n\t\tview.on( 'ready', view.loadEditor );\n\t},\n\n\ttoggleNav: function() {\n\t\tthis.$('.left').toggleClass( 'disabled', ! this.hasPrevious() );\n\t\tthis.$('.right').toggleClass( 'disabled', ! this.hasNext() );\n\t},\n\n\t/**\n\t * Rerender the view.\n\t */\n\trerender: function( model ) {\n\t\tthis.stopListening( this.model );\n\n\t\tthis.model = model;\n\n\t\tthis.bindModelHandlers();\n\n\t\t// Only rerender the `content` region.\n\t\tif ( this.content.mode() !== 'edit-metadata' ) {\n\t\t\tthis.content.mode( 'edit-metadata' );\n\t\t} else {\n\t\t\tthis.content.render();\n\t\t}\n\n\t\tthis.toggleNav();\n\t},\n\n\t/**\n\t * Click handler to switch to the previous media item.\n\t */\n\tpreviousMediaItem: function() {\n\t\tif ( ! this.hasPrevious() ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.trigger( 'refresh', this.library.at( this.getCurrentIndex() - 1 ) );\n\t\tthis.$( '.left' ).focus();\n\t},\n\n\t/**\n\t * Click handler to switch to the next media item.\n\t */\n\tnextMediaItem: function() {\n\t\tif ( ! this.hasNext() ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.trigger( 'refresh', this.library.at( this.getCurrentIndex() + 1 ) );\n\t\tthis.$( '.right' ).focus();\n\t},\n\n\tgetCurrentIndex: function() {\n\t\treturn this.library.indexOf( this.model );\n\t},\n\n\thasNext: function() {\n\t\treturn ( this.getCurrentIndex() + 1 ) < this.library.length;\n\t},\n\n\thasPrevious: function() {\n\t\treturn ( this.getCurrentIndex() - 1 ) > -1;\n\t},\n\t/**\n\t * Respond to the keyboard events: right arrow, left arrow, except when\n\t * focus is in a textarea or input field.\n\t */\n\tkeyEvent: function( event ) {\n\t\tif ( ( 'INPUT' === event.target.nodeName || 'TEXTAREA' === event.target.nodeName ) && ! ( event.target.readOnly || event.target.disabled ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The right arrow key\n\t\tif ( 39 === event.keyCode ) {\n\t\t\tthis.nextMediaItem();\n\t\t}\n\t\t// The left arrow key\n\t\tif ( 37 === event.keyCode ) {\n\t\t\tthis.previousMediaItem();\n\t\t}\n\t},\n\n\tresetRoute: function() {\n\t\tvar searchTerm = this.controller.browserView.toolbar.get( 'search' ).$el.val(),\n\t\t\turl = '' !== searchTerm ? '?search=' + searchTerm : '';\n\t\tthis.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );\n\t}\n});\n\nmodule.exports = EditAttachments;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/frame/edit-attachments.js?");
-var Button = wp.media.view.Button,
- l10n = wp.media.view.l10n,
- SelectModeToggle;
-
-/**
- * wp.media.view.SelectModeToggleButton
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.Button
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.prototype */{
- initialize: function() {
- _.defaults( this.options, {
- size : ''
- } );
-
- Button.prototype.initialize.apply( this, arguments );
- this.controller.on( 'select:activate select:deactivate', this.toggleBulkEditHandler, this );
- this.controller.on( 'selection:action:done', this.back, this );
- },
-
- back: function () {
- this.controller.deactivateMode( 'select' ).activateMode( 'edit' );
- },
-
- click: function() {
- Button.prototype.click.apply( this, arguments );
- if ( this.controller.isModeActive( 'select' ) ) {
- this.back();
- } else {
- this.controller.deactivateMode( 'edit' ).activateMode( 'select' );
- }
- },
-
- render: function() {
- Button.prototype.render.apply( this, arguments );
- this.$el.addClass( 'select-mode-toggle-button' );
- return this;
- },
-
- toggleBulkEditHandler: function() {
- var toolbar = this.controller.content.get().toolbar, children;
-
- children = toolbar.$( '.media-toolbar-secondary > *, .media-toolbar-primary > *' );
-
- // TODO: the Frame should be doing all of this.
- if ( this.controller.isModeActive( 'select' ) ) {
- this.model.set( {
- size: 'large',
- text: l10n.cancelSelection
- } );
- children.not( '.spinner, .media-button' ).hide();
- this.$el.show();
- toolbar.$( '.delete-selected-button' ).removeClass( 'hidden' );
- } else {
- this.model.set( {
- size: '',
- text: l10n.bulkSelect
- } );
- this.controller.content.get().$el.removeClass( 'fixed' );
- toolbar.$el.css( 'width', '' );
- toolbar.$( '.delete-selected-button' ).addClass( 'hidden' );
- children.not( '.media-button' ).show();
- this.controller.state().get( 'selection' ).reset();
- }
- }
-});
-
-module.exports = SelectModeToggle;
-
-
/***/ }),
-/* 18 */
-/***/ (function(module, exports) {
-var Button = wp.media.view.Button,
- l10n = wp.media.view.l10n,
- DeleteSelected;
-
-/**
- * wp.media.view.DeleteSelectedButton
- *
- * A button that handles bulk Delete/Trash logic
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.Button
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{
- initialize: function() {
- Button.prototype.initialize.apply( this, arguments );
- if ( this.options.filters ) {
- this.options.filters.model.on( 'change', this.filterChange, this );
- }
- this.controller.on( 'selection:toggle', this.toggleDisabled, this );
- },
-
- filterChange: function( model ) {
- if ( 'trash' === model.get( 'status' ) ) {
- this.model.set( 'text', l10n.untrashSelected );
- } else if ( wp.media.view.settings.mediaTrash ) {
- this.model.set( 'text', l10n.trashSelected );
- } else {
- this.model.set( 'text', l10n.deleteSelected );
- }
- },
-
- toggleDisabled: function() {
- this.model.set( 'disabled', ! this.controller.state().get( 'selection' ).length );
- },
-
- render: function() {
- Button.prototype.render.apply( this, arguments );
- if ( this.controller.isModeActive( 'select' ) ) {
- this.$el.addClass( 'delete-selected-button' );
- } else {
- this.$el.addClass( 'delete-selected-button hidden' );
- }
- this.toggleDisabled();
- return this;
- }
-});
-
-module.exports = DeleteSelected;
-
-
-/***/ }),
-/* 19 */
+/***/ "./src/wp-includes/js/media/views/frame/manage.js":
+/*!********************************************************!*\
+ !*** ./src/wp-includes/js/media/views/frame/manage.js ***!
+ \********************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var Button = wp.media.view.Button,
- DeleteSelected = wp.media.view.DeleteSelectedButton,
- DeleteSelectedPermanently;
+eval("var MediaFrame = wp.media.view.MediaFrame,\n\tLibrary = wp.media.controller.Library,\n\n\t$ = Backbone.$,\n\tManage;\n\n/**\n * wp.media.view.MediaFrame.Manage\n *\n * A generic management frame workflow.\n *\n * Used in the media grid view.\n *\n * @memberOf wp.media.view.MediaFrame\n *\n * @class\n * @augments wp.media.view.MediaFrame\n * @augments wp.media.view.Frame\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n * @mixes wp.media.controller.StateMachine\n */\nManage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype */{\n\t/**\n\t * @constructs\n\t */\n\tinitialize: function() {\n\t\t_.defaults( this.options, {\n\t\t\ttitle: '',\n\t\t\tmodal: false,\n\t\t\tselection: [],\n\t\t\tlibrary: {}, // Options hash for the query to the media library.\n\t\t\tmultiple: 'add',\n\t\t\tstate: 'library',\n\t\t\tuploader: true,\n\t\t\tmode: [ 'grid', 'edit' ]\n\t\t});\n\n\t\tthis.$body = $( document.body );\n\t\tthis.$window = $( window );\n\t\tthis.$adminBar = $( '#wpadminbar' );\n\t\t// Store the Add New button for later reuse in wp.media.view.UploaderInline.\n\t\tthis.$uploaderToggler = $( '.page-title-action' )\n\t\t\t.attr( 'aria-expanded', 'false' )\n\t\t\t.on( 'click', _.bind( this.addNewClickHandler, this ) );\n\n\t\tthis.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );\n\n\t\t// Ensure core and media grid view UI is enabled.\n\t\tthis.$el.addClass('wp-core-ui');\n\n\t\t// Force the uploader off if the upload limit has been exceeded or\n\t\t// if the browser isn't supported.\n\t\tif ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported ) {\n\t\t\tthis.options.uploader = false;\n\t\t}\n\n\t\t// Initialize a window-wide uploader.\n\t\tif ( this.options.uploader ) {\n\t\t\tthis.uploader = new wp.media.view.UploaderWindow({\n\t\t\t\tcontroller: this,\n\t\t\t\tuploader: {\n\t\t\t\t\tdropzone: document.body,\n\t\t\t\t\tcontainer: document.body\n\t\t\t\t}\n\t\t\t}).render();\n\t\t\tthis.uploader.ready();\n\t\t\t$('body').append( this.uploader.el );\n\n\t\t\tthis.options.uploader = false;\n\t\t}\n\n\t\tthis.gridRouter = new wp.media.view.MediaFrame.Manage.Router();\n\n\t\t// Call 'initialize' directly on the parent class.\n\t\tMediaFrame.prototype.initialize.apply( this, arguments );\n\n\t\t// Append the frame view directly the supplied container.\n\t\tthis.$el.appendTo( this.options.container );\n\n\t\tthis.createStates();\n\t\tthis.bindRegionModeHandlers();\n\t\tthis.render();\n\t\tthis.bindSearchHandler();\n\n\t\twp.media.frames.browse = this;\n\t},\n\n\tbindSearchHandler: function() {\n\t\tvar search = this.$( '#media-search-input' ),\n\t\t\tsearchView = this.browserView.toolbar.get( 'search' ).$el,\n\t\t\tlistMode = this.$( '.view-list' ),\n\n\t\t\tinput = _.throttle( function (e) {\n\t\t\t\tvar val = $( e.currentTarget ).val(),\n\t\t\t\t\turl = '';\n\n\t\t\t\tif ( val ) {\n\t\t\t\t\turl += '?search=' + val;\n\t\t\t\t\tthis.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );\n\t\t\t\t}\n\t\t\t}, 1000 );\n\n\t\t// Update the URL when entering search string (at most once per second)\n\t\tsearch.on( 'input', _.bind( input, this ) );\n\n\t\tthis.gridRouter\n\t\t\t.on( 'route:search', function () {\n\t\t\t\tvar href = window.location.href;\n\t\t\t\tif ( href.indexOf( 'mode=' ) > -1 ) {\n\t\t\t\t\thref = href.replace( /mode=[^&]+/g, 'mode=list' );\n\t\t\t\t} else {\n\t\t\t\t\thref += href.indexOf( '?' ) > -1 ? '&mode=list' : '?mode=list';\n\t\t\t\t}\n\t\t\t\thref = href.replace( 'search=', 's=' );\n\t\t\t\tlistMode.prop( 'href', href );\n\t\t\t})\n\t\t\t.on( 'route:reset', function() {\n\t\t\t\tsearchView.val( '' ).trigger( 'input' );\n\t\t\t});\n\t},\n\n\t/**\n\t * Create the default states for the frame.\n\t */\n\tcreateStates: function() {\n\t\tvar options = this.options;\n\n\t\tif ( this.options.states ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the default states.\n\t\tthis.states.add([\n\t\t\tnew Library({\n\t\t\t\tlibrary: wp.media.query( options.library ),\n\t\t\t\tmultiple: options.multiple,\n\t\t\t\ttitle: options.title,\n\t\t\t\tcontent: 'browse',\n\t\t\t\ttoolbar: 'select',\n\t\t\t\tcontentUserSetting: false,\n\t\t\t\tfilterable: 'all',\n\t\t\t\tautoSelect: false\n\t\t\t})\n\t\t]);\n\t},\n\n\t/**\n\t * Bind region mode activation events to proper handlers.\n\t */\n\tbindRegionModeHandlers: function() {\n\t\tthis.on( 'content:create:browse', this.browseContent, this );\n\n\t\t// Handle a frame-level event for editing an attachment.\n\t\tthis.on( 'edit:attachment', this.openEditAttachmentModal, this );\n\n\t\tthis.on( 'select:activate', this.bindKeydown, this );\n\t\tthis.on( 'select:deactivate', this.unbindKeydown, this );\n\t},\n\n\thandleKeydown: function( e ) {\n\t\tif ( 27 === e.which ) {\n\t\t\te.preventDefault();\n\t\t\tthis.deactivateMode( 'select' ).activateMode( 'edit' );\n\t\t}\n\t},\n\n\tbindKeydown: function() {\n\t\tthis.$body.on( 'keydown.select', _.bind( this.handleKeydown, this ) );\n\t},\n\n\tunbindKeydown: function() {\n\t\tthis.$body.off( 'keydown.select' );\n\t},\n\n\tfixPosition: function() {\n\t\tvar $browser, $toolbar;\n\t\tif ( ! this.isModeActive( 'select' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$browser = this.$('.attachments-browser');\n\t\t$toolbar = $browser.find('.media-toolbar');\n\n\t\t// Offset doesn't appear to take top margin into account, hence +16\n\t\tif ( ( $browser.offset().top + 16 ) < this.$window.scrollTop() + this.$adminBar.height() ) {\n\t\t\t$browser.addClass( 'fixed' );\n\t\t\t$toolbar.css('width', $browser.width() + 'px');\n\t\t} else {\n\t\t\t$browser.removeClass( 'fixed' );\n\t\t\t$toolbar.css('width', '');\n\t\t}\n\t},\n\n\t/**\n\t * Click handler for the `Add New` button.\n\t */\n\taddNewClickHandler: function( event ) {\n\t\tevent.preventDefault();\n\t\tthis.trigger( 'toggle:upload:attachment' );\n\n\t\tif ( this.uploader ) {\n\t\t\tthis.uploader.refresh();\n\t\t}\n\t},\n\n\t/**\n\t * Open the Edit Attachment modal.\n\t */\n\topenEditAttachmentModal: function( model ) {\n\t\t// Create a new EditAttachment frame, passing along the library and the attachment model.\n\t\tif ( wp.media.frames.edit ) {\n\t\t\twp.media.frames.edit.open().trigger( 'refresh', model );\n\t\t} else {\n\t\t\twp.media.frames.edit = wp.media( {\n\t\t\t\tframe: 'edit-attachments',\n\t\t\t\tcontroller: this,\n\t\t\t\tlibrary: this.state().get('library'),\n\t\t\t\tmodel: model\n\t\t\t} );\n\t\t}\n\t},\n\n\t/**\n\t * Create an attachments browser view within the content region.\n\t *\n\t * @param {Object} contentRegion Basic object with a `view` property, which\n\t * should be set with the proper region view.\n\t * @this wp.media.controller.Region\n\t */\n\tbrowseContent: function( contentRegion ) {\n\t\tvar state = this.state();\n\n\t\t// Browse our library of attachments.\n\t\tthis.browserView = contentRegion.view = new wp.media.view.AttachmentsBrowser({\n\t\t\tcontroller: this,\n\t\t\tcollection: state.get('library'),\n\t\t\tselection: state.get('selection'),\n\t\t\tmodel: state,\n\t\t\tsortable: state.get('sortable'),\n\t\t\tsearch: state.get('searchable'),\n\t\t\tfilters: state.get('filterable'),\n\t\t\tdate: state.get('date'),\n\t\t\tdisplay: state.get('displaySettings'),\n\t\t\tdragInfo: state.get('dragInfo'),\n\t\t\tsidebar: 'errors',\n\n\t\t\tsuggestedWidth: state.get('suggestedWidth'),\n\t\t\tsuggestedHeight: state.get('suggestedHeight'),\n\n\t\t\tAttachmentView: state.get('AttachmentView'),\n\n\t\t\tscrollElement: document\n\t\t});\n\t\tthis.browserView.on( 'ready', _.bind( this.bindDeferred, this ) );\n\n\t\tthis.errors = wp.Uploader.errors;\n\t\tthis.errors.on( 'add remove reset', this.sidebarVisibility, this );\n\t},\n\n\tsidebarVisibility: function() {\n\t\tthis.browserView.$( '.media-sidebar' ).toggle( !! this.errors.length );\n\t},\n\n\tbindDeferred: function() {\n\t\tif ( ! this.browserView.dfd ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.browserView.dfd.done( _.bind( this.startHistory, this ) );\n\t},\n\n\tstartHistory: function() {\n\t\t// Verify pushState support and activate\n\t\tif ( window.history && window.history.pushState ) {\n\t\t\tif ( Backbone.History.started ) {\n\t\t\t\tBackbone.history.stop();\n\t\t\t}\n\t\t\tBackbone.history.start( {\n\t\t\t\troot: window._wpMediaGridSettings.adminUrl,\n\t\t\t\tpushState: true\n\t\t\t} );\n\t\t}\n\t}\n});\n\nmodule.exports = Manage;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/frame/manage.js?");
-/**
- * wp.media.view.DeleteSelectedPermanentlyButton
- *
- * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
- *
- * @memberOf wp.media.view
- *
- * @class
- * @augments wp.media.view.DeleteSelectedButton
- * @augments wp.media.view.Button
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- */
-DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{
- initialize: function() {
- DeleteSelected.prototype.initialize.apply( this, arguments );
- this.controller.on( 'select:activate', this.selectActivate, this );
- this.controller.on( 'select:deactivate', this.selectDeactivate, this );
- },
+/***/ })
- filterChange: function( model ) {
- this.canShow = ( 'trash' === model.get( 'status' ) );
- },
-
- selectActivate: function() {
- this.toggleDisabled();
- this.$el.toggleClass( 'hidden', ! this.canShow );
- },
-
- selectDeactivate: function() {
- this.toggleDisabled();
- this.$el.addClass( 'hidden' );
- },
-
- render: function() {
- Button.prototype.render.apply( this, arguments );
- this.selectActivate();
- return this;
- }
-});
-
-module.exports = DeleteSelectedPermanently;
-
-
-/***/ })
-/******/ ]);
\ No newline at end of file
+/******/ });
\ No newline at end of file
Index: src/wp-includes/js/media-models.js
===================================================================
--- src/wp-includes/js/media-models.js (revision 43688)
+++ src/wp-includes/js/media-models.js (working copy)
@@ -81,1569 +81,75 @@
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 20);
+/******/ return __webpack_require__(__webpack_require__.s = "./src/wp-includes/js/media/models.manifest.js");
/******/ })
/************************************************************************/
/******/ ({
-/***/ 20:
+/***/ "./src/wp-includes/js/media/models.manifest.js":
+/*!*****************************************************!*\
+ !*** ./src/wp-includes/js/media/models.manifest.js ***!
+ \*****************************************************/
+/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-var $ = jQuery,
- Attachment, Attachments, l10n, media;
+eval("var $ = jQuery,\n\tAttachment, Attachments, l10n, media;\n\n/** @namespace wp */\nwindow.wp = window.wp || {};\n\n/**\n * Create and return a media frame.\n *\n * Handles the default media experience.\n *\n * @alias wp.media\n * @memberOf wp\n * @namespace\n *\n * @param {object} attributes The properties passed to the main media controller.\n * @return {wp.media.view.MediaFrame} A media workflow.\n */\nmedia = wp.media = function( attributes ) {\n\tvar MediaFrame = media.view.MediaFrame,\n\t\tframe;\n\n\tif ( ! MediaFrame ) {\n\t\treturn;\n\t}\n\n\tattributes = _.defaults( attributes || {}, {\n\t\tframe: 'select'\n\t});\n\n\tif ( 'select' === attributes.frame && MediaFrame.Select ) {\n\t\tframe = new MediaFrame.Select( attributes );\n\t} else if ( 'post' === attributes.frame && MediaFrame.Post ) {\n\t\tframe = new MediaFrame.Post( attributes );\n\t} else if ( 'manage' === attributes.frame && MediaFrame.Manage ) {\n\t\tframe = new MediaFrame.Manage( attributes );\n\t} else if ( 'image' === attributes.frame && MediaFrame.ImageDetails ) {\n\t\tframe = new MediaFrame.ImageDetails( attributes );\n\t} else if ( 'audio' === attributes.frame && MediaFrame.AudioDetails ) {\n\t\tframe = new MediaFrame.AudioDetails( attributes );\n\t} else if ( 'video' === attributes.frame && MediaFrame.VideoDetails ) {\n\t\tframe = new MediaFrame.VideoDetails( attributes );\n\t} else if ( 'edit-attachments' === attributes.frame && MediaFrame.EditAttachments ) {\n\t\tframe = new MediaFrame.EditAttachments( attributes );\n\t}\n\n\tdelete attributes.frame;\n\n\tmedia.frame = frame;\n\n\treturn frame;\n};\n\n/** @namespace wp.media.model */\n/** @namespace wp.media.view */\n/** @namespace wp.media.controller */\n/** @namespace wp.media.frames */\n_.extend( media, { model: {}, view: {}, controller: {}, frames: {} });\n\n// Link any localized strings.\nl10n = media.model.l10n = window._wpMediaModelsL10n || {};\n\n// Link any settings.\nmedia.model.settings = l10n.settings || {};\ndelete l10n.settings;\n\nAttachment = media.model.Attachment = __webpack_require__( /*! ./models/attachment.js */ \"./src/wp-includes/js/media/models/attachment.js\" );\nAttachments = media.model.Attachments = __webpack_require__( /*! ./models/attachments.js */ \"./src/wp-includes/js/media/models/attachments.js\" );\n\nmedia.model.Query = __webpack_require__( /*! ./models/query.js */ \"./src/wp-includes/js/media/models/query.js\" );\nmedia.model.PostImage = __webpack_require__( /*! ./models/post-image.js */ \"./src/wp-includes/js/media/models/post-image.js\" );\nmedia.model.Selection = __webpack_require__( /*! ./models/selection.js */ \"./src/wp-includes/js/media/models/selection.js\" );\n\n/**\n * ========================================================================\n * UTILITIES\n * ========================================================================\n */\n\n/**\n * A basic equality comparator for Backbone models.\n *\n * Used to order models within a collection - @see wp.media.model.Attachments.comparator().\n *\n * @param {mixed} a The primary parameter to compare.\n * @param {mixed} b The primary parameter to compare.\n * @param {string} ac The fallback parameter to compare, a's cid.\n * @param {string} bc The fallback parameter to compare, b's cid.\n * @return {number} -1: a should come before b.\n * 0: a and b are of the same rank.\n * 1: b should come before a.\n */\nmedia.compare = function( a, b, ac, bc ) {\n\tif ( _.isEqual( a, b ) ) {\n\t\treturn ac === bc ? 0 : (ac > bc ? -1 : 1);\n\t} else {\n\t\treturn a > b ? -1 : 1;\n\t}\n};\n\n_.extend( media, /** @lends wp.media */{\n\t/**\n\t * media.template( id )\n\t *\n\t * Fetch a JavaScript template for an id, and return a templating function for it.\n\t *\n\t * See wp.template() in `wp-includes/js/wp-util.js`.\n\t *\n\t * @borrows wp.template as template\n\t */\n\ttemplate: wp.template,\n\n\t/**\n\t * media.post( [action], [data] )\n\t *\n\t * Sends a POST request to WordPress.\n\t * See wp.ajax.post() in `wp-includes/js/wp-util.js`.\n\t *\n\t * @borrows wp.ajax.post as post\n\t */\n\tpost: wp.ajax.post,\n\n\t/**\n\t * media.ajax( [action], [options] )\n\t *\n\t * Sends an XHR request to WordPress.\n\t * See wp.ajax.send() in `wp-includes/js/wp-util.js`.\n\t *\n\t * @borrows wp.ajax.send as ajax\n\t */\n\tajax: wp.ajax.send,\n\n\t/**\n\t * Scales a set of dimensions to fit within bounding dimensions.\n\t *\n\t * @param {Object} dimensions\n\t * @returns {Object}\n\t */\n\tfit: function( dimensions ) {\n\t\tvar width = dimensions.width,\n\t\t\theight = dimensions.height,\n\t\t\tmaxWidth = dimensions.maxWidth,\n\t\t\tmaxHeight = dimensions.maxHeight,\n\t\t\tconstraint;\n\n\t\t// Compare ratios between the two values to determine which\n\t\t// max to constrain by. If a max value doesn't exist, then the\n\t\t// opposite side is the constraint.\n\t\tif ( ! _.isUndefined( maxWidth ) && ! _.isUndefined( maxHeight ) ) {\n\t\t\tconstraint = ( width / height > maxWidth / maxHeight ) ? 'width' : 'height';\n\t\t} else if ( _.isUndefined( maxHeight ) ) {\n\t\t\tconstraint = 'width';\n\t\t} else if ( _.isUndefined( maxWidth ) && height > maxHeight ) {\n\t\t\tconstraint = 'height';\n\t\t}\n\n\t\t// If the value of the constrained side is larger than the max,\n\t\t// then scale the values. Otherwise return the originals; they fit.\n\t\tif ( 'width' === constraint && width > maxWidth ) {\n\t\t\treturn {\n\t\t\t\twidth : maxWidth,\n\t\t\t\theight: Math.round( maxWidth * height / width )\n\t\t\t};\n\t\t} else if ( 'height' === constraint && height > maxHeight ) {\n\t\t\treturn {\n\t\t\t\twidth : Math.round( maxHeight * width / height ),\n\t\t\t\theight: maxHeight\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\twidth : width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\t/**\n\t * Truncates a string by injecting an ellipsis into the middle.\n\t * Useful for filenames.\n\t *\n\t * @param {String} string\n\t * @param {Number} [length=30]\n\t * @param {String} [replacement=…]\n\t * @returns {String} The string, unless length is greater than string.length.\n\t */\n\ttruncate: function( string, length, replacement ) {\n\t\tlength = length || 30;\n\t\treplacement = replacement || '…';\n\n\t\tif ( string.length <= length ) {\n\t\t\treturn string;\n\t\t}\n\n\t\treturn string.substr( 0, length / 2 ) + replacement + string.substr( -1 * length / 2 );\n\t}\n});\n\n/**\n * ========================================================================\n * MODELS\n * ========================================================================\n */\n/**\n * wp.media.attachment\n *\n * @static\n * @param {String} id A string used to identify a model.\n * @returns {wp.media.model.Attachment}\n */\nmedia.attachment = function( id ) {\n\treturn Attachment.get( id );\n};\n\n/**\n * A collection of all attachments that have been fetched from the server.\n *\n * @static\n * @member {wp.media.model.Attachments}\n */\nAttachments.all = new Attachments();\n\n/**\n * wp.media.query\n *\n * Shorthand for creating a new Attachments Query.\n *\n * @param {object} [props]\n * @returns {wp.media.model.Attachments}\n */\nmedia.query = function( props ) {\n\treturn new Attachments( null, {\n\t\tprops: _.extend( _.defaults( props || {}, { orderby: 'date' } ), { query: true } )\n\t});\n};\n\n// Clean up. Prevents mobile browsers caching\n$(window).on('unload', function(){\n\twindow.wp = null;\n});\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models.manifest.js?");
-/** @namespace wp */
-window.wp = window.wp || {};
-
-/**
- * Create and return a media frame.
- *
- * Handles the default media experience.
- *
- * @alias wp.media
- * @memberOf wp
- * @namespace
- *
- * @param {object} attributes The properties passed to the main media controller.
- * @return {wp.media.view.MediaFrame} A media workflow.
- */
-media = wp.media = function( attributes ) {
- var MediaFrame = media.view.MediaFrame,
- frame;
-
- if ( ! MediaFrame ) {
- return;
- }
-
- attributes = _.defaults( attributes || {}, {
- frame: 'select'
- });
-
- if ( 'select' === attributes.frame && MediaFrame.Select ) {
- frame = new MediaFrame.Select( attributes );
- } else if ( 'post' === attributes.frame && MediaFrame.Post ) {
- frame = new MediaFrame.Post( attributes );
- } else if ( 'manage' === attributes.frame && MediaFrame.Manage ) {
- frame = new MediaFrame.Manage( attributes );
- } else if ( 'image' === attributes.frame && MediaFrame.ImageDetails ) {
- frame = new MediaFrame.ImageDetails( attributes );
- } else if ( 'audio' === attributes.frame && MediaFrame.AudioDetails ) {
- frame = new MediaFrame.AudioDetails( attributes );
- } else if ( 'video' === attributes.frame && MediaFrame.VideoDetails ) {
- frame = new MediaFrame.VideoDetails( attributes );
- } else if ( 'edit-attachments' === attributes.frame && MediaFrame.EditAttachments ) {
- frame = new MediaFrame.EditAttachments( attributes );
- }
-
- delete attributes.frame;
-
- media.frame = frame;
-
- return frame;
-};
-
-/** @namespace wp.media.model */
-/** @namespace wp.media.view */
-/** @namespace wp.media.controller */
-/** @namespace wp.media.frames */
-_.extend( media, { model: {}, view: {}, controller: {}, frames: {} });
-
-// Link any localized strings.
-l10n = media.model.l10n = window._wpMediaModelsL10n || {};
-
-// Link any settings.
-media.model.settings = l10n.settings || {};
-delete l10n.settings;
-
-Attachment = media.model.Attachment = __webpack_require__( 21 );
-Attachments = media.model.Attachments = __webpack_require__( 22 );
-
-media.model.Query = __webpack_require__( 23 );
-media.model.PostImage = __webpack_require__( 24 );
-media.model.Selection = __webpack_require__( 25 );
-
-/**
- * ========================================================================
- * UTILITIES
- * ========================================================================
- */
-
-/**
- * A basic equality comparator for Backbone models.
- *
- * Used to order models within a collection - @see wp.media.model.Attachments.comparator().
- *
- * @param {mixed} a The primary parameter to compare.
- * @param {mixed} b The primary parameter to compare.
- * @param {string} ac The fallback parameter to compare, a's cid.
- * @param {string} bc The fallback parameter to compare, b's cid.
- * @return {number} -1: a should come before b.
- * 0: a and b are of the same rank.
- * 1: b should come before a.
- */
-media.compare = function( a, b, ac, bc ) {
- if ( _.isEqual( a, b ) ) {
- return ac === bc ? 0 : (ac > bc ? -1 : 1);
- } else {
- return a > b ? -1 : 1;
- }
-};
-
-_.extend( media, /** @lends wp.media */{
- /**
- * media.template( id )
- *
- * Fetch a JavaScript template for an id, and return a templating function for it.
- *
- * See wp.template() in `wp-includes/js/wp-util.js`.
- *
- * @borrows wp.template as template
- */
- template: wp.template,
-
- /**
- * media.post( [action], [data] )
- *
- * Sends a POST request to WordPress.
- * See wp.ajax.post() in `wp-includes/js/wp-util.js`.
- *
- * @borrows wp.ajax.post as post
- */
- post: wp.ajax.post,
-
- /**
- * media.ajax( [action], [options] )
- *
- * Sends an XHR request to WordPress.
- * See wp.ajax.send() in `wp-includes/js/wp-util.js`.
- *
- * @borrows wp.ajax.send as ajax
- */
- ajax: wp.ajax.send,
-
- /**
- * Scales a set of dimensions to fit within bounding dimensions.
- *
- * @param {Object} dimensions
- * @returns {Object}
- */
- fit: function( dimensions ) {
- var width = dimensions.width,
- height = dimensions.height,
- maxWidth = dimensions.maxWidth,
- maxHeight = dimensions.maxHeight,
- constraint;
-
- // Compare ratios between the two values to determine which
- // max to constrain by. If a max value doesn't exist, then the
- // opposite side is the constraint.
- if ( ! _.isUndefined( maxWidth ) && ! _.isUndefined( maxHeight ) ) {
- constraint = ( width / height > maxWidth / maxHeight ) ? 'width' : 'height';
- } else if ( _.isUndefined( maxHeight ) ) {
- constraint = 'width';
- } else if ( _.isUndefined( maxWidth ) && height > maxHeight ) {
- constraint = 'height';
- }
-
- // If the value of the constrained side is larger than the max,
- // then scale the values. Otherwise return the originals; they fit.
- if ( 'width' === constraint && width > maxWidth ) {
- return {
- width : maxWidth,
- height: Math.round( maxWidth * height / width )
- };
- } else if ( 'height' === constraint && height > maxHeight ) {
- return {
- width : Math.round( maxHeight * width / height ),
- height: maxHeight
- };
- } else {
- return {
- width : width,
- height: height
- };
- }
- },
- /**
- * Truncates a string by injecting an ellipsis into the middle.
- * Useful for filenames.
- *
- * @param {String} string
- * @param {Number} [length=30]
- * @param {String} [replacement=…]
- * @returns {String} The string, unless length is greater than string.length.
- */
- truncate: function( string, length, replacement ) {
- length = length || 30;
- replacement = replacement || '…';
-
- if ( string.length <= length ) {
- return string;
- }
-
- return string.substr( 0, length / 2 ) + replacement + string.substr( -1 * length / 2 );
- }
-});
-
-/**
- * ========================================================================
- * MODELS
- * ========================================================================
- */
-/**
- * wp.media.attachment
- *
- * @static
- * @param {String} id A string used to identify a model.
- * @returns {wp.media.model.Attachment}
- */
-media.attachment = function( id ) {
- return Attachment.get( id );
-};
-
-/**
- * A collection of all attachments that have been fetched from the server.
- *
- * @static
- * @member {wp.media.model.Attachments}
- */
-Attachments.all = new Attachments();
-
-/**
- * wp.media.query
- *
- * Shorthand for creating a new Attachments Query.
- *
- * @param {object} [props]
- * @returns {wp.media.model.Attachments}
- */
-media.query = function( props ) {
- return new Attachments( null, {
- props: _.extend( _.defaults( props || {}, { orderby: 'date' } ), { query: true } )
- });
-};
-
-// Clean up. Prevents mobile browsers caching
-$(window).on('unload', function(){
- window.wp = null;
-});
-
-
/***/ }),
-/***/ 21:
+/***/ "./src/wp-includes/js/media/models/attachment.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/models/attachment.js ***!
+ \*******************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var $ = Backbone.$,
- Attachment;
+eval("var $ = Backbone.$,\n\tAttachment;\n\n/**\n * wp.media.model.Attachment\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments Backbone.Model\n */\nAttachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototype */{\n\t/**\n\t * Triggered when attachment details change\n\t * Overrides Backbone.Model.sync\n\t *\n\t * @param {string} method\n\t * @param {wp.media.model.Attachment} model\n\t * @param {Object} [options={}]\n\t *\n\t * @returns {Promise}\n\t */\n\tsync: function( method, model, options ) {\n\t\t// If the attachment does not yet have an `id`, return an instantly\n\t\t// rejected promise. Otherwise, all of our requests will fail.\n\t\tif ( _.isUndefined( this.id ) ) {\n\t\t\treturn $.Deferred().rejectWith( this ).promise();\n\t\t}\n\n\t\t// Overload the `read` request so Attachment.fetch() functions correctly.\n\t\tif ( 'read' === method ) {\n\t\t\toptions = options || {};\n\t\t\toptions.context = this;\n\t\t\toptions.data = _.extend( options.data || {}, {\n\t\t\t\taction: 'get-attachment',\n\t\t\t\tid: this.id\n\t\t\t});\n\t\t\treturn wp.media.ajax( options );\n\n\t\t// Overload the `update` request so properties can be saved.\n\t\t} else if ( 'update' === method ) {\n\t\t\t// If we do not have the necessary nonce, fail immeditately.\n\t\t\tif ( ! this.get('nonces') || ! this.get('nonces').update ) {\n\t\t\t\treturn $.Deferred().rejectWith( this ).promise();\n\t\t\t}\n\n\t\t\toptions = options || {};\n\t\t\toptions.context = this;\n\n\t\t\t// Set the action and ID.\n\t\t\toptions.data = _.extend( options.data || {}, {\n\t\t\t\taction: 'save-attachment',\n\t\t\t\tid: this.id,\n\t\t\t\tnonce: this.get('nonces').update,\n\t\t\t\tpost_id: wp.media.model.settings.post.id\n\t\t\t});\n\n\t\t\t// Record the values of the changed attributes.\n\t\t\tif ( model.hasChanged() ) {\n\t\t\t\toptions.data.changes = {};\n\n\t\t\t\t_.each( model.changed, function( value, key ) {\n\t\t\t\t\toptions.data.changes[ key ] = this.get( key );\n\t\t\t\t}, this );\n\t\t\t}\n\n\t\t\treturn wp.media.ajax( options );\n\n\t\t// Overload the `delete` request so attachments can be removed.\n\t\t// This will permanently delete an attachment.\n\t\t} else if ( 'delete' === method ) {\n\t\t\toptions = options || {};\n\n\t\t\tif ( ! options.wait ) {\n\t\t\t\tthis.destroyed = true;\n\t\t\t}\n\n\t\t\toptions.context = this;\n\t\t\toptions.data = _.extend( options.data || {}, {\n\t\t\t\taction: 'delete-post',\n\t\t\t\tid: this.id,\n\t\t\t\t_wpnonce: this.get('nonces')['delete']\n\t\t\t});\n\n\t\t\treturn wp.media.ajax( options ).done( function() {\n\t\t\t\tthis.destroyed = true;\n\t\t\t}).fail( function() {\n\t\t\t\tthis.destroyed = false;\n\t\t\t});\n\n\t\t// Otherwise, fall back to `Backbone.sync()`.\n\t\t} else {\n\t\t\t/**\n\t\t\t * Call `sync` directly on Backbone.Model\n\t\t\t */\n\t\t\treturn Backbone.Model.prototype.sync.apply( this, arguments );\n\t\t}\n\t},\n\t/**\n\t * Convert date strings into Date objects.\n\t *\n\t * @param {Object} resp The raw response object, typically returned by fetch()\n\t * @returns {Object} The modified response object, which is the attributes hash\n\t * to be set on the model.\n\t */\n\tparse: function( resp ) {\n\t\tif ( ! resp ) {\n\t\t\treturn resp;\n\t\t}\n\n\t\tresp.date = new Date( resp.date );\n\t\tresp.modified = new Date( resp.modified );\n\t\treturn resp;\n\t},\n\t/**\n\t * @param {Object} data The properties to be saved.\n\t * @param {Object} options Sync options. e.g. patch, wait, success, error.\n\t *\n\t * @this Backbone.Model\n\t *\n\t * @returns {Promise}\n\t */\n\tsaveCompat: function( data, options ) {\n\t\tvar model = this;\n\n\t\t// If we do not have the necessary nonce, fail immeditately.\n\t\tif ( ! this.get('nonces') || ! this.get('nonces').update ) {\n\t\t\treturn $.Deferred().rejectWith( this ).promise();\n\t\t}\n\n\t\treturn wp.media.post( 'save-attachment-compat', _.defaults({\n\t\t\tid: this.id,\n\t\t\tnonce: this.get('nonces').update,\n\t\t\tpost_id: wp.media.model.settings.post.id\n\t\t}, data ) ).done( function( resp, status, xhr ) {\n\t\t\tmodel.set( model.parse( resp, xhr ), options );\n\t\t});\n\t}\n},/** @lends wp.media.model.Attachment */{\n\t/**\n\t * Create a new model on the static 'all' attachments collection and return it.\n\t *\n\t * @static\n\t *\n\t * @param {Object} attrs\n\t * @returns {wp.media.model.Attachment}\n\t */\n\tcreate: function( attrs ) {\n\t\tvar Attachments = wp.media.model.Attachments;\n\t\treturn Attachments.all.push( attrs );\n\t},\n\t/**\n\t * Create a new model on the static 'all' attachments collection and return it.\n\t *\n\t * If this function has already been called for the id,\n\t * it returns the specified attachment.\n\t *\n\t * @static\n\t * @param {string} id A string used to identify a model.\n\t * @param {Backbone.Model|undefined} attachment\n\t * @returns {wp.media.model.Attachment}\n\t */\n\tget: _.memoize( function( id, attachment ) {\n\t\tvar Attachments = wp.media.model.Attachments;\n\t\treturn Attachments.all.push( attachment || { id: id } );\n\t})\n});\n\nmodule.exports = Attachment;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/attachment.js?");
-/**
- * wp.media.model.Attachment
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments Backbone.Model
- */
-Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototype */{
- /**
- * Triggered when attachment details change
- * Overrides Backbone.Model.sync
- *
- * @param {string} method
- * @param {wp.media.model.Attachment} model
- * @param {Object} [options={}]
- *
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- // If the attachment does not yet have an `id`, return an instantly
- // rejected promise. Otherwise, all of our requests will fail.
- if ( _.isUndefined( this.id ) ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- // Overload the `read` request so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'get-attachment',
- id: this.id
- });
- return wp.media.ajax( options );
-
- // Overload the `update` request so properties can be saved.
- } else if ( 'update' === method ) {
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- options = options || {};
- options.context = this;
-
- // Set the action and ID.
- options.data = _.extend( options.data || {}, {
- action: 'save-attachment',
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- });
-
- // Record the values of the changed attributes.
- if ( model.hasChanged() ) {
- options.data.changes = {};
-
- _.each( model.changed, function( value, key ) {
- options.data.changes[ key ] = this.get( key );
- }, this );
- }
-
- return wp.media.ajax( options );
-
- // Overload the `delete` request so attachments can be removed.
- // This will permanently delete an attachment.
- } else if ( 'delete' === method ) {
- options = options || {};
-
- if ( ! options.wait ) {
- this.destroyed = true;
- }
-
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'delete-post',
- id: this.id,
- _wpnonce: this.get('nonces')['delete']
- });
-
- return wp.media.ajax( options ).done( function() {
- this.destroyed = true;
- }).fail( function() {
- this.destroyed = false;
- });
-
- // Otherwise, fall back to `Backbone.sync()`.
- } else {
- /**
- * Call `sync` directly on Backbone.Model
- */
- return Backbone.Model.prototype.sync.apply( this, arguments );
- }
- },
- /**
- * Convert date strings into Date objects.
- *
- * @param {Object} resp The raw response object, typically returned by fetch()
- * @returns {Object} The modified response object, which is the attributes hash
- * to be set on the model.
- */
- parse: function( resp ) {
- if ( ! resp ) {
- return resp;
- }
-
- resp.date = new Date( resp.date );
- resp.modified = new Date( resp.modified );
- return resp;
- },
- /**
- * @param {Object} data The properties to be saved.
- * @param {Object} options Sync options. e.g. patch, wait, success, error.
- *
- * @this Backbone.Model
- *
- * @returns {Promise}
- */
- saveCompat: function( data, options ) {
- var model = this;
-
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- return wp.media.post( 'save-attachment-compat', _.defaults({
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- }, data ) ).done( function( resp, status, xhr ) {
- model.set( model.parse( resp, xhr ), options );
- });
- }
-},/** @lends wp.media.model.Attachment */{
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * @static
- *
- * @param {Object} attrs
- * @returns {wp.media.model.Attachment}
- */
- create: function( attrs ) {
- var Attachments = wp.media.model.Attachments;
- return Attachments.all.push( attrs );
- },
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * If this function has already been called for the id,
- * it returns the specified attachment.
- *
- * @static
- * @param {string} id A string used to identify a model.
- * @param {Backbone.Model|undefined} attachment
- * @returns {wp.media.model.Attachment}
- */
- get: _.memoize( function( id, attachment ) {
- var Attachments = wp.media.model.Attachments;
- return Attachments.all.push( attachment || { id: id } );
- })
-});
-
-module.exports = Attachment;
-
-
/***/ }),
-/***/ 22:
+/***/ "./src/wp-includes/js/media/models/attachments.js":
+/*!********************************************************!*\
+ !*** ./src/wp-includes/js/media/models/attachments.js ***!
+ \********************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.model.Attachments
- *
- * A collection of attachments.
- *
- * This collection has no persistence with the server without supplying
- * 'options.props.query = true', which will mirror the collection
- * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash for the collection.
- * @param {string} [options.props] Options hash for the initial query properties.
- * @param {string} [options.props.order] Initial order (ASC or DESC) for the collection.
- * @param {string} [options.props.orderby] Initial attribute key to order the collection by.
- * @param {string} [options.props.query] Whether the collection is linked to an attachments query.
- * @param {string} [options.observe]
- * @param {string} [options.filters]
- *
- */
-var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachments.prototype */{
- /**
- * @type {wp.media.model.Attachment}
- */
- model: wp.media.model.Attachment,
- /**
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- options = options || {};
+eval("/**\n * wp.media.model.Attachments\n *\n * A collection of attachments.\n *\n * This collection has no persistence with the server without supplying\n * 'options.props.query = true', which will mirror the collection\n * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments Backbone.Collection\n *\n * @param {array} [models] Models to initialize with the collection.\n * @param {object} [options] Options hash for the collection.\n * @param {string} [options.props] Options hash for the initial query properties.\n * @param {string} [options.props.order] Initial order (ASC or DESC) for the collection.\n * @param {string} [options.props.orderby] Initial attribute key to order the collection by.\n * @param {string} [options.props.query] Whether the collection is linked to an attachments query.\n * @param {string} [options.observe]\n * @param {string} [options.filters]\n *\n */\nvar Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachments.prototype */{\n\t/**\n\t * @type {wp.media.model.Attachment}\n\t */\n\tmodel: wp.media.model.Attachment,\n\t/**\n\t * @param {Array} [models=[]] Array of models used to populate the collection.\n\t * @param {Object} [options={}]\n\t */\n\tinitialize: function( models, options ) {\n\t\toptions = options || {};\n\n\t\tthis.props = new Backbone.Model();\n\t\tthis.filters = options.filters || {};\n\n\t\t// Bind default `change` events to the `props` model.\n\t\tthis.props.on( 'change', this._changeFilteredProps, this );\n\n\t\tthis.props.on( 'change:order', this._changeOrder, this );\n\t\tthis.props.on( 'change:orderby', this._changeOrderby, this );\n\t\tthis.props.on( 'change:query', this._changeQuery, this );\n\n\t\tthis.props.set( _.defaults( options.props || {} ) );\n\n\t\tif ( options.observe ) {\n\t\t\tthis.observe( options.observe );\n\t\t}\n\t},\n\t/**\n\t * Sort the collection when the order attribute changes.\n\t *\n\t * @access private\n\t */\n\t_changeOrder: function() {\n\t\tif ( this.comparator ) {\n\t\t\tthis.sort();\n\t\t}\n\t},\n\t/**\n\t * Set the default comparator only when the `orderby` property is set.\n\t *\n\t * @access private\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {string} orderby\n\t */\n\t_changeOrderby: function( model, orderby ) {\n\t\t// If a different comparator is defined, bail.\n\t\tif ( this.comparator && this.comparator !== Attachments.comparator ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( orderby && 'post__in' !== orderby ) {\n\t\t\tthis.comparator = Attachments.comparator;\n\t\t} else {\n\t\t\tdelete this.comparator;\n\t\t}\n\t},\n\t/**\n\t * If the `query` property is set to true, query the server using\n\t * the `props` values, and sync the results to this collection.\n\t *\n\t * @access private\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {Boolean} query\n\t */\n\t_changeQuery: function( model, query ) {\n\t\tif ( query ) {\n\t\t\tthis.props.on( 'change', this._requery, this );\n\t\t\tthis._requery();\n\t\t} else {\n\t\t\tthis.props.off( 'change', this._requery, this );\n\t\t}\n\t},\n\t/**\n\t * @access private\n\t *\n\t * @param {Backbone.Model} model\n\t */\n\t_changeFilteredProps: function( model ) {\n\t\t// If this is a query, updating the collection will be handled by\n\t\t// `this._requery()`.\n\t\tif ( this.props.get('query') ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar changed = _.chain( model.changed ).map( function( t, prop ) {\n\t\t\tvar filter = Attachments.filters[ prop ],\n\t\t\t\tterm = model.get( prop );\n\n\t\t\tif ( ! filter ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( term && ! this.filters[ prop ] ) {\n\t\t\t\tthis.filters[ prop ] = filter;\n\t\t\t} else if ( ! term && this.filters[ prop ] === filter ) {\n\t\t\t\tdelete this.filters[ prop ];\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Record the change.\n\t\t\treturn true;\n\t\t}, this ).any().value();\n\n\t\tif ( ! changed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If no `Attachments` model is provided to source the searches\n\t\t// from, then automatically generate a source from the existing\n\t\t// models.\n\t\tif ( ! this._source ) {\n\t\t\tthis._source = new Attachments( this.models );\n\t\t}\n\n\t\tthis.reset( this._source.filter( this.validator, this ) );\n\t},\n\n\tvalidateDestroyed: false,\n\t/**\n\t * Checks whether an attachment is valid.\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {Boolean}\n\t */\n\tvalidator: function( attachment ) {\n\n\t\t// Filter out contextually created attachments (e.g. headers, logos, etc.).\n\t\tif (\n\t\t\t! _.isUndefined( attachment.attributes.context ) &&\n\t\t\t'' !== attachment.attributes.context\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! this.validateDestroyed && attachment.destroyed ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn _.all( this.filters, function( filter ) {\n\t\t\treturn !! filter.call( this, attachment );\n\t\t}, this );\n\t},\n\t/**\n\t * Add or remove an attachment to the collection depending on its validity.\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @param {Object} options\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\tvalidate: function( attachment, options ) {\n\t\tvar valid = this.validator( attachment ),\n\t\t\thasAttachment = !! this.get( attachment.cid );\n\n\t\tif ( ! valid && hasAttachment ) {\n\t\t\tthis.remove( attachment, options );\n\t\t} else if ( valid && ! hasAttachment ) {\n\t\t\tthis.add( attachment, options );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t/**\n\t * Add or remove all attachments from another collection depending on each one's validity.\n\t *\n\t * @param {wp.media.model.Attachments} attachments\n\t * @param {object} [options={}]\n\t *\n\t * @fires wp.media.model.Attachments#reset\n\t *\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\tvalidateAll: function( attachments, options ) {\n\t\toptions = options || {};\n\n\t\t_.each( attachments.models, function( attachment ) {\n\t\t\tthis.validate( attachment, { silent: true });\n\t\t}, this );\n\n\t\tif ( ! options.silent ) {\n\t\t\tthis.trigger( 'reset', this, options );\n\t\t}\n\t\treturn this;\n\t},\n\t/**\n\t * Start observing another attachments collection change events\n\t * and replicate them on this collection.\n\t *\n\t * @param {wp.media.model.Attachments} The attachments collection to observe.\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining.\n\t */\n\tobserve: function( attachments ) {\n\t\tthis.observers = this.observers || [];\n\t\tthis.observers.push( attachments );\n\n\t\tattachments.on( 'add change remove', this._validateHandler, this );\n\t\tattachments.on( 'reset', this._validateAllHandler, this );\n\t\tthis.validateAll( attachments );\n\t\treturn this;\n\t},\n\t/**\n\t * Stop replicating collection change events from another attachments collection.\n\t *\n\t * @param {wp.media.model.Attachments} The attachments collection to stop observing.\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\tunobserve: function( attachments ) {\n\t\tif ( attachments ) {\n\t\t\tattachments.off( null, null, this );\n\t\t\tthis.observers = _.without( this.observers, attachments );\n\n\t\t} else {\n\t\t\t_.each( this.observers, function( attachments ) {\n\t\t\t\tattachments.off( null, null, this );\n\t\t\t}, this );\n\t\t\tdelete this.observers;\n\t\t}\n\n\t\treturn this;\n\t},\n\t/**\n\t * @access private\n\t *\n\t * @param {wp.media.model.Attachments} attachment\n\t * @param {wp.media.model.Attachments} attachments\n\t * @param {Object} options\n\t *\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\t_validateHandler: function( attachment, attachments, options ) {\n\t\t// If we're not mirroring this `attachments` collection,\n\t\t// only retain the `silent` option.\n\t\toptions = attachments === this.mirroring ? options : {\n\t\t\tsilent: options && options.silent\n\t\t};\n\n\t\treturn this.validate( attachment, options );\n\t},\n\t/**\n\t * @access private\n\t *\n\t * @param {wp.media.model.Attachments} attachments\n\t * @param {Object} options\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\t_validateAllHandler: function( attachments, options ) {\n\t\treturn this.validateAll( attachments, options );\n\t},\n\t/**\n\t * Start mirroring another attachments collection, clearing out any models already\n\t * in the collection.\n\t *\n\t * @param {wp.media.model.Attachments} The attachments collection to mirror.\n\t * @returns {wp.media.model.Attachments} Returns itself to allow chaining\n\t */\n\tmirror: function( attachments ) {\n\t\tif ( this.mirroring && this.mirroring === attachments ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.unmirror();\n\t\tthis.mirroring = attachments;\n\n\t\t// Clear the collection silently. A `reset` event will be fired\n\t\t// when `observe()` calls `validateAll()`.\n\t\tthis.reset( [], { silent: true } );\n\t\tthis.observe( attachments );\n\n\t\treturn this;\n\t},\n\t/**\n\t * Stop mirroring another attachments collection.\n\t */\n\tunmirror: function() {\n\t\tif ( ! this.mirroring ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.unobserve( this.mirroring );\n\t\tdelete this.mirroring;\n\t},\n\t/**\n\t * Retrieve more attachments from the server for the collection.\n\t *\n\t * Only works if the collection is mirroring a Query Attachments collection,\n\t * and forwards to its `more` method. This collection class doesn't have\n\t * server persistence by itself.\n\t *\n\t * @param {object} options\n\t * @returns {Promise}\n\t */\n\tmore: function( options ) {\n\t\tvar deferred = jQuery.Deferred(),\n\t\t\tmirroring = this.mirroring,\n\t\t\tattachments = this;\n\n\t\tif ( ! mirroring || ! mirroring.more ) {\n\t\t\treturn deferred.resolveWith( this ).promise();\n\t\t}\n\t\t// If we're mirroring another collection, forward `more` to\n\t\t// the mirrored collection. Account for a race condition by\n\t\t// checking if we're still mirroring that collection when\n\t\t// the request resolves.\n\t\tmirroring.more( options ).done( function() {\n\t\t\tif ( this === attachments.mirroring ) {\n\t\t\t\tdeferred.resolveWith( this );\n\t\t\t}\n\t\t});\n\n\t\treturn deferred.promise();\n\t},\n\t/**\n\t * Whether there are more attachments that haven't been sync'd from the server\n\t * that match the collection's query.\n\t *\n\t * Only works if the collection is mirroring a Query Attachments collection,\n\t * and forwards to its `hasMore` method. This collection class doesn't have\n\t * server persistence by itself.\n\t *\n\t * @returns {boolean}\n\t */\n\thasMore: function() {\n\t\treturn this.mirroring ? this.mirroring.hasMore() : false;\n\t},\n\t/**\n\t * A custom AJAX-response parser.\n\t *\n\t * See trac ticket #24753\n\t *\n\t * @param {Object|Array} resp The raw response Object/Array.\n\t * @param {Object} xhr\n\t * @returns {Array} The array of model attributes to be added to the collection\n\t */\n\tparse: function( resp, xhr ) {\n\t\tif ( ! _.isArray( resp ) ) {\n\t\t\tresp = [resp];\n\t\t}\n\n\t\treturn _.map( resp, function( attrs ) {\n\t\t\tvar id, attachment, newAttributes;\n\n\t\t\tif ( attrs instanceof Backbone.Model ) {\n\t\t\t\tid = attrs.get( 'id' );\n\t\t\t\tattrs = attrs.attributes;\n\t\t\t} else {\n\t\t\t\tid = attrs.id;\n\t\t\t}\n\n\t\t\tattachment = wp.media.model.Attachment.get( id );\n\t\t\tnewAttributes = attachment.parse( attrs, xhr );\n\n\t\t\tif ( ! _.isEqual( attachment.attributes, newAttributes ) ) {\n\t\t\t\tattachment.set( newAttributes );\n\t\t\t}\n\n\t\t\treturn attachment;\n\t\t});\n\t},\n\t/**\n\t * If the collection is a query, create and mirror an Attachments Query collection.\n\t *\n\t * @access private\n\t */\n\t_requery: function( refresh ) {\n\t\tvar props;\n\t\tif ( this.props.get('query') ) {\n\t\t\tprops = this.props.toJSON();\n\t\t\tprops.cache = ( true !== refresh );\n\t\t\tthis.mirror( wp.media.model.Query.get( props ) );\n\t\t}\n\t},\n\t/**\n\t * If this collection is sorted by `menuOrder`, recalculates and saves\n\t * the menu order to the database.\n\t *\n\t * @returns {undefined|Promise}\n\t */\n\tsaveMenuOrder: function() {\n\t\tif ( 'menuOrder' !== this.props.get('orderby') ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Removes any uploading attachments, updates each attachment's\n\t\t// menu order, and returns an object with an { id: menuOrder }\n\t\t// mapping to pass to the request.\n\t\tvar attachments = this.chain().filter( function( attachment ) {\n\t\t\treturn ! _.isUndefined( attachment.id );\n\t\t}).map( function( attachment, index ) {\n\t\t\t// Indices start at 1.\n\t\t\tindex = index + 1;\n\t\t\tattachment.set( 'menuOrder', index );\n\t\t\treturn [ attachment.id, index ];\n\t\t}).object().value();\n\n\t\tif ( _.isEmpty( attachments ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn wp.media.post( 'save-attachment-order', {\n\t\t\tnonce: wp.media.model.settings.post.nonce,\n\t\t\tpost_id: wp.media.model.settings.post.id,\n\t\t\tattachments: attachments\n\t\t});\n\t}\n},/** @lends wp.media.model.Attachments */{\n\t/**\n\t * A function to compare two attachment models in an attachments collection.\n\t *\n\t * Used as the default comparator for instances of wp.media.model.Attachments\n\t * and its subclasses. @see wp.media.model.Attachments._changeOrderby().\n\t *\n\t * @param {Backbone.Model} a\n\t * @param {Backbone.Model} b\n\t * @param {Object} options\n\t * @returns {Number} -1 if the first model should come before the second,\n\t * 0 if they are of the same rank and\n\t * 1 if the first model should come after.\n\t */\n\tcomparator: function( a, b, options ) {\n\t\tvar key = this.props.get('orderby'),\n\t\t\torder = this.props.get('order') || 'DESC',\n\t\t\tac = a.cid,\n\t\t\tbc = b.cid;\n\n\t\ta = a.get( key );\n\t\tb = b.get( key );\n\n\t\tif ( 'date' === key || 'modified' === key ) {\n\t\t\ta = a || new Date();\n\t\t\tb = b || new Date();\n\t\t}\n\n\t\t// If `options.ties` is set, don't enforce the `cid` tiebreaker.\n\t\tif ( options && options.ties ) {\n\t\t\tac = bc = null;\n\t\t}\n\n\t\treturn ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );\n\t},\n\t/** @namespace wp.media.model.Attachments.filters */\n\tfilters: {\n\t\t/**\n\t\t * @static\n\t\t * Note that this client-side searching is *not* equivalent\n\t\t * to our server-side searching.\n\t\t *\n\t\t * @param {wp.media.model.Attachment} attachment\n\t\t *\n\t\t * @this wp.media.model.Attachments\n\t\t *\n\t\t * @returns {Boolean}\n\t\t */\n\t\tsearch: function( attachment ) {\n\t\t\tif ( ! this.props.get('search') ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn _.any(['title','filename','description','caption','name'], function( key ) {\n\t\t\t\tvar value = attachment.get( key );\n\t\t\t\treturn value && -1 !== value.search( this.props.get('search') );\n\t\t\t}, this );\n\t\t},\n\t\t/**\n\t\t * @static\n\t\t * @param {wp.media.model.Attachment} attachment\n\t\t *\n\t\t * @this wp.media.model.Attachments\n\t\t *\n\t\t * @returns {Boolean}\n\t\t */\n\t\ttype: function( attachment ) {\n\t\t\tvar type = this.props.get('type'), atts = attachment.toJSON(), mime, found;\n\n\t\t\tif ( ! type || ( _.isArray( type ) && ! type.length ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tmime = atts.mime || ( atts.file && atts.file.type ) || '';\n\n\t\t\tif ( _.isArray( type ) ) {\n\t\t\t\tfound = _.find( type, function (t) {\n\t\t\t\t\treturn -1 !== mime.indexOf( t );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tfound = -1 !== mime.indexOf( type );\n\t\t\t}\n\n\t\t\treturn found;\n\t\t},\n\t\t/**\n\t\t * @static\n\t\t * @param {wp.media.model.Attachment} attachment\n\t\t *\n\t\t * @this wp.media.model.Attachments\n\t\t *\n\t\t * @returns {Boolean}\n\t\t */\n\t\tuploadedTo: function( attachment ) {\n\t\t\tvar uploadedTo = this.props.get('uploadedTo');\n\t\t\tif ( _.isUndefined( uploadedTo ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn uploadedTo === attachment.get('uploadedTo');\n\t\t},\n\t\t/**\n\t\t * @static\n\t\t * @param {wp.media.model.Attachment} attachment\n\t\t *\n\t\t * @this wp.media.model.Attachments\n\t\t *\n\t\t * @returns {Boolean}\n\t\t */\n\t\tstatus: function( attachment ) {\n\t\t\tvar status = this.props.get('status');\n\t\t\tif ( _.isUndefined( status ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn status === attachment.get('status');\n\t\t}\n\t}\n});\n\nmodule.exports = Attachments;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/attachments.js?");
- this.props = new Backbone.Model();
- this.filters = options.filters || {};
-
- // Bind default `change` events to the `props` model.
- this.props.on( 'change', this._changeFilteredProps, this );
-
- this.props.on( 'change:order', this._changeOrder, this );
- this.props.on( 'change:orderby', this._changeOrderby, this );
- this.props.on( 'change:query', this._changeQuery, this );
-
- this.props.set( _.defaults( options.props || {} ) );
-
- if ( options.observe ) {
- this.observe( options.observe );
- }
- },
- /**
- * Sort the collection when the order attribute changes.
- *
- * @access private
- */
- _changeOrder: function() {
- if ( this.comparator ) {
- this.sort();
- }
- },
- /**
- * Set the default comparator only when the `orderby` property is set.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {string} orderby
- */
- _changeOrderby: function( model, orderby ) {
- // If a different comparator is defined, bail.
- if ( this.comparator && this.comparator !== Attachments.comparator ) {
- return;
- }
-
- if ( orderby && 'post__in' !== orderby ) {
- this.comparator = Attachments.comparator;
- } else {
- delete this.comparator;
- }
- },
- /**
- * If the `query` property is set to true, query the server using
- * the `props` values, and sync the results to this collection.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {Boolean} query
- */
- _changeQuery: function( model, query ) {
- if ( query ) {
- this.props.on( 'change', this._requery, this );
- this._requery();
- } else {
- this.props.off( 'change', this._requery, this );
- }
- },
- /**
- * @access private
- *
- * @param {Backbone.Model} model
- */
- _changeFilteredProps: function( model ) {
- // If this is a query, updating the collection will be handled by
- // `this._requery()`.
- if ( this.props.get('query') ) {
- return;
- }
-
- var changed = _.chain( model.changed ).map( function( t, prop ) {
- var filter = Attachments.filters[ prop ],
- term = model.get( prop );
-
- if ( ! filter ) {
- return;
- }
-
- if ( term && ! this.filters[ prop ] ) {
- this.filters[ prop ] = filter;
- } else if ( ! term && this.filters[ prop ] === filter ) {
- delete this.filters[ prop ];
- } else {
- return;
- }
-
- // Record the change.
- return true;
- }, this ).any().value();
-
- if ( ! changed ) {
- return;
- }
-
- // If no `Attachments` model is provided to source the searches
- // from, then automatically generate a source from the existing
- // models.
- if ( ! this._source ) {
- this._source = new Attachments( this.models );
- }
-
- this.reset( this._source.filter( this.validator, this ) );
- },
-
- validateDestroyed: false,
- /**
- * Checks whether an attachment is valid.
- *
- * @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
- */
- validator: function( attachment ) {
-
- // Filter out contextually created attachments (e.g. headers, logos, etc.).
- if (
- ! _.isUndefined( attachment.attributes.context ) &&
- '' !== attachment.attributes.context
- ) {
- return false;
- }
-
- if ( ! this.validateDestroyed && attachment.destroyed ) {
- return false;
- }
- return _.all( this.filters, function( filter ) {
- return !! filter.call( this, attachment );
- }, this );
- },
- /**
- * Add or remove an attachment to the collection depending on its validity.
- *
- * @param {wp.media.model.Attachment} attachment
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validate: function( attachment, options ) {
- var valid = this.validator( attachment ),
- hasAttachment = !! this.get( attachment.cid );
-
- if ( ! valid && hasAttachment ) {
- this.remove( attachment, options );
- } else if ( valid && ! hasAttachment ) {
- this.add( attachment, options );
- }
-
- return this;
- },
-
- /**
- * Add or remove all attachments from another collection depending on each one's validity.
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {object} [options={}]
- *
- * @fires wp.media.model.Attachments#reset
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validateAll: function( attachments, options ) {
- options = options || {};
-
- _.each( attachments.models, function( attachment ) {
- this.validate( attachment, { silent: true });
- }, this );
-
- if ( ! options.silent ) {
- this.trigger( 'reset', this, options );
- }
- return this;
- },
- /**
- * Start observing another attachments collection change events
- * and replicate them on this collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to observe.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
- */
- observe: function( attachments ) {
- this.observers = this.observers || [];
- this.observers.push( attachments );
-
- attachments.on( 'add change remove', this._validateHandler, this );
- attachments.on( 'reset', this._validateAllHandler, this );
- this.validateAll( attachments );
- return this;
- },
- /**
- * Stop replicating collection change events from another attachments collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to stop observing.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- unobserve: function( attachments ) {
- if ( attachments ) {
- attachments.off( null, null, this );
- this.observers = _.without( this.observers, attachments );
-
- } else {
- _.each( this.observers, function( attachments ) {
- attachments.off( null, null, this );
- }, this );
- delete this.observers;
- }
-
- return this;
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachment
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateHandler: function( attachment, attachments, options ) {
- // If we're not mirroring this `attachments` collection,
- // only retain the `silent` option.
- options = attachments === this.mirroring ? options : {
- silent: options && options.silent
- };
-
- return this.validate( attachment, options );
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateAllHandler: function( attachments, options ) {
- return this.validateAll( attachments, options );
- },
- /**
- * Start mirroring another attachments collection, clearing out any models already
- * in the collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to mirror.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- mirror: function( attachments ) {
- if ( this.mirroring && this.mirroring === attachments ) {
- return this;
- }
-
- this.unmirror();
- this.mirroring = attachments;
-
- // Clear the collection silently. A `reset` event will be fired
- // when `observe()` calls `validateAll()`.
- this.reset( [], { silent: true } );
- this.observe( attachments );
-
- return this;
- },
- /**
- * Stop mirroring another attachments collection.
- */
- unmirror: function() {
- if ( ! this.mirroring ) {
- return;
- }
-
- this.unobserve( this.mirroring );
- delete this.mirroring;
- },
- /**
- * Retrieve more attachments from the server for the collection.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `more` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @param {object} options
- * @returns {Promise}
- */
- more: function( options ) {
- var deferred = jQuery.Deferred(),
- mirroring = this.mirroring,
- attachments = this;
-
- if ( ! mirroring || ! mirroring.more ) {
- return deferred.resolveWith( this ).promise();
- }
- // If we're mirroring another collection, forward `more` to
- // the mirrored collection. Account for a race condition by
- // checking if we're still mirroring that collection when
- // the request resolves.
- mirroring.more( options ).done( function() {
- if ( this === attachments.mirroring ) {
- deferred.resolveWith( this );
- }
- });
-
- return deferred.promise();
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `hasMore` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this.mirroring ? this.mirroring.hasMore() : false;
- },
- /**
- * A custom AJAX-response parser.
- *
- * See trac ticket #24753
- *
- * @param {Object|Array} resp The raw response Object/Array.
- * @param {Object} xhr
- * @returns {Array} The array of model attributes to be added to the collection
- */
- parse: function( resp, xhr ) {
- if ( ! _.isArray( resp ) ) {
- resp = [resp];
- }
-
- return _.map( resp, function( attrs ) {
- var id, attachment, newAttributes;
-
- if ( attrs instanceof Backbone.Model ) {
- id = attrs.get( 'id' );
- attrs = attrs.attributes;
- } else {
- id = attrs.id;
- }
-
- attachment = wp.media.model.Attachment.get( id );
- newAttributes = attachment.parse( attrs, xhr );
-
- if ( ! _.isEqual( attachment.attributes, newAttributes ) ) {
- attachment.set( newAttributes );
- }
-
- return attachment;
- });
- },
- /**
- * If the collection is a query, create and mirror an Attachments Query collection.
- *
- * @access private
- */
- _requery: function( refresh ) {
- var props;
- if ( this.props.get('query') ) {
- props = this.props.toJSON();
- props.cache = ( true !== refresh );
- this.mirror( wp.media.model.Query.get( props ) );
- }
- },
- /**
- * If this collection is sorted by `menuOrder`, recalculates and saves
- * the menu order to the database.
- *
- * @returns {undefined|Promise}
- */
- saveMenuOrder: function() {
- if ( 'menuOrder' !== this.props.get('orderby') ) {
- return;
- }
-
- // Removes any uploading attachments, updates each attachment's
- // menu order, and returns an object with an { id: menuOrder }
- // mapping to pass to the request.
- var attachments = this.chain().filter( function( attachment ) {
- return ! _.isUndefined( attachment.id );
- }).map( function( attachment, index ) {
- // Indices start at 1.
- index = index + 1;
- attachment.set( 'menuOrder', index );
- return [ attachment.id, index ];
- }).object().value();
-
- if ( _.isEmpty( attachments ) ) {
- return;
- }
-
- return wp.media.post( 'save-attachment-order', {
- nonce: wp.media.model.settings.post.nonce,
- post_id: wp.media.model.settings.post.id,
- attachments: attachments
- });
- }
-},/** @lends wp.media.model.Attachments */{
- /**
- * A function to compare two attachment models in an attachments collection.
- *
- * Used as the default comparator for instances of wp.media.model.Attachments
- * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
- *
- * @param {Backbone.Model} a
- * @param {Backbone.Model} b
- * @param {Object} options
- * @returns {Number} -1 if the first model should come before the second,
- * 0 if they are of the same rank and
- * 1 if the first model should come after.
- */
- comparator: function( a, b, options ) {
- var key = this.props.get('orderby'),
- order = this.props.get('order') || 'DESC',
- ac = a.cid,
- bc = b.cid;
-
- a = a.get( key );
- b = b.get( key );
-
- if ( 'date' === key || 'modified' === key ) {
- a = a || new Date();
- b = b || new Date();
- }
-
- // If `options.ties` is set, don't enforce the `cid` tiebreaker.
- if ( options && options.ties ) {
- ac = bc = null;
- }
-
- return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );
- },
- /** @namespace wp.media.model.Attachments.filters */
- filters: {
- /**
- * @static
- * Note that this client-side searching is *not* equivalent
- * to our server-side searching.
- *
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- search: function( attachment ) {
- if ( ! this.props.get('search') ) {
- return true;
- }
-
- return _.any(['title','filename','description','caption','name'], function( key ) {
- var value = attachment.get( key );
- return value && -1 !== value.search( this.props.get('search') );
- }, this );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- type: function( attachment ) {
- var type = this.props.get('type'), atts = attachment.toJSON(), mime, found;
-
- if ( ! type || ( _.isArray( type ) && ! type.length ) ) {
- return true;
- }
-
- mime = atts.mime || ( atts.file && atts.file.type ) || '';
-
- if ( _.isArray( type ) ) {
- found = _.find( type, function (t) {
- return -1 !== mime.indexOf( t );
- } );
- } else {
- found = -1 !== mime.indexOf( type );
- }
-
- return found;
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- uploadedTo: function( attachment ) {
- var uploadedTo = this.props.get('uploadedTo');
- if ( _.isUndefined( uploadedTo ) ) {
- return true;
- }
-
- return uploadedTo === attachment.get('uploadedTo');
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- status: function( attachment ) {
- var status = this.props.get('status');
- if ( _.isUndefined( status ) ) {
- return true;
- }
-
- return status === attachment.get('status');
- }
- }
-});
-
-module.exports = Attachments;
-
-
/***/ }),
-/***/ 23:
+/***/ "./src/wp-includes/js/media/models/post-image.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/models/post-image.js ***!
+ \*******************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var Attachments = wp.media.model.Attachments,
- Query;
+eval("/**\n * wp.media.model.PostImage\n *\n * An instance of an image that's been embedded into a post.\n *\n * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails.\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments Backbone.Model\n *\n * @param {int} [attributes] Initial model attributes.\n * @param {int} [attributes.attachment_id] ID of the attachment.\n **/\nvar PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.prototype */{\n\n\tinitialize: function( attributes ) {\n\t\tvar Attachment = wp.media.model.Attachment;\n\t\tthis.attachment = false;\n\n\t\tif ( attributes.attachment_id ) {\n\t\t\tthis.attachment = Attachment.get( attributes.attachment_id );\n\t\t\tif ( this.attachment.get( 'url' ) ) {\n\t\t\t\tthis.dfd = jQuery.Deferred();\n\t\t\t\tthis.dfd.resolve();\n\t\t\t} else {\n\t\t\t\tthis.dfd = this.attachment.fetch();\n\t\t\t}\n\t\t\tthis.bindAttachmentListeners();\n\t\t}\n\n\t\t// keep url in sync with changes to the type of link\n\t\tthis.on( 'change:link', this.updateLinkUrl, this );\n\t\tthis.on( 'change:size', this.updateSize, this );\n\n\t\tthis.setLinkTypeFromUrl();\n\t\tthis.setAspectRatio();\n\n\t\tthis.set( 'originalUrl', attributes.url );\n\t},\n\n\tbindAttachmentListeners: function() {\n\t\tthis.listenTo( this.attachment, 'sync', this.setLinkTypeFromUrl );\n\t\tthis.listenTo( this.attachment, 'sync', this.setAspectRatio );\n\t\tthis.listenTo( this.attachment, 'change', this.updateSize );\n\t},\n\n\tchangeAttachment: function( attachment, props ) {\n\t\tthis.stopListening( this.attachment );\n\t\tthis.attachment = attachment;\n\t\tthis.bindAttachmentListeners();\n\n\t\tthis.set( 'attachment_id', this.attachment.get( 'id' ) );\n\t\tthis.set( 'caption', this.attachment.get( 'caption' ) );\n\t\tthis.set( 'alt', this.attachment.get( 'alt' ) );\n\t\tthis.set( 'size', props.get( 'size' ) );\n\t\tthis.set( 'align', props.get( 'align' ) );\n\t\tthis.set( 'link', props.get( 'link' ) );\n\t\tthis.updateLinkUrl();\n\t\tthis.updateSize();\n\t},\n\n\tsetLinkTypeFromUrl: function() {\n\t\tvar linkUrl = this.get( 'linkUrl' ),\n\t\t\ttype;\n\n\t\tif ( ! linkUrl ) {\n\t\t\tthis.set( 'link', 'none' );\n\t\t\treturn;\n\t\t}\n\n\t\t// default to custom if there is a linkUrl\n\t\ttype = 'custom';\n\n\t\tif ( this.attachment ) {\n\t\t\tif ( this.attachment.get( 'url' ) === linkUrl ) {\n\t\t\t\ttype = 'file';\n\t\t\t} else if ( this.attachment.get( 'link' ) === linkUrl ) {\n\t\t\t\ttype = 'post';\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.get( 'url' ) === linkUrl ) {\n\t\t\t\ttype = 'file';\n\t\t\t}\n\t\t}\n\n\t\tthis.set( 'link', type );\n\t},\n\n\tupdateLinkUrl: function() {\n\t\tvar link = this.get( 'link' ),\n\t\t\turl;\n\n\t\tswitch( link ) {\n\t\t\tcase 'file':\n\t\t\t\tif ( this.attachment ) {\n\t\t\t\t\turl = this.attachment.get( 'url' );\n\t\t\t\t} else {\n\t\t\t\t\turl = this.get( 'url' );\n\t\t\t\t}\n\t\t\t\tthis.set( 'linkUrl', url );\n\t\t\t\tbreak;\n\t\t\tcase 'post':\n\t\t\t\tthis.set( 'linkUrl', this.attachment.get( 'link' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'none':\n\t\t\t\tthis.set( 'linkUrl', '' );\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\tupdateSize: function() {\n\t\tvar size;\n\n\t\tif ( ! this.attachment ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.get( 'size' ) === 'custom' ) {\n\t\t\tthis.set( 'width', this.get( 'customWidth' ) );\n\t\t\tthis.set( 'height', this.get( 'customHeight' ) );\n\t\t\tthis.set( 'url', this.get( 'originalUrl' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tsize = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];\n\n\t\tif ( ! size ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.set( 'url', size.url );\n\t\tthis.set( 'width', size.width );\n\t\tthis.set( 'height', size.height );\n\t},\n\n\tsetAspectRatio: function() {\n\t\tvar full;\n\n\t\tif ( this.attachment && this.attachment.get( 'sizes' ) ) {\n\t\t\tfull = this.attachment.get( 'sizes' ).full;\n\n\t\t\tif ( full ) {\n\t\t\t\tthis.set( 'aspectRatio', full.width / full.height );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.set( 'aspectRatio', this.get( 'customWidth' ) / this.get( 'customHeight' ) );\n\t}\n});\n\nmodule.exports = PostImage;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/post-image.js?");
-/**
- * wp.media.model.Query
- *
- * A collection of attachments that match the supplied query arguments.
- *
- * Note: Do NOT change this.args after the query has been initialized.
- * Things will break.
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash.
- * @param {object} [options.args] Attachments query arguments.
- * @param {object} [options.args.posts_per_page]
- */
-Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
- /**
- * @param {array} [models=[]] Array of initial models to populate the collection.
- * @param {object} [options={}]
- */
- initialize: function( models, options ) {
- var allowed;
-
- options = options || {};
- Attachments.prototype.initialize.apply( this, arguments );
-
- this.args = options.args;
- this._hasMore = true;
- this.created = new Date();
-
- this.filters.order = function( attachment ) {
- var orderby = this.props.get('orderby'),
- order = this.props.get('order');
-
- if ( ! this.comparator ) {
- return true;
- }
-
- // We want any items that can be placed before the last
- // item in the set. If we add any items after the last
- // item, then we can't guarantee the set is complete.
- if ( this.length ) {
- return 1 !== this.comparator( attachment, this.last(), { ties: true });
-
- // Handle the case where there are no items yet and
- // we're sorting for recent items. In that case, we want
- // changes that occurred after we created the query.
- } else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
- return attachment.get( orderby ) >= this.created;
-
- // If we're sorting by menu order and we have no items,
- // accept any items that have the default menu order (0).
- } else if ( 'ASC' === order && 'menuOrder' === orderby ) {
- return attachment.get( orderby ) === 0;
- }
-
- // Otherwise, we don't want any items yet.
- return false;
- };
-
- // Observe the central `wp.Uploader.queue` collection to watch for
- // new matches for the query.
- //
- // Only observe when a limited number of query args are set. There
- // are no filters for other properties, so observing will result in
- // false positives in those queries.
- allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'author' ];
- if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
- this.observe( wp.Uploader.queue );
- }
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this._hasMore;
- },
- /**
- * Fetch more attachments from the server for the collection.
- *
- * @param {object} [options={}]
- * @returns {Promise}
- */
- more: function( options ) {
- var query = this;
-
- // If there is already a request pending, return early with the Deferred object.
- if ( this._more && 'pending' === this._more.state() ) {
- return this._more;
- }
-
- if ( ! this.hasMore() ) {
- return jQuery.Deferred().resolveWith( this ).promise();
- }
-
- options = options || {};
- options.remove = false;
-
- return this._more = this.fetch( options ).done( function( resp ) {
- if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {
- query._hasMore = false;
- }
- });
- },
- /**
- * Overrides Backbone.Collection.sync
- * Overrides wp.media.model.Attachments.sync
- *
- * @param {String} method
- * @param {Backbone.Model} model
- * @param {Object} [options={}]
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- var args, fallback;
-
- // Overload the read method so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'query-attachments',
- post_id: wp.media.model.settings.post.id
- });
-
- // Clone the args so manipulation is non-destructive.
- args = _.clone( this.args );
-
- // Determine which page to query.
- if ( -1 !== args.posts_per_page ) {
- args.paged = Math.round( this.length / args.posts_per_page ) + 1;
- }
-
- options.data.query = args;
- return wp.media.ajax( options );
-
- // Otherwise, fall back to Backbone.sync()
- } else {
- /**
- * Call wp.media.model.Attachments.sync or Backbone.sync
- */
- fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
- return fallback.sync.apply( this, arguments );
- }
- }
-}, /** @lends wp.media.model.Query */{
- /**
- * @readonly
- */
- defaultProps: {
- orderby: 'date',
- order: 'DESC'
- },
- /**
- * @readonly
- */
- defaultArgs: {
- posts_per_page: 40
- },
- /**
- * @readonly
- */
- orderby: {
- allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
- /**
- * A map of JavaScript orderby values to their WP_Query equivalents.
- * @type {Object}
- */
- valuemap: {
- 'id': 'ID',
- 'uploadedTo': 'parent',
- 'menuOrder': 'menu_order ID'
- }
- },
- /**
- * A map of JavaScript query properties to their WP_Query equivalents.
- *
- * @readonly
- */
- propmap: {
- 'search': 's',
- 'type': 'post_mime_type',
- 'perPage': 'posts_per_page',
- 'menuOrder': 'menu_order',
- 'uploadedTo': 'post_parent',
- 'status': 'post_status',
- 'include': 'post__in',
- 'exclude': 'post__not_in',
- 'author': 'author'
- },
- /**
- * Creates and returns an Attachments Query collection given the properties.
- *
- * Caches query objects and reuses where possible.
- *
- * @static
- * @method
- *
- * @param {object} [props]
- * @param {Object} [props.cache=true] Whether to use the query cache or not.
- * @param {Object} [props.order]
- * @param {Object} [props.orderby]
- * @param {Object} [props.include]
- * @param {Object} [props.exclude]
- * @param {Object} [props.s]
- * @param {Object} [props.post_mime_type]
- * @param {Object} [props.posts_per_page]
- * @param {Object} [props.menu_order]
- * @param {Object} [props.post_parent]
- * @param {Object} [props.post_status]
- * @param {Object} [props.author]
- * @param {Object} [options]
- *
- * @returns {wp.media.model.Query} A new Attachments Query collection.
- */
- get: (function(){
- /**
- * @static
- * @type Array
- */
- var queries = [];
-
- /**
- * @returns {Query}
- */
- return function( props, options ) {
- var args = {},
- orderby = Query.orderby,
- defaults = Query.defaultProps,
- query,
- cache = !! props.cache || _.isUndefined( props.cache );
-
- // Remove the `query` property. This isn't linked to a query,
- // this *is* the query.
- delete props.query;
- delete props.cache;
-
- // Fill default args.
- _.defaults( props, defaults );
-
- // Normalize the order.
- props.order = props.order.toUpperCase();
- if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
- props.order = defaults.order.toUpperCase();
- }
-
- // Ensure we have a valid orderby value.
- if ( ! _.contains( orderby.allowed, props.orderby ) ) {
- props.orderby = defaults.orderby;
- }
-
- _.each( [ 'include', 'exclude' ], function( prop ) {
- if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
- props[ prop ] = [ props[ prop ] ];
- }
- } );
-
- // Generate the query `args` object.
- // Correct any differing property names.
- _.each( props, function( value, prop ) {
- if ( _.isNull( value ) ) {
- return;
- }
-
- args[ Query.propmap[ prop ] || prop ] = value;
- });
-
- // Fill any other default query args.
- _.defaults( args, Query.defaultArgs );
-
- // `props.orderby` does not always map directly to `args.orderby`.
- // Substitute exceptions specified in orderby.keymap.
- args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
-
- // Search the query cache for a matching query.
- if ( cache ) {
- query = _.find( queries, function( query ) {
- return _.isEqual( query.args, args );
- });
- } else {
- queries = [];
- }
-
- // Otherwise, create a new query and add it to the cache.
- if ( ! query ) {
- query = new Query( [], _.extend( options || {}, {
- props: props,
- args: args
- } ) );
- queries.push( query );
- }
-
- return query;
- };
- }())
-});
-
-module.exports = Query;
-
-
/***/ }),
-/***/ 24:
+/***/ "./src/wp-includes/js/media/models/query.js":
+/*!**************************************************!*\
+ !*** ./src/wp-includes/js/media/models/query.js ***!
+ \**************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.model.PostImage
- *
- * An instance of an image that's been embedded into a post.
- *
- * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails.
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments Backbone.Model
- *
- * @param {int} [attributes] Initial model attributes.
- * @param {int} [attributes.attachment_id] ID of the attachment.
- **/
-var PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.prototype */{
+eval("var Attachments = wp.media.model.Attachments,\n\tQuery;\n\n/**\n * wp.media.model.Query\n *\n * A collection of attachments that match the supplied query arguments.\n *\n * Note: Do NOT change this.args after the query has been initialized.\n * Things will break.\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments wp.media.model.Attachments\n * @augments Backbone.Collection\n *\n * @param {array} [models] Models to initialize with the collection.\n * @param {object} [options] Options hash.\n * @param {object} [options.args] Attachments query arguments.\n * @param {object} [options.args.posts_per_page]\n */\nQuery = Attachments.extend(/** @lends wp.media.model.Query.prototype */{\n\t/**\n\t * @param {array} [models=[]] Array of initial models to populate the collection.\n\t * @param {object} [options={}]\n\t */\n\tinitialize: function( models, options ) {\n\t\tvar allowed;\n\n\t\toptions = options || {};\n\t\tAttachments.prototype.initialize.apply( this, arguments );\n\n\t\tthis.args = options.args;\n\t\tthis._hasMore = true;\n\t\tthis.created = new Date();\n\n\t\tthis.filters.order = function( attachment ) {\n\t\t\tvar orderby = this.props.get('orderby'),\n\t\t\t\torder = this.props.get('order');\n\n\t\t\tif ( ! this.comparator ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// We want any items that can be placed before the last\n\t\t\t// item in the set. If we add any items after the last\n\t\t\t// item, then we can't guarantee the set is complete.\n\t\t\tif ( this.length ) {\n\t\t\t\treturn 1 !== this.comparator( attachment, this.last(), { ties: true });\n\n\t\t\t// Handle the case where there are no items yet and\n\t\t\t// we're sorting for recent items. In that case, we want\n\t\t\t// changes that occurred after we created the query.\n\t\t\t} else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {\n\t\t\t\treturn attachment.get( orderby ) >= this.created;\n\n\t\t\t// If we're sorting by menu order and we have no items,\n\t\t\t// accept any items that have the default menu order (0).\n\t\t\t} else if ( 'ASC' === order && 'menuOrder' === orderby ) {\n\t\t\t\treturn attachment.get( orderby ) === 0;\n\t\t\t}\n\n\t\t\t// Otherwise, we don't want any items yet.\n\t\t\treturn false;\n\t\t};\n\n\t\t// Observe the central `wp.Uploader.queue` collection to watch for\n\t\t// new matches for the query.\n\t\t//\n\t\t// Only observe when a limited number of query args are set. There\n\t\t// are no filters for other properties, so observing will result in\n\t\t// false positives in those queries.\n\t\tallowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'author' ];\n\t\tif ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {\n\t\t\tthis.observe( wp.Uploader.queue );\n\t\t}\n\t},\n\t/**\n\t * Whether there are more attachments that haven't been sync'd from the server\n\t * that match the collection's query.\n\t *\n\t * @returns {boolean}\n\t */\n\thasMore: function() {\n\t\treturn this._hasMore;\n\t},\n\t/**\n\t * Fetch more attachments from the server for the collection.\n\t *\n\t * @param {object} [options={}]\n\t * @returns {Promise}\n\t */\n\tmore: function( options ) {\n\t\tvar query = this;\n\n\t\t// If there is already a request pending, return early with the Deferred object.\n\t\tif ( this._more && 'pending' === this._more.state() ) {\n\t\t\treturn this._more;\n\t\t}\n\n\t\tif ( ! this.hasMore() ) {\n\t\t\treturn jQuery.Deferred().resolveWith( this ).promise();\n\t\t}\n\n\t\toptions = options || {};\n\t\toptions.remove = false;\n\n\t\treturn this._more = this.fetch( options ).done( function( resp ) {\n\t\t\tif ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {\n\t\t\t\tquery._hasMore = false;\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t * Overrides Backbone.Collection.sync\n\t * Overrides wp.media.model.Attachments.sync\n\t *\n\t * @param {String} method\n\t * @param {Backbone.Model} model\n\t * @param {Object} [options={}]\n\t * @returns {Promise}\n\t */\n\tsync: function( method, model, options ) {\n\t\tvar args, fallback;\n\n\t\t// Overload the read method so Attachment.fetch() functions correctly.\n\t\tif ( 'read' === method ) {\n\t\t\toptions = options || {};\n\t\t\toptions.context = this;\n\t\t\toptions.data = _.extend( options.data || {}, {\n\t\t\t\taction: 'query-attachments',\n\t\t\t\tpost_id: wp.media.model.settings.post.id\n\t\t\t});\n\n\t\t\t// Clone the args so manipulation is non-destructive.\n\t\t\targs = _.clone( this.args );\n\n\t\t\t// Determine which page to query.\n\t\t\tif ( -1 !== args.posts_per_page ) {\n\t\t\t\targs.paged = Math.round( this.length / args.posts_per_page ) + 1;\n\t\t\t}\n\n\t\t\toptions.data.query = args;\n\t\t\treturn wp.media.ajax( options );\n\n\t\t// Otherwise, fall back to Backbone.sync()\n\t\t} else {\n\t\t\t/**\n\t\t\t * Call wp.media.model.Attachments.sync or Backbone.sync\n\t\t\t */\n\t\t\tfallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;\n\t\t\treturn fallback.sync.apply( this, arguments );\n\t\t}\n\t}\n}, /** @lends wp.media.model.Query */{\n\t/**\n\t * @readonly\n\t */\n\tdefaultProps: {\n\t\torderby: 'date',\n\t\torder: 'DESC'\n\t},\n\t/**\n\t * @readonly\n\t */\n\tdefaultArgs: {\n\t\tposts_per_page: 40\n\t},\n\t/**\n\t * @readonly\n\t */\n\torderby: {\n\t\tallowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],\n\t\t/**\n\t\t * A map of JavaScript orderby values to their WP_Query equivalents.\n\t\t * @type {Object}\n\t\t */\n\t\tvaluemap: {\n\t\t\t'id': 'ID',\n\t\t\t'uploadedTo': 'parent',\n\t\t\t'menuOrder': 'menu_order ID'\n\t\t}\n\t},\n\t/**\n\t * A map of JavaScript query properties to their WP_Query equivalents.\n\t *\n\t * @readonly\n\t */\n\tpropmap: {\n\t\t'search':\t\t's',\n\t\t'type':\t\t\t'post_mime_type',\n\t\t'perPage':\t\t'posts_per_page',\n\t\t'menuOrder':\t'menu_order',\n\t\t'uploadedTo':\t'post_parent',\n\t\t'status':\t\t'post_status',\n\t\t'include':\t\t'post__in',\n\t\t'exclude':\t\t'post__not_in',\n\t\t'author':\t\t'author'\n\t},\n\t/**\n\t * Creates and returns an Attachments Query collection given the properties.\n\t *\n\t * Caches query objects and reuses where possible.\n\t *\n\t * @static\n\t * @method\n\t *\n\t * @param {object} [props]\n\t * @param {Object} [props.cache=true] Whether to use the query cache or not.\n\t * @param {Object} [props.order]\n\t * @param {Object} [props.orderby]\n\t * @param {Object} [props.include]\n\t * @param {Object} [props.exclude]\n\t * @param {Object} [props.s]\n\t * @param {Object} [props.post_mime_type]\n\t * @param {Object} [props.posts_per_page]\n\t * @param {Object} [props.menu_order]\n\t * @param {Object} [props.post_parent]\n\t * @param {Object} [props.post_status]\n\t * @param {Object} [props.author]\n\t * @param {Object} [options]\n\t *\n\t * @returns {wp.media.model.Query} A new Attachments Query collection.\n\t */\n\tget: (function(){\n\t\t/**\n\t\t * @static\n\t\t * @type Array\n\t\t */\n\t\tvar queries = [];\n\n\t\t/**\n\t\t * @returns {Query}\n\t\t */\n\t\treturn function( props, options ) {\n\t\t\tvar args = {},\n\t\t\t\torderby = Query.orderby,\n\t\t\t\tdefaults = Query.defaultProps,\n\t\t\t\tquery,\n\t\t\t\tcache = !! props.cache || _.isUndefined( props.cache );\n\n\t\t\t// Remove the `query` property. This isn't linked to a query,\n\t\t\t// this *is* the query.\n\t\t\tdelete props.query;\n\t\t\tdelete props.cache;\n\n\t\t\t// Fill default args.\n\t\t\t_.defaults( props, defaults );\n\n\t\t\t// Normalize the order.\n\t\t\tprops.order = props.order.toUpperCase();\n\t\t\tif ( 'DESC' !== props.order && 'ASC' !== props.order ) {\n\t\t\t\tprops.order = defaults.order.toUpperCase();\n\t\t\t}\n\n\t\t\t// Ensure we have a valid orderby value.\n\t\t\tif ( ! _.contains( orderby.allowed, props.orderby ) ) {\n\t\t\t\tprops.orderby = defaults.orderby;\n\t\t\t}\n\n\t\t\t_.each( [ 'include', 'exclude' ], function( prop ) {\n\t\t\t\tif ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {\n\t\t\t\t\tprops[ prop ] = [ props[ prop ] ];\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Generate the query `args` object.\n\t\t\t// Correct any differing property names.\n\t\t\t_.each( props, function( value, prop ) {\n\t\t\t\tif ( _.isNull( value ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\targs[ Query.propmap[ prop ] || prop ] = value;\n\t\t\t});\n\n\t\t\t// Fill any other default query args.\n\t\t\t_.defaults( args, Query.defaultArgs );\n\n\t\t\t// `props.orderby` does not always map directly to `args.orderby`.\n\t\t\t// Substitute exceptions specified in orderby.keymap.\n\t\t\targs.orderby = orderby.valuemap[ props.orderby ] || props.orderby;\n\n\t\t\t// Search the query cache for a matching query.\n\t\t\tif ( cache ) {\n\t\t\t\tquery = _.find( queries, function( query ) {\n\t\t\t\t\treturn _.isEqual( query.args, args );\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tqueries = [];\n\t\t\t}\n\n\t\t\t// Otherwise, create a new query and add it to the cache.\n\t\t\tif ( ! query ) {\n\t\t\t\tquery = new Query( [], _.extend( options || {}, {\n\t\t\t\t\tprops: props,\n\t\t\t\t\targs: args\n\t\t\t\t} ) );\n\t\t\t\tqueries.push( query );\n\t\t\t}\n\n\t\t\treturn query;\n\t\t};\n\t}())\n});\n\nmodule.exports = Query;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/query.js?");
- initialize: function( attributes ) {
- var Attachment = wp.media.model.Attachment;
- this.attachment = false;
-
- if ( attributes.attachment_id ) {
- this.attachment = Attachment.get( attributes.attachment_id );
- if ( this.attachment.get( 'url' ) ) {
- this.dfd = jQuery.Deferred();
- this.dfd.resolve();
- } else {
- this.dfd = this.attachment.fetch();
- }
- this.bindAttachmentListeners();
- }
-
- // keep url in sync with changes to the type of link
- this.on( 'change:link', this.updateLinkUrl, this );
- this.on( 'change:size', this.updateSize, this );
-
- this.setLinkTypeFromUrl();
- this.setAspectRatio();
-
- this.set( 'originalUrl', attributes.url );
- },
-
- bindAttachmentListeners: function() {
- this.listenTo( this.attachment, 'sync', this.setLinkTypeFromUrl );
- this.listenTo( this.attachment, 'sync', this.setAspectRatio );
- this.listenTo( this.attachment, 'change', this.updateSize );
- },
-
- changeAttachment: function( attachment, props ) {
- this.stopListening( this.attachment );
- this.attachment = attachment;
- this.bindAttachmentListeners();
-
- this.set( 'attachment_id', this.attachment.get( 'id' ) );
- this.set( 'caption', this.attachment.get( 'caption' ) );
- this.set( 'alt', this.attachment.get( 'alt' ) );
- this.set( 'size', props.get( 'size' ) );
- this.set( 'align', props.get( 'align' ) );
- this.set( 'link', props.get( 'link' ) );
- this.updateLinkUrl();
- this.updateSize();
- },
-
- setLinkTypeFromUrl: function() {
- var linkUrl = this.get( 'linkUrl' ),
- type;
-
- if ( ! linkUrl ) {
- this.set( 'link', 'none' );
- return;
- }
-
- // default to custom if there is a linkUrl
- type = 'custom';
-
- if ( this.attachment ) {
- if ( this.attachment.get( 'url' ) === linkUrl ) {
- type = 'file';
- } else if ( this.attachment.get( 'link' ) === linkUrl ) {
- type = 'post';
- }
- } else {
- if ( this.get( 'url' ) === linkUrl ) {
- type = 'file';
- }
- }
-
- this.set( 'link', type );
- },
-
- updateLinkUrl: function() {
- var link = this.get( 'link' ),
- url;
-
- switch( link ) {
- case 'file':
- if ( this.attachment ) {
- url = this.attachment.get( 'url' );
- } else {
- url = this.get( 'url' );
- }
- this.set( 'linkUrl', url );
- break;
- case 'post':
- this.set( 'linkUrl', this.attachment.get( 'link' ) );
- break;
- case 'none':
- this.set( 'linkUrl', '' );
- break;
- }
- },
-
- updateSize: function() {
- var size;
-
- if ( ! this.attachment ) {
- return;
- }
-
- if ( this.get( 'size' ) === 'custom' ) {
- this.set( 'width', this.get( 'customWidth' ) );
- this.set( 'height', this.get( 'customHeight' ) );
- this.set( 'url', this.get( 'originalUrl' ) );
- return;
- }
-
- size = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];
-
- if ( ! size ) {
- return;
- }
-
- this.set( 'url', size.url );
- this.set( 'width', size.width );
- this.set( 'height', size.height );
- },
-
- setAspectRatio: function() {
- var full;
-
- if ( this.attachment && this.attachment.get( 'sizes' ) ) {
- full = this.attachment.get( 'sizes' ).full;
-
- if ( full ) {
- this.set( 'aspectRatio', full.width / full.height );
- return;
- }
- }
-
- this.set( 'aspectRatio', this.get( 'customWidth' ) / this.get( 'customHeight' ) );
- }
-});
-
-module.exports = PostImage;
-
-
/***/ }),
-/***/ 25:
+/***/ "./src/wp-includes/js/media/models/selection.js":
+/*!******************************************************!*\
+ !*** ./src/wp-includes/js/media/models/selection.js ***!
+ \******************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-var Attachments = wp.media.model.Attachments,
- Selection;
+eval("var Attachments = wp.media.model.Attachments,\n\tSelection;\n\n/**\n * wp.media.model.Selection\n *\n * A selection of attachments.\n *\n * @memberOf wp.media.model\n *\n * @class\n * @augments wp.media.model.Attachments\n * @augments Backbone.Collection\n */\nSelection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{\n\t/**\n\t * Refresh the `single` model whenever the selection changes.\n\t * Binds `single` instead of using the context argument to ensure\n\t * it receives no parameters.\n\t *\n\t * @param {Array} [models=[]] Array of models used to populate the collection.\n\t * @param {Object} [options={}]\n\t */\n\tinitialize: function( models, options ) {\n\t\t/**\n\t\t * call 'initialize' directly on the parent class\n\t\t */\n\t\tAttachments.prototype.initialize.apply( this, arguments );\n\t\tthis.multiple = options && options.multiple;\n\n\t\tthis.on( 'add remove reset', _.bind( this.single, this, false ) );\n\t},\n\n\t/**\n\t * If the workflow does not support multi-select, clear out the selection\n\t * before adding a new attachment to it.\n\t *\n\t * @param {Array} models\n\t * @param {Object} options\n\t * @returns {wp.media.model.Attachment[]}\n\t */\n\tadd: function( models, options ) {\n\t\tif ( ! this.multiple ) {\n\t\t\tthis.remove( this.models );\n\t\t}\n\t\t/**\n\t\t * call 'add' directly on the parent class\n\t\t */\n\t\treturn Attachments.prototype.add.call( this, models, options );\n\t},\n\n\t/**\n\t * Fired when toggling (clicking on) an attachment in the modal.\n\t *\n\t * @param {undefined|boolean|wp.media.model.Attachment} model\n\t *\n\t * @fires wp.media.model.Selection#selection:single\n\t * @fires wp.media.model.Selection#selection:unsingle\n\t *\n\t * @returns {Backbone.Model}\n\t */\n\tsingle: function( model ) {\n\t\tvar previous = this._single;\n\n\t\t// If a `model` is provided, use it as the single model.\n\t\tif ( model ) {\n\t\t\tthis._single = model;\n\t\t}\n\t\t// If the single model isn't in the selection, remove it.\n\t\tif ( this._single && ! this.get( this._single.cid ) ) {\n\t\t\tdelete this._single;\n\t\t}\n\n\t\tthis._single = this._single || this.last();\n\n\t\t// If single has changed, fire an event.\n\t\tif ( this._single !== previous ) {\n\t\t\tif ( previous ) {\n\t\t\t\tprevious.trigger( 'selection:unsingle', previous, this );\n\n\t\t\t\t// If the model was already removed, trigger the collection\n\t\t\t\t// event manually.\n\t\t\t\tif ( ! this.get( previous.cid ) ) {\n\t\t\t\t\tthis.trigger( 'selection:unsingle', previous, this );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this._single ) {\n\t\t\t\tthis._single.trigger( 'selection:single', this._single, this );\n\t\t\t}\n\t\t}\n\n\t\t// Return the single model, or the last model as a fallback.\n\t\treturn this._single;\n\t}\n});\n\nmodule.exports = Selection;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/models/selection.js?");
-/**
- * wp.media.model.Selection
- *
- * A selection of attachments.
- *
- * @memberOf wp.media.model
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- */
-Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
- /**
- * Refresh the `single` model whenever the selection changes.
- * Binds `single` instead of using the context argument to ensure
- * it receives no parameters.
- *
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- /**
- * call 'initialize' directly on the parent class
- */
- Attachments.prototype.initialize.apply( this, arguments );
- this.multiple = options && options.multiple;
-
- this.on( 'add remove reset', _.bind( this.single, this, false ) );
- },
-
- /**
- * If the workflow does not support multi-select, clear out the selection
- * before adding a new attachment to it.
- *
- * @param {Array} models
- * @param {Object} options
- * @returns {wp.media.model.Attachment[]}
- */
- add: function( models, options ) {
- if ( ! this.multiple ) {
- this.remove( this.models );
- }
- /**
- * call 'add' directly on the parent class
- */
- return Attachments.prototype.add.call( this, models, options );
- },
-
- /**
- * Fired when toggling (clicking on) an attachment in the modal.
- *
- * @param {undefined|boolean|wp.media.model.Attachment} model
- *
- * @fires wp.media.model.Selection#selection:single
- * @fires wp.media.model.Selection#selection:unsingle
- *
- * @returns {Backbone.Model}
- */
- single: function( model ) {
- var previous = this._single;
-
- // If a `model` is provided, use it as the single model.
- if ( model ) {
- this._single = model;
- }
- // If the single model isn't in the selection, remove it.
- if ( this._single && ! this.get( this._single.cid ) ) {
- delete this._single;
- }
-
- this._single = this._single || this.last();
-
- // If single has changed, fire an event.
- if ( this._single !== previous ) {
- if ( previous ) {
- previous.trigger( 'selection:unsingle', previous, this );
-
- // If the model was already removed, trigger the collection
- // event manually.
- if ( ! this.get( previous.cid ) ) {
- this.trigger( 'selection:unsingle', previous, this );
- }
- }
- if ( this._single ) {
- this._single.trigger( 'selection:single', this._single, this );
- }
- }
-
- // Return the single model, or the last model as a fallback.
- return this._single;
- }
-});
-
-module.exports = Selection;
-
-
/***/ })
/******/ });
\ No newline at end of file
Index: src/wp-includes/js/media-views.js
===================================================================
--- src/wp-includes/js/media-views.js (revision 43688)
+++ src/wp-includes/js/media-views.js (working copy)
@@ -81,9159 +81,834 @@
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 26);
+/******/ return __webpack_require__(__webpack_require__.s = "./src/wp-includes/js/media/views.manifest.js");
/******/ })
/************************************************************************/
-/******/ (Array(26).concat([
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+/******/ ({
-var media = wp.media,
- $ = jQuery,
- l10n;
+/***/ "./src/wp-includes/js/media/controllers/collection-add.js":
+/*!****************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/collection-add.js ***!
+ \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-media.isTouchDevice = ( 'ontouchend' in document );
+eval("var Selection = wp.media.model.Selection,\n\tLibrary = wp.media.controller.Library,\n\tCollectionAdd;\n\n/**\n * wp.media.controller.CollectionAdd\n *\n * A state for adding attachments to a collection (e.g. video playlist).\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=library] Unique identifier.\n * @param {string} attributes.title Title for the state. Displays in the frame's title region.\n * @param {boolean} [attributes.multiple=add] Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.\n * If one is not supplied, a collection of attachments of the specified type will be created.\n * @param {boolean|string} [attributes.filterable=uploaded] Whether the library is filterable, and if so what filters should be shown.\n * Accepts 'all', 'uploaded', or 'unattached'.\n * @param {string} [attributes.menu=gallery] Initial mode for the menu region.\n * @param {string} [attributes.content=upload] Initial mode for the content region.\n * Overridden by persistent user setting if 'contentUserSetting' is true.\n * @param {string} [attributes.router=browse] Initial mode for the router region.\n * @param {string} [attributes.toolbar=gallery-add] Initial mode for the toolbar region.\n * @param {boolean} [attributes.searchable=true] Whether the library is searchable.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.autoSelect=true] Whether an uploaded attachment should be automatically added to the selection.\n * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.\n * @param {int} [attributes.priority=100] The priority for the state link in the media menu.\n * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.\n * Defaults to false because for this state, because the library of the Edit Gallery state is the selection.\n * @param {string} attributes.type The collection's media type. (e.g. 'video').\n * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').\n */\nCollectionAdd = Library.extend(/** @lends wp.media.controller.CollectionAdd.prototype */{\n\tdefaults: _.defaults( {\n\t\t// Selection defaults. @see media.model.Selection\n\t\tmultiple: 'add',\n\t\t// Attachments browser defaults. @see media.view.AttachmentsBrowser\n\t\tfilterable: 'uploaded',\n\n\t\tpriority: 100,\n\t\tsyncSelection: false\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tinitialize: function() {\n\t\tvar collectionType = this.get('collectionType');\n\n\t\tif ( 'video' === this.get( 'type' ) ) {\n\t\t\tcollectionType = 'video-' + collectionType;\n\t\t}\n\n\t\tthis.set( 'id', collectionType + '-library' );\n\t\tthis.set( 'toolbar', collectionType + '-add' );\n\t\tthis.set( 'menu', collectionType );\n\n\t\t// If we haven't been provided a `library`, create a `Selection`.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', wp.media.query({ type: this.get('type') }) );\n\t\t}\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\tvar library = this.get('library'),\n\t\t\teditLibrary = this.get('editLibrary'),\n\t\t\tedit = this.frame.state( this.get('collectionType') + '-edit' ).get('library');\n\n\t\tif ( editLibrary && editLibrary !== edit ) {\n\t\t\tlibrary.unobserve( editLibrary );\n\t\t}\n\n\t\t// Accepts attachments that exist in the original library and\n\t\t// that do not exist in gallery's library.\n\t\tlibrary.validator = function( attachment ) {\n\t\t\treturn !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && Selection.prototype.validator.apply( this, arguments );\n\t\t};\n\n\t\t// Reset the library to ensure that all attachments are re-added\n\t\t// to the collection. Do so silently, as calling `observe` will\n\t\t// trigger the `reset` event.\n\t\tlibrary.reset( library.mirroring.models, { silent: true });\n\t\tlibrary.observe( edit );\n\t\tthis.set('editLibrary', edit);\n\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t}\n});\n\nmodule.exports = CollectionAdd;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/collection-add.js?");
-// Link any localized strings.
-l10n = media.view.l10n = window._wpMediaViewsL10n || {};
+/***/ }),
-// Link any settings.
-media.view.settings = l10n.settings || {};
-delete l10n.settings;
+/***/ "./src/wp-includes/js/media/controllers/collection-edit.js":
+/*!*****************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/collection-edit.js ***!
+ \*****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-// Copy the `post` setting over to the model settings.
-media.model.settings.post = media.view.settings.post;
+eval("var Library = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\t$ = jQuery,\n\tCollectionEdit;\n\n/**\n * wp.media.controller.CollectionEdit\n *\n * A state for editing a collection, which is used by audio and video playlists,\n * and can be used for other collections.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} attributes.title Title for the state. Displays in the media menu and the frame's title region.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to edit.\n * If one is not supplied, an empty media.model.Selection collection is created.\n * @param {boolean} [attributes.multiple=false] Whether multi-select is enabled.\n * @param {string} [attributes.content=browse] Initial mode for the content region.\n * @param {string} attributes.menu Initial mode for the menu region. @todo this needs a better explanation.\n * @param {boolean} [attributes.searchable=false] Whether the library is searchable.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.date=true] Whether to show the date filter in the browser's toolbar.\n * @param {boolean} [attributes.describe=true] Whether to offer UI to describe the attachments - e.g. captioning images in a gallery.\n * @param {boolean} [attributes.dragInfo=true] Whether to show instructional text about the attachments being sortable.\n * @param {boolean} [attributes.dragInfoText] Instructional text about the attachments being sortable.\n * @param {int} [attributes.idealColumnWidth=170] The ideal column width in pixels for attachments.\n * @param {boolean} [attributes.editing=false] Whether the gallery is being created, or editing an existing instance.\n * @param {int} [attributes.priority=60] The priority for the state link in the media menu.\n * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.\n * Defaults to false for this state, because the library passed in *is* the selection.\n * @param {view} [attributes.SettingsView] The view to edit the collection instance settings (e.g. Playlist settings with \"Show tracklist\" checkbox).\n * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`.\n * If none supplied, defaults to wp.media.view.Attachment.EditLibrary.\n * @param {string} attributes.type The collection's media type. (e.g. 'video').\n * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').\n */\nCollectionEdit = Library.extend(/** @lends wp.media.controller.CollectionEdit.prototype */{\n\tdefaults: {\n\t\tmultiple: false,\n\t\tsortable: true,\n\t\tdate: false,\n\t\tsearchable: false,\n\t\tcontent: 'browse',\n\t\tdescribe: true,\n\t\tdragInfo: true,\n\t\tidealColumnWidth: 170,\n\t\tediting: false,\n\t\tpriority: 60,\n\t\tSettingsView: false,\n\t\tsyncSelection: false\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tinitialize: function() {\n\t\tvar collectionType = this.get('collectionType');\n\n\t\tif ( 'video' === this.get( 'type' ) ) {\n\t\t\tcollectionType = 'video-' + collectionType;\n\t\t}\n\n\t\tthis.set( 'id', collectionType + '-edit' );\n\t\tthis.set( 'toolbar', collectionType + '-edit' );\n\n\t\t// If we haven't been provided a `library`, create a `Selection`.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', new wp.media.model.Selection() );\n\t\t}\n\t\t// The single `Attachment` view to be used in the `Attachments` view.\n\t\tif ( ! this.get('AttachmentView') ) {\n\t\t\tthis.set( 'AttachmentView', wp.media.view.Attachment.EditLibrary );\n\t\t}\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\tvar library = this.get('library');\n\n\t\t// Limit the library to images only.\n\t\tlibrary.props.set( 'type', this.get( 'type' ) );\n\n\t\t// Watch for uploaded attachments.\n\t\tthis.get('library').observe( wp.Uploader.queue );\n\n\t\tthis.frame.on( 'content:render:browse', this.renderSettings, this );\n\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tdeactivate: function() {\n\t\t// Stop watching for uploaded attachments.\n\t\tthis.get('library').unobserve( wp.Uploader.queue );\n\n\t\tthis.frame.off( 'content:render:browse', this.renderSettings, this );\n\n\t\tLibrary.prototype.deactivate.apply( this, arguments );\n\t},\n\n\t/**\n\t * Render the collection embed settings view in the browser sidebar.\n\t *\n\t * @todo This is against the pattern elsewhere in media. Typically the frame\n\t * is responsible for adding region mode callbacks. Explain.\n\t *\n\t * @since 3.9.0\n\t *\n\t * @param {wp.media.view.attachmentsBrowser} The attachments browser view.\n\t */\n\trenderSettings: function( attachmentsBrowserView ) {\n\t\tvar library = this.get('library'),\n\t\t\tcollectionType = this.get('collectionType'),\n\t\t\tdragInfoText = this.get('dragInfoText'),\n\t\t\tSettingsView = this.get('SettingsView'),\n\t\t\tobj = {};\n\n\t\tif ( ! library || ! attachmentsBrowserView ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlibrary[ collectionType ] = library[ collectionType ] || new Backbone.Model();\n\n\t\tobj[ collectionType ] = new SettingsView({\n\t\t\tcontroller: this,\n\t\t\tmodel: library[ collectionType ],\n\t\t\tpriority: 40\n\t\t});\n\n\t\tattachmentsBrowserView.sidebar.set( obj );\n\n\t\tif ( dragInfoText ) {\n\t\t\tattachmentsBrowserView.toolbar.set( 'dragInfo', new wp.media.View({\n\t\t\t\tel: $( '
' + dragInfoText + '
' )[0],\n\t\t\t\tpriority: -40\n\t\t\t}) );\n\t\t}\n\n\t\t// Add the 'Reverse order' button to the toolbar.\n\t\tattachmentsBrowserView.toolbar.set( 'reverse', {\n\t\t\ttext: l10n.reverseOrder,\n\t\t\tpriority: 80,\n\n\t\t\tclick: function() {\n\t\t\t\tlibrary.reset( library.toArray().reverse() );\n\t\t\t}\n\t\t});\n\t}\n});\n\nmodule.exports = CollectionEdit;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/collection-edit.js?");
-// Check if the browser supports CSS 3.0 transitions
-$.support.transition = (function(){
- var style = document.documentElement.style,
- transitions = {
- WebkitTransition: 'webkitTransitionEnd',
- MozTransition: 'transitionend',
- OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend'
- }, transition;
+/***/ }),
- transition = _.find( _.keys( transitions ), function( transition ) {
- return ! _.isUndefined( style[ transition ] );
- });
+/***/ "./src/wp-includes/js/media/controllers/cropper.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/cropper.js ***!
+ \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- return transition && {
- end: transitions[ transition ]
- };
-}());
+eval("var l10n = wp.media.view.l10n,\n\tCropper;\n\n/**\n * wp.media.controller.Cropper\n *\n * A state for cropping an image.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nCropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Cropper.prototype */{\n\tdefaults: {\n\t\tid: 'cropper',\n\t\ttitle: l10n.cropImage,\n\t\t// Region mode defaults.\n\t\ttoolbar: 'crop',\n\t\tcontent: 'crop',\n\t\trouter: false,\n\t\tcanSkipCrop: false,\n\n\t\t// Default doCrop Ajax arguments to allow the Customizer (for example) to inject state.\n\t\tdoCropArgs: {}\n\t},\n\n\tactivate: function() {\n\t\tthis.frame.on( 'content:create:crop', this.createCropContent, this );\n\t\tthis.frame.on( 'close', this.removeCropper, this );\n\t\tthis.set('selection', new Backbone.Collection(this.frame._selection.single));\n\t},\n\n\tdeactivate: function() {\n\t\tthis.frame.toolbar.mode('browse');\n\t},\n\n\tcreateCropContent: function() {\n\t\tthis.cropperView = new wp.media.view.Cropper({\n\t\t\tcontroller: this,\n\t\t\tattachment: this.get('selection').first()\n\t\t});\n\t\tthis.cropperView.on('image-loaded', this.createCropToolbar, this);\n\t\tthis.frame.content.set(this.cropperView);\n\n\t},\n\tremoveCropper: function() {\n\t\tthis.imgSelect.cancelSelection();\n\t\tthis.imgSelect.setOptions({remove: true});\n\t\tthis.imgSelect.update();\n\t\tthis.cropperView.remove();\n\t},\n\tcreateCropToolbar: function() {\n\t\tvar canSkipCrop, toolbarOptions;\n\n\t\tcanSkipCrop = this.get('canSkipCrop') || false;\n\n\t\ttoolbarOptions = {\n\t\t\tcontroller: this.frame,\n\t\t\titems: {\n\t\t\t\tinsert: {\n\t\t\t\t\tstyle: 'primary',\n\t\t\t\t\ttext: l10n.cropImage,\n\t\t\t\t\tpriority: 80,\n\t\t\t\t\trequires: { library: false, selection: false },\n\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tvar controller = this.controller,\n\t\t\t\t\t\t\tselection;\n\n\t\t\t\t\t\tselection = controller.state().get('selection').first();\n\t\t\t\t\t\tselection.set({cropDetails: controller.state().imgSelect.getSelection()});\n\n\t\t\t\t\t\tthis.$el.text(l10n.cropping);\n\t\t\t\t\t\tthis.$el.attr('disabled', true);\n\n\t\t\t\t\t\tcontroller.state().doCrop( selection ).done( function( croppedImage ) {\n\t\t\t\t\t\t\tcontroller.trigger('cropped', croppedImage );\n\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t}).fail( function() {\n\t\t\t\t\t\t\tcontroller.trigger('content:error:crop');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif ( canSkipCrop ) {\n\t\t\t_.extend( toolbarOptions.items, {\n\t\t\t\tskip: {\n\t\t\t\t\tstyle: 'secondary',\n\t\t\t\t\ttext: l10n.skipCropping,\n\t\t\t\t\tpriority: 70,\n\t\t\t\t\trequires: { library: false, selection: false },\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tvar selection = this.controller.state().get('selection').first();\n\t\t\t\t\t\tthis.controller.state().cropperView.remove();\n\t\t\t\t\t\tthis.controller.trigger('skippedcrop', selection);\n\t\t\t\t\t\tthis.controller.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.frame.toolbar.set( new wp.media.view.Toolbar(toolbarOptions) );\n\t},\n\n\tdoCrop: function( attachment ) {\n\t\treturn wp.ajax.post( 'custom-header-crop', _.extend(\n\t\t\t{},\n\t\t\tthis.defaults.doCropArgs,\n\t\t\t{\n\t\t\t\tnonce: attachment.get( 'nonces' ).edit,\n\t\t\t\tid: attachment.get( 'id' ),\n\t\t\t\tcropDetails: attachment.get( 'cropDetails' )\n\t\t\t}\n\t\t) );\n\t}\n});\n\nmodule.exports = Cropper;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/cropper.js?");
-/**
- * A shared event bus used to provide events into
- * the media workflows that 3rd-party devs can use to hook
- * in.
- */
-media.events = _.extend( {}, Backbone.Events );
+/***/ }),
-/**
- * Makes it easier to bind events using transitions.
- *
- * @param {string} selector
- * @param {Number} sensitivity
- * @returns {Promise}
- */
-media.transition = function( selector, sensitivity ) {
- var deferred = $.Deferred();
+/***/ "./src/wp-includes/js/media/controllers/customize-image-cropper.js":
+/*!*************************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/customize-image-cropper.js ***!
+ \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- sensitivity = sensitivity || 2000;
+eval("var Controller = wp.media.controller,\n\tCustomizeImageCropper;\n\n/**\n * wp.media.controller.CustomizeImageCropper\n *\n * @memberOf wp.media.controller\n *\n * A state for cropping an image.\n *\n * @class\n * @augments wp.media.controller.Cropper\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nCustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{\n\tdoCrop: function( attachment ) {\n\t\tvar cropDetails = attachment.get( 'cropDetails' ),\n\t\t\tcontrol = this.get( 'control' ),\n\t\t\tratio = cropDetails.width / cropDetails.height;\n\n\t\t// Use crop measurements when flexible in both directions.\n\t\tif ( control.params.flex_width && control.params.flex_height ) {\n\t\t\tcropDetails.dst_width = cropDetails.width;\n\t\t\tcropDetails.dst_height = cropDetails.height;\n\n\t\t// Constrain flexible side based on image ratio and size of the fixed side.\n\t\t} else {\n\t\t\tcropDetails.dst_width = control.params.flex_width ? control.params.height * ratio : control.params.width;\n\t\t\tcropDetails.dst_height = control.params.flex_height ? control.params.width / ratio : control.params.height;\n\t\t}\n\n\t\treturn wp.ajax.post( 'crop-image', {\n\t\t\twp_customize: 'on',\n\t\t\tnonce: attachment.get( 'nonces' ).edit,\n\t\t\tid: attachment.get( 'id' ),\n\t\t\tcontext: control.id,\n\t\t\tcropDetails: cropDetails\n\t\t} );\n\t}\n});\n\nmodule.exports = CustomizeImageCropper;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/customize-image-cropper.js?");
- if ( $.support.transition ) {
- if ( ! (selector instanceof $) ) {
- selector = $( selector );
- }
+/***/ }),
- // Resolve the deferred when the first element finishes animating.
- selector.first().one( $.support.transition.end, deferred.resolve );
+/***/ "./src/wp-includes/js/media/controllers/edit-image.js":
+/*!************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/edit-image.js ***!
+ \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // Just in case the event doesn't trigger, fire a callback.
- _.delay( deferred.resolve, sensitivity );
+eval("var l10n = wp.media.view.l10n,\n\tEditImage;\n\n/**\n * wp.media.controller.EditImage\n *\n * A state for editing (cropping, etc.) an image.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} attributes The attributes hash passed to the state.\n * @param {wp.media.model.Attachment} attributes.model The attachment.\n * @param {string} [attributes.id=edit-image] Unique identifier.\n * @param {string} [attributes.title=Edit Image] Title for the state. Displays in the media menu and the frame's title region.\n * @param {string} [attributes.content=edit-image] Initial mode for the content region.\n * @param {string} [attributes.toolbar=edit-image] Initial mode for the toolbar region.\n * @param {string} [attributes.menu=false] Initial mode for the menu region.\n * @param {string} [attributes.url] Unused. @todo Consider removal.\n */\nEditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.EditImage.prototype */{\n\tdefaults: {\n\t\tid: 'edit-image',\n\t\ttitle: l10n.editImage,\n\t\tmenu: false,\n\t\ttoolbar: 'edit-image',\n\t\tcontent: 'edit-image',\n\t\turl: ''\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\tthis.frame.on( 'toolbar:render:edit-image', _.bind( this.toolbar, this ) );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tdeactivate: function() {\n\t\tthis.frame.off( 'toolbar:render:edit-image' );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\ttoolbar: function() {\n\t\tvar frame = this.frame,\n\t\t\tlastState = frame.lastState(),\n\t\t\tprevious = lastState && lastState.id;\n\n\t\tframe.toolbar.set( new wp.media.view.Toolbar({\n\t\t\tcontroller: frame,\n\t\t\titems: {\n\t\t\t\tback: {\n\t\t\t\t\tstyle: 'primary',\n\t\t\t\t\ttext: l10n.back,\n\t\t\t\t\tpriority: 20,\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tif ( previous ) {\n\t\t\t\t\t\t\tframe.setState( previous );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tframe.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}) );\n\t}\n});\n\nmodule.exports = EditImage;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/edit-image.js?");
- // Otherwise, execute on the spot.
- } else {
- deferred.resolve();
- }
+/***/ }),
- return deferred.promise();
-};
+/***/ "./src/wp-includes/js/media/controllers/embed.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/embed.js ***!
+ \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-media.controller.Region = __webpack_require__( 27 );
-media.controller.StateMachine = __webpack_require__( 28 );
-media.controller.State = __webpack_require__( 29 );
+eval("var l10n = wp.media.view.l10n,\n\t$ = Backbone.$,\n\tEmbed;\n\n/**\n * wp.media.controller.Embed\n *\n * A state for embedding media from a URL.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} attributes The attributes hash passed to the state.\n * @param {string} [attributes.id=embed] Unique identifier.\n * @param {string} [attributes.title=Insert From URL] Title for the state. Displays in the media menu and the frame's title region.\n * @param {string} [attributes.content=embed] Initial mode for the content region.\n * @param {string} [attributes.menu=default] Initial mode for the menu region.\n * @param {string} [attributes.toolbar=main-embed] Initial mode for the toolbar region.\n * @param {string} [attributes.menu=false] Initial mode for the menu region.\n * @param {int} [attributes.priority=120] The priority for the state link in the media menu.\n * @param {string} [attributes.type=link] The type of embed. Currently only link is supported.\n * @param {string} [attributes.url] The embed URL.\n * @param {object} [attributes.metadata={}] Properties of the embed, which will override attributes.url if set.\n */\nEmbed = wp.media.controller.State.extend(/** @lends wp.media.controller.Embed.prototype */{\n\tdefaults: {\n\t\tid: 'embed',\n\t\ttitle: l10n.insertFromUrlTitle,\n\t\tcontent: 'embed',\n\t\tmenu: 'default',\n\t\ttoolbar: 'main-embed',\n\t\tpriority: 120,\n\t\ttype: 'link',\n\t\turl: '',\n\t\tmetadata: {}\n\t},\n\n\t// The amount of time used when debouncing the scan.\n\tsensitivity: 400,\n\n\tinitialize: function(options) {\n\t\tthis.metadata = options.metadata;\n\t\tthis.debouncedScan = _.debounce( _.bind( this.scan, this ), this.sensitivity );\n\t\tthis.props = new Backbone.Model( this.metadata || { url: '' });\n\t\tthis.props.on( 'change:url', this.debouncedScan, this );\n\t\tthis.props.on( 'change:url', this.refresh, this );\n\t\tthis.on( 'scan', this.scanImage, this );\n\t},\n\n\t/**\n\t * Trigger a scan of the embedded URL's content for metadata required to embed.\n\t *\n\t * @fires wp.media.controller.Embed#scan\n\t */\n\tscan: function() {\n\t\tvar scanners,\n\t\t\tembed = this,\n\t\t\tattributes = {\n\t\t\t\ttype: 'link',\n\t\t\t\tscanners: []\n\t\t\t};\n\n\t\t// Scan is triggered with the list of `attributes` to set on the\n\t\t// state, useful for the 'type' attribute and 'scanners' attribute,\n\t\t// an array of promise objects for asynchronous scan operations.\n\t\tif ( this.props.get('url') ) {\n\t\t\tthis.trigger( 'scan', attributes );\n\t\t}\n\n\t\tif ( attributes.scanners.length ) {\n\t\t\tscanners = attributes.scanners = $.when.apply( $, attributes.scanners );\n\t\t\tscanners.always( function() {\n\t\t\t\tif ( embed.get('scanners') === scanners ) {\n\t\t\t\t\tembed.set( 'loading', false );\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tattributes.scanners = null;\n\t\t}\n\n\t\tattributes.loading = !! attributes.scanners;\n\t\tthis.set( attributes );\n\t},\n\t/**\n\t * Try scanning the embed as an image to discover its dimensions.\n\t *\n\t * @param {Object} attributes\n\t */\n\tscanImage: function( attributes ) {\n\t\tvar frame = this.frame,\n\t\t\tstate = this,\n\t\t\turl = this.props.get('url'),\n\t\t\timage = new Image(),\n\t\t\tdeferred = $.Deferred();\n\n\t\tattributes.scanners.push( deferred.promise() );\n\n\t\t// Try to load the image and find its width/height.\n\t\timage.onload = function() {\n\t\t\tdeferred.resolve();\n\n\t\t\tif ( state !== frame.state() || url !== state.props.get('url') ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.set({\n\t\t\t\ttype: 'image'\n\t\t\t});\n\n\t\t\tstate.props.set({\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height\n\t\t\t});\n\t\t};\n\n\t\timage.onerror = deferred.reject;\n\t\timage.src = url;\n\t},\n\n\trefresh: function() {\n\t\tthis.frame.toolbar.get().refresh();\n\t},\n\n\treset: function() {\n\t\tthis.props.clear().set({ url: '' });\n\n\t\tif ( this.active ) {\n\t\t\tthis.refresh();\n\t\t}\n\t}\n});\n\nmodule.exports = Embed;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/embed.js?");
-media.selectionSync = __webpack_require__( 30 );
-media.controller.Library = __webpack_require__( 31 );
-media.controller.ImageDetails = __webpack_require__( 32 );
-media.controller.GalleryEdit = __webpack_require__( 33 );
-media.controller.GalleryAdd = __webpack_require__( 34 );
-media.controller.CollectionEdit = __webpack_require__( 35 );
-media.controller.CollectionAdd = __webpack_require__( 36 );
-media.controller.FeaturedImage = __webpack_require__( 37 );
-media.controller.ReplaceImage = __webpack_require__( 38 );
-media.controller.EditImage = __webpack_require__( 39 );
-media.controller.MediaLibrary = __webpack_require__( 40 );
-media.controller.Embed = __webpack_require__( 41 );
-media.controller.Cropper = __webpack_require__( 42 );
-media.controller.CustomizeImageCropper = __webpack_require__( 43 );
-media.controller.SiteIconCropper = __webpack_require__( 44 );
+/***/ }),
-media.View = __webpack_require__( 45 );
-media.view.Frame = __webpack_require__( 46 );
-media.view.MediaFrame = __webpack_require__( 47 );
-media.view.MediaFrame.Select = __webpack_require__( 48 );
-media.view.MediaFrame.Post = __webpack_require__( 49 );
-media.view.MediaFrame.ImageDetails = __webpack_require__( 50 );
-media.view.Modal = __webpack_require__( 51 );
-media.view.FocusManager = __webpack_require__( 52 );
-media.view.UploaderWindow = __webpack_require__( 53 );
-media.view.EditorUploader = __webpack_require__( 54 );
-media.view.UploaderInline = __webpack_require__( 55 );
-media.view.UploaderStatus = __webpack_require__( 56 );
-media.view.UploaderStatusError = __webpack_require__( 57 );
-media.view.Toolbar = __webpack_require__( 58 );
-media.view.Toolbar.Select = __webpack_require__( 59 );
-media.view.Toolbar.Embed = __webpack_require__( 60 );
-media.view.Button = __webpack_require__( 61 );
-media.view.ButtonGroup = __webpack_require__( 62 );
-media.view.PriorityList = __webpack_require__( 63 );
-media.view.MenuItem = __webpack_require__( 64 );
-media.view.Menu = __webpack_require__( 65 );
-media.view.RouterItem = __webpack_require__( 66 );
-media.view.Router = __webpack_require__( 67 );
-media.view.Sidebar = __webpack_require__( 68 );
-media.view.Attachment = __webpack_require__( 69 );
-media.view.Attachment.Library = __webpack_require__( 70 );
-media.view.Attachment.EditLibrary = __webpack_require__( 71 );
-media.view.Attachments = __webpack_require__( 72 );
-media.view.Search = __webpack_require__( 73 );
-media.view.AttachmentFilters = __webpack_require__( 74 );
-media.view.DateFilter = __webpack_require__( 75 );
-media.view.AttachmentFilters.Uploaded = __webpack_require__( 76 );
-media.view.AttachmentFilters.All = __webpack_require__( 77 );
-media.view.AttachmentsBrowser = __webpack_require__( 78 );
-media.view.Selection = __webpack_require__( 79 );
-media.view.Attachment.Selection = __webpack_require__( 80 );
-media.view.Attachments.Selection = __webpack_require__( 81 );
-media.view.Attachment.EditSelection = __webpack_require__( 82 );
-media.view.Settings = __webpack_require__( 83 );
-media.view.Settings.AttachmentDisplay = __webpack_require__( 84 );
-media.view.Settings.Gallery = __webpack_require__( 85 );
-media.view.Settings.Playlist = __webpack_require__( 86 );
-media.view.Attachment.Details = __webpack_require__( 87 );
-media.view.AttachmentCompat = __webpack_require__( 88 );
-media.view.Iframe = __webpack_require__( 89 );
-media.view.Embed = __webpack_require__( 90 );
-media.view.Label = __webpack_require__( 91 );
-media.view.EmbedUrl = __webpack_require__( 92 );
-media.view.EmbedLink = __webpack_require__( 93 );
-media.view.EmbedImage = __webpack_require__( 94 );
-media.view.ImageDetails = __webpack_require__( 95 );
-media.view.Cropper = __webpack_require__( 96 );
-media.view.SiteIconCropper = __webpack_require__( 97 );
-media.view.SiteIconPreview = __webpack_require__( 98 );
-media.view.EditImage = __webpack_require__( 99 );
-media.view.Spinner = __webpack_require__( 100 );
+/***/ "./src/wp-includes/js/media/controllers/featured-image.js":
+/*!****************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/featured-image.js ***!
+ \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+eval("var Attachment = wp.media.model.Attachment,\n\tLibrary = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\tFeaturedImage;\n\n/**\n * wp.media.controller.FeaturedImage\n *\n * A state for selecting a featured image for a post.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=featured-image] Unique identifier.\n * @param {string} [attributes.title=Set Featured Image] Title for the state. Displays in the media menu and the frame's title region.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.\n * If one is not supplied, a collection of all images will be created.\n * @param {boolean} [attributes.multiple=false] Whether multi-select is enabled.\n * @param {string} [attributes.content=upload] Initial mode for the content region.\n * Overridden by persistent user setting if 'contentUserSetting' is true.\n * @param {string} [attributes.menu=default] Initial mode for the menu region.\n * @param {string} [attributes.router=browse] Initial mode for the router region.\n * @param {string} [attributes.toolbar=featured-image] Initial mode for the toolbar region.\n * @param {int} [attributes.priority=60] The priority for the state link in the media menu.\n * @param {boolean} [attributes.searchable=true] Whether the library is searchable.\n * @param {boolean|string} [attributes.filterable=false] Whether the library is filterable, and if so what filters should be shown.\n * Accepts 'all', 'uploaded', or 'unattached'.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.autoSelect=true] Whether an uploaded attachment should be automatically added to the selection.\n * @param {boolean} [attributes.describe=false] Whether to offer UI to describe attachments - e.g. captioning images in a gallery.\n * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.\n * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.\n */\nFeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prototype */{\n\tdefaults: _.defaults({\n\t\tid: 'featured-image',\n\t\ttitle: l10n.setFeaturedImageTitle,\n\t\tmultiple: false,\n\t\tfilterable: 'uploaded',\n\t\ttoolbar: 'featured-image',\n\t\tpriority: 60,\n\t\tsyncSelection: true\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tinitialize: function() {\n\t\tvar library, comparator;\n\n\t\t// If we haven't been provided a `library`, create a `Selection`.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', wp.media.query({ type: 'image' }) );\n\t\t}\n\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\n\t\tlibrary = this.get('library');\n\t\tcomparator = library.comparator;\n\n\t\t// Overload the library's comparator to push items that are not in\n\t\t// the mirrored query to the front of the aggregate collection.\n\t\tlibrary.comparator = function( a, b ) {\n\t\t\tvar aInQuery = !! this.mirroring.get( a.cid ),\n\t\t\t\tbInQuery = !! this.mirroring.get( b.cid );\n\n\t\t\tif ( ! aInQuery && bInQuery ) {\n\t\t\t\treturn -1;\n\t\t\t} else if ( aInQuery && ! bInQuery ) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn comparator.apply( this, arguments );\n\t\t\t}\n\t\t};\n\n\t\t// Add all items in the selection to the library, so any featured\n\t\t// images that are not initially loaded still appear.\n\t\tlibrary.observe( this.get('selection') );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tactivate: function() {\n\t\tthis.updateSelection();\n\t\tthis.frame.on( 'open', this.updateSelection, this );\n\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tdeactivate: function() {\n\t\tthis.frame.off( 'open', this.updateSelection, this );\n\n\t\tLibrary.prototype.deactivate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tupdateSelection: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tid = wp.media.view.settings.post.featuredImageId,\n\t\t\tattachment;\n\n\t\tif ( '' !== id && -1 !== id ) {\n\t\t\tattachment = Attachment.get( id );\n\t\t\tattachment.fetch();\n\t\t}\n\n\t\tselection.reset( attachment ? [ attachment ] : [] );\n\t}\n});\n\nmodule.exports = FeaturedImage;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/featured-image.js?");
/***/ }),
-/* 27 */
+
+/***/ "./src/wp-includes/js/media/controllers/gallery-add.js":
+/*!*************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/gallery-add.js ***!
+ \*************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.controller.Region
- *
- * A region is a persistent application layout area.
- *
- * A region assumes one mode at any time, and can be switched to another.
- *
- * When mode changes, events are triggered on the region's parent view.
- * The parent view will listen to specific events and fill the region with an
- * appropriate view depending on mode. For example, a frame listens for the
- * 'browse' mode t be activated on the 'content' view and then fills the region
- * with an AttachmentsBrowser view.
- *
- * @memberOf wp.media.controller
- *
- * @class
- *
- * @param {object} options Options hash for the region.
- * @param {string} options.id Unique identifier for the region.
- * @param {Backbone.View} options.view A parent view the region exists within.
- * @param {string} options.selector jQuery selector for the region within the parent view.
- */
-var Region = function( options ) {
- _.extend( this, _.pick( options || {}, 'id', 'view', 'selector' ) );
-};
+eval("var Selection = wp.media.model.Selection,\n\tLibrary = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\tGalleryAdd;\n\n/**\n * wp.media.controller.GalleryAdd\n *\n * A state for selecting more images to add to a gallery.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=gallery-library] Unique identifier.\n * @param {string} [attributes.title=Add to Gallery] Title for the state. Displays in the frame's title region.\n * @param {boolean} [attributes.multiple=add] Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.\n * If one is not supplied, a collection of all images will be created.\n * @param {boolean|string} [attributes.filterable=uploaded] Whether the library is filterable, and if so what filters should be shown.\n * Accepts 'all', 'uploaded', or 'unattached'.\n * @param {string} [attributes.menu=gallery] Initial mode for the menu region.\n * @param {string} [attributes.content=upload] Initial mode for the content region.\n * Overridden by persistent user setting if 'contentUserSetting' is true.\n * @param {string} [attributes.router=browse] Initial mode for the router region.\n * @param {string} [attributes.toolbar=gallery-add] Initial mode for the toolbar region.\n * @param {boolean} [attributes.searchable=true] Whether the library is searchable.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.autoSelect=true] Whether an uploaded attachment should be automatically added to the selection.\n * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.\n * @param {int} [attributes.priority=100] The priority for the state link in the media menu.\n * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.\n * Defaults to false because for this state, because the library of the Edit Gallery state is the selection.\n */\nGalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype */{\n\tdefaults: _.defaults({\n\t\tid: 'gallery-library',\n\t\ttitle: l10n.addToGalleryTitle,\n\t\tmultiple: 'add',\n\t\tfilterable: 'uploaded',\n\t\tmenu: 'gallery',\n\t\ttoolbar: 'gallery-add',\n\t\tpriority: 100,\n\t\tsyncSelection: false\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tinitialize: function() {\n\t\t// If a library wasn't supplied, create a library of images.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', wp.media.query({ type: 'image' }) );\n\t\t}\n\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tactivate: function() {\n\t\tvar library = this.get('library'),\n\t\t\tedit = this.frame.state('gallery-edit').get('library');\n\n\t\tif ( this.editLibrary && this.editLibrary !== edit ) {\n\t\t\tlibrary.unobserve( this.editLibrary );\n\t\t}\n\n\t\t// Accepts attachments that exist in the original library and\n\t\t// that do not exist in gallery's library.\n\t\tlibrary.validator = function( attachment ) {\n\t\t\treturn !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && Selection.prototype.validator.apply( this, arguments );\n\t\t};\n\n\t\t// Reset the library to ensure that all attachments are re-added\n\t\t// to the collection. Do so silently, as calling `observe` will\n\t\t// trigger the `reset` event.\n\t\tlibrary.reset( library.mirroring.models, { silent: true });\n\t\tlibrary.observe( edit );\n\t\tthis.editLibrary = edit;\n\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t}\n});\n\nmodule.exports = GalleryAdd;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/gallery-add.js?");
-// Use Backbone's self-propagating `extend` inheritance method.
-Region.extend = Backbone.Model.extend;
+/***/ }),
-_.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
- /**
- * Activate a mode.
- *
- * @since 3.5.0
- *
- * @param {string} mode
- *
- * @fires Region#activate
- * @fires Region#deactivate
- *
- * @returns {wp.media.controller.Region} Returns itself to allow chaining.
- */
- mode: function( mode ) {
- if ( ! mode ) {
- return this._mode;
- }
- // Bail if we're trying to change to the current mode.
- if ( mode === this._mode ) {
- return this;
- }
+/***/ "./src/wp-includes/js/media/controllers/gallery-edit.js":
+/*!**************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/gallery-edit.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * Region mode deactivation event.
- *
- * @event wp.media.controller.Region#deactivate
- */
- this.trigger('deactivate');
+eval("var Library = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\tGalleryEdit;\n\n/**\n * wp.media.controller.GalleryEdit\n *\n * A state for editing a gallery's images and settings.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=gallery-edit] Unique identifier.\n * @param {string} [attributes.title=Edit Gallery] Title for the state. Displays in the frame's title region.\n * @param {wp.media.model.Attachments} [attributes.library] The collection of attachments in the gallery.\n * If one is not supplied, an empty media.model.Selection collection is created.\n * @param {boolean} [attributes.multiple=false] Whether multi-select is enabled.\n * @param {boolean} [attributes.searchable=false] Whether the library is searchable.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.date=true] Whether to show the date filter in the browser's toolbar.\n * @param {string|false} [attributes.content=browse] Initial mode for the content region.\n * @param {string|false} [attributes.toolbar=image-details] Initial mode for the toolbar region.\n * @param {boolean} [attributes.describe=true] Whether to offer UI to describe attachments - e.g. captioning images in a gallery.\n * @param {boolean} [attributes.displaySettings=true] Whether to show the attachment display settings interface.\n * @param {boolean} [attributes.dragInfo=true] Whether to show instructional text about the attachments being sortable.\n * @param {int} [attributes.idealColumnWidth=170] The ideal column width in pixels for attachments.\n * @param {boolean} [attributes.editing=false] Whether the gallery is being created, or editing an existing instance.\n * @param {int} [attributes.priority=60] The priority for the state link in the media menu.\n * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.\n * Defaults to false for this state, because the library passed in *is* the selection.\n * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`.\n * If none supplied, defaults to wp.media.view.Attachment.EditLibrary.\n */\nGalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototype */{\n\tdefaults: {\n\t\tid: 'gallery-edit',\n\t\ttitle: l10n.editGalleryTitle,\n\t\tmultiple: false,\n\t\tsearchable: false,\n\t\tsortable: true,\n\t\tdate: false,\n\t\tdisplay: false,\n\t\tcontent: 'browse',\n\t\ttoolbar: 'gallery-edit',\n\t\tdescribe: true,\n\t\tdisplaySettings: true,\n\t\tdragInfo: true,\n\t\tidealColumnWidth: 170,\n\t\tediting: false,\n\t\tpriority: 60,\n\t\tsyncSelection: false\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tinitialize: function() {\n\t\t// If we haven't been provided a `library`, create a `Selection`.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', new wp.media.model.Selection() );\n\t\t}\n\n\t\t// The single `Attachment` view to be used in the `Attachments` view.\n\t\tif ( ! this.get('AttachmentView') ) {\n\t\t\tthis.set( 'AttachmentView', wp.media.view.Attachment.EditLibrary );\n\t\t}\n\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tactivate: function() {\n\t\tvar library = this.get('library');\n\n\t\t// Limit the library to images only.\n\t\tlibrary.props.set( 'type', 'image' );\n\n\t\t// Watch for uploaded attachments.\n\t\tthis.get('library').observe( wp.Uploader.queue );\n\n\t\tthis.frame.on( 'content:render:browse', this.gallerySettings, this );\n\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tdeactivate: function() {\n\t\t// Stop watching for uploaded attachments.\n\t\tthis.get('library').unobserve( wp.Uploader.queue );\n\n\t\tthis.frame.off( 'content:render:browse', this.gallerySettings, this );\n\n\t\tLibrary.prototype.deactivate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t *\n\t * @param browser\n\t */\n\tgallerySettings: function( browser ) {\n\t\tif ( ! this.get('displaySettings') ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar library = this.get('library');\n\n\t\tif ( ! library || ! browser ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlibrary.gallery = library.gallery || new Backbone.Model();\n\n\t\tbrowser.sidebar.set({\n\t\t\tgallery: new wp.media.view.Settings.Gallery({\n\t\t\t\tcontroller: this,\n\t\t\t\tmodel: library.gallery,\n\t\t\t\tpriority: 40\n\t\t\t})\n\t\t});\n\n\t\tbrowser.toolbar.set( 'reverse', {\n\t\t\ttext: l10n.reverseOrder,\n\t\t\tpriority: 80,\n\n\t\t\tclick: function() {\n\t\t\t\tlibrary.reset( library.toArray().reverse() );\n\t\t\t}\n\t\t});\n\t}\n});\n\nmodule.exports = GalleryEdit;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/gallery-edit.js?");
- this._mode = mode;
- this.render( mode );
+/***/ }),
- /**
- * Region mode activation event.
- *
- * @event wp.media.controller.Region#activate
- */
- this.trigger('activate');
- return this;
- },
- /**
- * Render a mode.
- *
- * @since 3.5.0
- *
- * @param {string} mode
- *
- * @fires Region#create
- * @fires Region#render
- *
- * @returns {wp.media.controller.Region} Returns itself to allow chaining
- */
- render: function( mode ) {
- // If the mode isn't active, activate it.
- if ( mode && mode !== this._mode ) {
- return this.mode( mode );
- }
+/***/ "./src/wp-includes/js/media/controllers/image-details.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/image-details.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- var set = { view: null },
- view;
+eval("var State = wp.media.controller.State,\n\tLibrary = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\tImageDetails;\n\n/**\n * wp.media.controller.ImageDetails\n *\n * A state for editing the attachment display settings of an image that's been\n * inserted into the editor.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=image-details] Unique identifier.\n * @param {string} [attributes.title=Image Details] Title for the state. Displays in the frame's title region.\n * @param {wp.media.model.Attachment} attributes.image The image's model.\n * @param {string|false} [attributes.content=image-details] Initial mode for the content region.\n * @param {string|false} [attributes.menu=false] Initial mode for the menu region.\n * @param {string|false} [attributes.router=false] Initial mode for the router region.\n * @param {string|false} [attributes.toolbar=image-details] Initial mode for the toolbar region.\n * @param {boolean} [attributes.editing=false] Unused.\n * @param {int} [attributes.priority=60] Unused.\n *\n * @todo This state inherits some defaults from media.controller.Library.prototype.defaults,\n * however this may not do anything.\n */\nImageDetails = State.extend(/** @lends wp.media.controller.ImageDetails.prototype */{\n\tdefaults: _.defaults({\n\t\tid: 'image-details',\n\t\ttitle: l10n.imageDetailsTitle,\n\t\tcontent: 'image-details',\n\t\tmenu: false,\n\t\trouter: false,\n\t\ttoolbar: 'image-details',\n\t\tediting: false,\n\t\tpriority: 60\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.9.0\n\t *\n\t * @param options Attributes\n\t */\n\tinitialize: function( options ) {\n\t\tthis.image = options.image;\n\t\tState.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\tthis.frame.modal.$el.addClass('image-details');\n\t}\n});\n\nmodule.exports = ImageDetails;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/image-details.js?");
- /**
- * Create region view event.
- *
- * Region view creation takes place in an event callback on the frame.
- *
- * @event wp.media.controller.Region#create
- * @type {object}
- * @property {object} view
- */
- this.trigger( 'create', set );
- view = set.view;
+/***/ }),
- /**
- * Render region view event.
- *
- * Region view creation takes place in an event callback on the frame.
- *
- * @event wp.media.controller.Region#render
- * @type {object}
- */
- this.trigger( 'render', view );
- if ( view ) {
- this.set( view );
- }
- return this;
- },
+/***/ "./src/wp-includes/js/media/controllers/library.js":
+/*!*********************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/library.js ***!
+ \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * Get the region's view.
- *
- * @since 3.5.0
- *
- * @returns {wp.media.View}
- */
- get: function() {
- return this.view.views.first( this.selector );
- },
+eval("var l10n = wp.media.view.l10n,\n\tgetUserSetting = window.getUserSetting,\n\tsetUserSetting = window.setUserSetting,\n\tLibrary;\n\n/**\n * wp.media.controller.Library\n *\n * A state for choosing an attachment or group of attachments from the media library.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n * @mixes media.selectionSync\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=library] Unique identifier.\n * @param {string} [attributes.title=Media library] Title for the state. Displays in the media menu and the frame's title region.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.\n * If one is not supplied, a collection of all attachments will be created.\n * @param {wp.media.model.Selection|object} [attributes.selection] A collection to contain attachment selections within the state.\n * If the 'selection' attribute is a plain JS object,\n * a Selection will be created using its values as the selection instance's `props` model.\n * Otherwise, it will copy the library's `props` model.\n * @param {boolean} [attributes.multiple=false] Whether multi-select is enabled.\n * @param {string} [attributes.content=upload] Initial mode for the content region.\n * Overridden by persistent user setting if 'contentUserSetting' is true.\n * @param {string} [attributes.menu=default] Initial mode for the menu region.\n * @param {string} [attributes.router=browse] Initial mode for the router region.\n * @param {string} [attributes.toolbar=select] Initial mode for the toolbar region.\n * @param {boolean} [attributes.searchable=true] Whether the library is searchable.\n * @param {boolean|string} [attributes.filterable=false] Whether the library is filterable, and if so what filters should be shown.\n * Accepts 'all', 'uploaded', or 'unattached'.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.autoSelect=true] Whether an uploaded attachment should be automatically added to the selection.\n * @param {boolean} [attributes.describe=false] Whether to offer UI to describe attachments - e.g. captioning images in a gallery.\n * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.\n * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.\n */\nLibrary = wp.media.controller.State.extend(/** @lends wp.media.controller.Library.prototype */{\n\tdefaults: {\n\t\tid: 'library',\n\t\ttitle: l10n.mediaLibraryTitle,\n\t\tmultiple: false,\n\t\tcontent: 'upload',\n\t\tmenu: 'default',\n\t\trouter: 'browse',\n\t\ttoolbar: 'select',\n\t\tsearchable: true,\n\t\tfilterable: false,\n\t\tsortable: true,\n\t\tautoSelect: true,\n\t\tdescribe: false,\n\t\tcontentUserSetting: true,\n\t\tsyncSelection: true\n\t},\n\n\t/**\n\t * If a library isn't provided, query all media items.\n\t * If a selection instance isn't provided, create one.\n\t *\n\t * @since 3.5.0\n\t */\n\tinitialize: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tprops;\n\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', wp.media.query() );\n\t\t}\n\n\t\tif ( ! ( selection instanceof wp.media.model.Selection ) ) {\n\t\t\tprops = selection;\n\n\t\t\tif ( ! props ) {\n\t\t\t\tprops = this.get('library').props.toJSON();\n\t\t\t\tprops = _.omit( props, 'orderby', 'query' );\n\t\t\t}\n\n\t\t\tthis.set( 'selection', new wp.media.model.Selection( null, {\n\t\t\t\tmultiple: this.get('multiple'),\n\t\t\t\tprops: props\n\t\t\t}) );\n\t\t}\n\n\t\tthis.resetDisplays();\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tactivate: function() {\n\t\tthis.syncSelection();\n\n\t\twp.Uploader.queue.on( 'add', this.uploading, this );\n\n\t\tthis.get('selection').on( 'add remove reset', this.refreshContent, this );\n\n\t\tif ( this.get( 'router' ) && this.get('contentUserSetting') ) {\n\t\t\tthis.frame.on( 'content:activate', this.saveContentMode, this );\n\t\t\tthis.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );\n\t\t}\n\t},\n\n\t/**\n\t * @since 3.5.0\n\t */\n\tdeactivate: function() {\n\t\tthis.recordSelection();\n\n\t\tthis.frame.off( 'content:activate', this.saveContentMode, this );\n\n\t\t// Unbind all event handlers that use this state as the context\n\t\t// from the selection.\n\t\tthis.get('selection').off( null, null, this );\n\n\t\twp.Uploader.queue.off( null, null, this );\n\t},\n\n\t/**\n\t * Reset the library to its initial state.\n\t *\n\t * @since 3.5.0\n\t */\n\treset: function() {\n\t\tthis.get('selection').reset();\n\t\tthis.resetDisplays();\n\t\tthis.refreshContent();\n\t},\n\n\t/**\n\t * Reset the attachment display settings defaults to the site options.\n\t *\n\t * If site options don't define them, fall back to a persistent user setting.\n\t *\n\t * @since 3.5.0\n\t */\n\tresetDisplays: function() {\n\t\tvar defaultProps = wp.media.view.settings.defaultProps;\n\t\tthis._displays = [];\n\t\tthis._defaultDisplaySettings = {\n\t\t\talign: getUserSetting( 'align', defaultProps.align ) || 'none',\n\t\t\tsize: getUserSetting( 'imgsize', defaultProps.size ) || 'medium',\n\t\t\tlink: getUserSetting( 'urlbutton', defaultProps.link ) || 'none'\n\t\t};\n\t},\n\n\t/**\n\t * Create a model to represent display settings (alignment, etc.) for an attachment.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {Backbone.Model}\n\t */\n\tdisplay: function( attachment ) {\n\t\tvar displays = this._displays;\n\n\t\tif ( ! displays[ attachment.cid ] ) {\n\t\t\tdisplays[ attachment.cid ] = new Backbone.Model( this.defaultDisplaySettings( attachment ) );\n\t\t}\n\t\treturn displays[ attachment.cid ];\n\t},\n\n\t/**\n\t * Given an attachment, create attachment display settings properties.\n\t *\n\t * @since 3.6.0\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {Object}\n\t */\n\tdefaultDisplaySettings: function( attachment ) {\n\t\tvar settings = _.clone( this._defaultDisplaySettings );\n\n\t\tif ( settings.canEmbed = this.canEmbed( attachment ) ) {\n\t\t\tsettings.link = 'embed';\n\t\t} else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {\n\t\t\tsettings.link = 'file';\n\t\t}\n\n\t\treturn settings;\n\t},\n\n\t/**\n\t * Whether an attachment is image.\n\t *\n\t * @since 4.4.1\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {Boolean}\n\t */\n\tisImageAttachment: function( attachment ) {\n\t\t// If uploading, we know the filename but not the mime type.\n\t\tif ( attachment.get('uploading') ) {\n\t\t\treturn /\\.(jpe?g|png|gif)$/i.test( attachment.get('filename') );\n\t\t}\n\n\t\treturn attachment.get('type') === 'image';\n\t},\n\n\t/**\n\t * Whether an attachment can be embedded (audio or video).\n\t *\n\t * @since 3.6.0\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {Boolean}\n\t */\n\tcanEmbed: function( attachment ) {\n\t\t// If uploading, we know the filename but not the mime type.\n\t\tif ( ! attachment.get('uploading') ) {\n\t\t\tvar type = attachment.get('type');\n\t\t\tif ( type !== 'audio' && type !== 'video' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn _.contains( wp.media.view.settings.embedExts, attachment.get('filename').split('.').pop() );\n\t},\n\n\n\t/**\n\t * If the state is active, no items are selected, and the current\n\t * content mode is not an option in the state's router (provided\n\t * the state has a router), reset the content mode to the default.\n\t *\n\t * @since 3.5.0\n\t */\n\trefreshContent: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tframe = this.frame,\n\t\t\trouter = frame.router.get(),\n\t\t\tmode = frame.content.mode();\n\n\t\tif ( this.active && ! selection.length && router && ! router.get( mode ) ) {\n\t\t\tthis.frame.content.render( this.get('content') );\n\t\t}\n\t},\n\n\t/**\n\t * Callback handler when an attachment is uploaded.\n\t *\n\t * Switch to the Media Library if uploaded from the 'Upload Files' tab.\n\t *\n\t * Adds any uploading attachments to the selection.\n\t *\n\t * If the state only supports one attachment to be selected and multiple\n\t * attachments are uploaded, the last attachment in the upload queue will\n\t * be selected.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {wp.media.model.Attachment} attachment\n\t */\n\tuploading: function( attachment ) {\n\t\tvar content = this.frame.content;\n\n\t\tif ( 'upload' === content.mode() ) {\n\t\t\tthis.frame.content.mode('browse');\n\t\t}\n\n\t\tif ( this.get( 'autoSelect' ) ) {\n\t\t\tthis.get('selection').add( attachment );\n\t\t\tthis.frame.trigger( 'library:selection:add' );\n\t\t}\n\t},\n\n\t/**\n\t * Persist the mode of the content region as a user setting.\n\t *\n\t * @since 3.5.0\n\t */\n\tsaveContentMode: function() {\n\t\tif ( 'browse' !== this.get('router') ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar mode = this.frame.content.mode(),\n\t\t\tview = this.frame.router.get();\n\n\t\tif ( view && view.get( mode ) ) {\n\t\t\tsetUserSetting( 'libraryContent', mode );\n\t\t}\n\t}\n\n});\n\n// Make selectionSync available on any Media Library state.\n_.extend( Library.prototype, wp.media.selectionSync );\n\nmodule.exports = Library;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/library.js?");
- /**
- * Set the region's view as a subview of the frame.
- *
- * @since 3.5.0
- *
- * @param {Array|Object} views
- * @param {Object} [options={}]
- * @returns {wp.Backbone.Subviews} Subviews is returned to allow chaining
- */
- set: function( views, options ) {
- if ( options ) {
- options.add = false;
- }
- return this.view.views.set( this.selector, views, options );
- },
+/***/ }),
- /**
- * Trigger regional view events on the frame.
- *
- * @since 3.5.0
- *
- * @param {string} event
- * @returns {undefined|wp.media.controller.Region} Returns itself to allow chaining.
- */
- trigger: function( event ) {
- var base, args;
+/***/ "./src/wp-includes/js/media/controllers/media-library.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/media-library.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- if ( ! this._mode ) {
- return;
- }
+eval("/**\n * wp.media.controller.MediaLibrary\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nvar Library = wp.media.controller.Library,\n\tMediaLibrary;\n\nMediaLibrary = Library.extend(/** @lends wp.media.controller.MediaLibrary.prototype */{\n\tdefaults: _.defaults({\n\t\t// Attachments browser defaults. @see media.view.AttachmentsBrowser\n\t\tfilterable: 'uploaded',\n\n\t\tdisplaySettings: false,\n\t\tpriority: 80,\n\t\tsyncSelection: false\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.9.0\n\t *\n\t * @param options\n\t */\n\tinitialize: function( options ) {\n\t\tthis.media = options.media;\n\t\tthis.type = options.type;\n\t\tthis.set( 'library', wp.media.query({ type: this.type }) );\n\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\t// @todo this should use this.frame.\n\t\tif ( wp.media.frame.lastMime ) {\n\t\t\tthis.set( 'library', wp.media.query({ type: wp.media.frame.lastMime }) );\n\t\t\tdelete wp.media.frame.lastMime;\n\t\t}\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t}\n});\n\nmodule.exports = MediaLibrary;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/media-library.js?");
- args = _.toArray( arguments );
- base = this.id + ':' + event;
+/***/ }),
- // Trigger `{this.id}:{event}:{this._mode}` event on the frame.
- args[0] = base + ':' + this._mode;
- this.view.trigger.apply( this.view, args );
+/***/ "./src/wp-includes/js/media/controllers/region.js":
+/*!********************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/region.js ***!
+ \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // Trigger `{this.id}:{event}` event on the frame.
- args[0] = base;
- this.view.trigger.apply( this.view, args );
- return this;
- }
-});
+eval("/**\n * wp.media.controller.Region\n *\n * A region is a persistent application layout area.\n *\n * A region assumes one mode at any time, and can be switched to another.\n *\n * When mode changes, events are triggered on the region's parent view.\n * The parent view will listen to specific events and fill the region with an\n * appropriate view depending on mode. For example, a frame listens for the\n * 'browse' mode t be activated on the 'content' view and then fills the region\n * with an AttachmentsBrowser view.\n *\n * @memberOf wp.media.controller\n *\n * @class\n *\n * @param {object} options Options hash for the region.\n * @param {string} options.id Unique identifier for the region.\n * @param {Backbone.View} options.view A parent view the region exists within.\n * @param {string} options.selector jQuery selector for the region within the parent view.\n */\nvar Region = function( options ) {\n\t_.extend( this, _.pick( options || {}, 'id', 'view', 'selector' ) );\n};\n\n// Use Backbone's self-propagating `extend` inheritance method.\nRegion.extend = Backbone.Model.extend;\n\n_.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{\n\t/**\n\t * Activate a mode.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {string} mode\n\t *\n\t * @fires Region#activate\n\t * @fires Region#deactivate\n\t *\n\t * @returns {wp.media.controller.Region} Returns itself to allow chaining.\n\t */\n\tmode: function( mode ) {\n\t\tif ( ! mode ) {\n\t\t\treturn this._mode;\n\t\t}\n\t\t// Bail if we're trying to change to the current mode.\n\t\tif ( mode === this._mode ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Region mode deactivation event.\n\t\t *\n\t\t * @event wp.media.controller.Region#deactivate\n\t\t */\n\t\tthis.trigger('deactivate');\n\n\t\tthis._mode = mode;\n\t\tthis.render( mode );\n\n\t\t/**\n\t\t * Region mode activation event.\n\t\t *\n\t\t * @event wp.media.controller.Region#activate\n\t\t */\n\t\tthis.trigger('activate');\n\t\treturn this;\n\t},\n\t/**\n\t * Render a mode.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {string} mode\n\t *\n\t * @fires Region#create\n\t * @fires Region#render\n\t *\n\t * @returns {wp.media.controller.Region} Returns itself to allow chaining\n\t */\n\trender: function( mode ) {\n\t\t// If the mode isn't active, activate it.\n\t\tif ( mode && mode !== this._mode ) {\n\t\t\treturn this.mode( mode );\n\t\t}\n\n\t\tvar set = { view: null },\n\t\t\tview;\n\n\t\t/**\n\t\t * Create region view event.\n\t\t *\n\t\t * Region view creation takes place in an event callback on the frame.\n\t\t *\n\t\t * @event wp.media.controller.Region#create\n\t\t * @type {object}\n\t\t * @property {object} view\n\t\t */\n\t\tthis.trigger( 'create', set );\n\t\tview = set.view;\n\n\t\t/**\n\t\t * Render region view event.\n\t\t *\n\t\t * Region view creation takes place in an event callback on the frame.\n\t\t *\n\t\t * @event wp.media.controller.Region#render\n\t\t * @type {object}\n\t\t */\n\t\tthis.trigger( 'render', view );\n\t\tif ( view ) {\n\t\t\tthis.set( view );\n\t\t}\n\t\treturn this;\n\t},\n\n\t/**\n\t * Get the region's view.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @returns {wp.media.View}\n\t */\n\tget: function() {\n\t\treturn this.view.views.first( this.selector );\n\t},\n\n\t/**\n\t * Set the region's view as a subview of the frame.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {Array|Object} views\n\t * @param {Object} [options={}]\n\t * @returns {wp.Backbone.Subviews} Subviews is returned to allow chaining\n\t */\n\tset: function( views, options ) {\n\t\tif ( options ) {\n\t\t\toptions.add = false;\n\t\t}\n\t\treturn this.view.views.set( this.selector, views, options );\n\t},\n\n\t/**\n\t * Trigger regional view events on the frame.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {string} event\n\t * @returns {undefined|wp.media.controller.Region} Returns itself to allow chaining.\n\t */\n\ttrigger: function( event ) {\n\t\tvar base, args;\n\n\t\tif ( ! this._mode ) {\n\t\t\treturn;\n\t\t}\n\n\t\targs = _.toArray( arguments );\n\t\tbase = this.id + ':' + event;\n\n\t\t// Trigger `{this.id}:{event}:{this._mode}` event on the frame.\n\t\targs[0] = base + ':' + this._mode;\n\t\tthis.view.trigger.apply( this.view, args );\n\n\t\t// Trigger `{this.id}:{event}` event on the frame.\n\t\targs[0] = base;\n\t\tthis.view.trigger.apply( this.view, args );\n\t\treturn this;\n\t}\n});\n\nmodule.exports = Region;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/region.js?");
-module.exports = Region;
+/***/ }),
-
-/***/ }),
-/* 28 */
+/***/ "./src/wp-includes/js/media/controllers/replace-image.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/replace-image.js ***!
+ \***************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.controller.StateMachine
- *
- * A state machine keeps track of state. It is in one state at a time,
- * and can change from one state to another.
- *
- * States are stored as models in a Backbone collection.
- *
- * @memberOf wp.media.controller
- *
- * @since 3.5.0
- *
- * @class
- * @augments Backbone.Model
- * @mixin
- * @mixes Backbone.Events
- *
- * @param {Array} states
- */
-var StateMachine = function( states ) {
- // @todo This is dead code. The states collection gets created in media.view.Frame._createStates.
- this.states = new Backbone.Collection( states );
-};
+eval("var Library = wp.media.controller.Library,\n\tl10n = wp.media.view.l10n,\n\tReplaceImage;\n\n/**\n * wp.media.controller.ReplaceImage\n *\n * A state for replacing an image.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Library\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n *\n * @param {object} [attributes] The attributes hash passed to the state.\n * @param {string} [attributes.id=replace-image] Unique identifier.\n * @param {string} [attributes.title=Replace Image] Title for the state. Displays in the media menu and the frame's title region.\n * @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.\n * If one is not supplied, a collection of all images will be created.\n * @param {boolean} [attributes.multiple=false] Whether multi-select is enabled.\n * @param {string} [attributes.content=upload] Initial mode for the content region.\n * Overridden by persistent user setting if 'contentUserSetting' is true.\n * @param {string} [attributes.menu=default] Initial mode for the menu region.\n * @param {string} [attributes.router=browse] Initial mode for the router region.\n * @param {string} [attributes.toolbar=replace] Initial mode for the toolbar region.\n * @param {int} [attributes.priority=60] The priority for the state link in the media menu.\n * @param {boolean} [attributes.searchable=true] Whether the library is searchable.\n * @param {boolean|string} [attributes.filterable=uploaded] Whether the library is filterable, and if so what filters should be shown.\n * Accepts 'all', 'uploaded', or 'unattached'.\n * @param {boolean} [attributes.sortable=true] Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.\n * @param {boolean} [attributes.autoSelect=true] Whether an uploaded attachment should be automatically added to the selection.\n * @param {boolean} [attributes.describe=false] Whether to offer UI to describe attachments - e.g. captioning images in a gallery.\n * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.\n * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.\n */\nReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.prototype */{\n\tdefaults: _.defaults({\n\t\tid: 'replace-image',\n\t\ttitle: l10n.replaceImageTitle,\n\t\tmultiple: false,\n\t\tfilterable: 'uploaded',\n\t\ttoolbar: 'replace',\n\t\tmenu: false,\n\t\tpriority: 60,\n\t\tsyncSelection: true\n\t}, Library.prototype.defaults ),\n\n\t/**\n\t * @since 3.9.0\n\t *\n\t * @param options\n\t */\n\tinitialize: function( options ) {\n\t\tvar library, comparator;\n\n\t\tthis.image = options.image;\n\t\t// If we haven't been provided a `library`, create a `Selection`.\n\t\tif ( ! this.get('library') ) {\n\t\t\tthis.set( 'library', wp.media.query({ type: 'image' }) );\n\t\t}\n\n\t\tLibrary.prototype.initialize.apply( this, arguments );\n\n\t\tlibrary = this.get('library');\n\t\tcomparator = library.comparator;\n\n\t\t// Overload the library's comparator to push items that are not in\n\t\t// the mirrored query to the front of the aggregate collection.\n\t\tlibrary.comparator = function( a, b ) {\n\t\t\tvar aInQuery = !! this.mirroring.get( a.cid ),\n\t\t\t\tbInQuery = !! this.mirroring.get( b.cid );\n\n\t\t\tif ( ! aInQuery && bInQuery ) {\n\t\t\t\treturn -1;\n\t\t\t} else if ( aInQuery && ! bInQuery ) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn comparator.apply( this, arguments );\n\t\t\t}\n\t\t};\n\n\t\t// Add all items in the selection to the library, so any featured\n\t\t// images that are not initially loaded still appear.\n\t\tlibrary.observe( this.get('selection') );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tactivate: function() {\n\t\tthis.updateSelection();\n\t\tLibrary.prototype.activate.apply( this, arguments );\n\t},\n\n\t/**\n\t * @since 3.9.0\n\t */\n\tupdateSelection: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tattachment = this.image.attachment;\n\n\t\tselection.reset( attachment ? [ attachment ] : [] );\n\t}\n});\n\nmodule.exports = ReplaceImage;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/replace-image.js?");
-// Use Backbone's self-propagating `extend` inheritance method.
-StateMachine.extend = Backbone.Model.extend;
+/***/ }),
-_.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{
- /**
- * Fetch a state.
- *
- * If no `id` is provided, returns the active state.
- *
- * Implicitly creates states.
- *
- * Ensure that the `states` collection exists so the `StateMachine`
- * can be used as a mixin.
- *
- * @since 3.5.0
- *
- * @param {string} id
- * @returns {wp.media.controller.State} Returns a State model
- * from the StateMachine collection
- */
- state: function( id ) {
- this.states = this.states || new Backbone.Collection();
+/***/ "./src/wp-includes/js/media/controllers/site-icon-cropper.js":
+/*!*******************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/site-icon-cropper.js ***!
+ \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // Default to the active state.
- id = id || this._state;
+eval("var Controller = wp.media.controller,\n\tSiteIconCropper;\n\n/**\n * wp.media.controller.SiteIconCropper\n *\n * A state for cropping a Site Icon.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments wp.media.controller.Cropper\n * @augments wp.media.controller.State\n * @augments Backbone.Model\n */\nSiteIconCropper = Controller.Cropper.extend(/** @lends wp.media.controller.SiteIconCropper.prototype */{\n\tactivate: function() {\n\t\tthis.frame.on( 'content:create:crop', this.createCropContent, this );\n\t\tthis.frame.on( 'close', this.removeCropper, this );\n\t\tthis.set('selection', new Backbone.Collection(this.frame._selection.single));\n\t},\n\n\tcreateCropContent: function() {\n\t\tthis.cropperView = new wp.media.view.SiteIconCropper({\n\t\t\tcontroller: this,\n\t\t\tattachment: this.get('selection').first()\n\t\t});\n\t\tthis.cropperView.on('image-loaded', this.createCropToolbar, this);\n\t\tthis.frame.content.set(this.cropperView);\n\n\t},\n\n\tdoCrop: function( attachment ) {\n\t\tvar cropDetails = attachment.get( 'cropDetails' ),\n\t\t\tcontrol = this.get( 'control' );\n\n\t\tcropDetails.dst_width = control.params.width;\n\t\tcropDetails.dst_height = control.params.height;\n\n\t\treturn wp.ajax.post( 'crop-image', {\n\t\t\tnonce: attachment.get( 'nonces' ).edit,\n\t\t\tid: attachment.get( 'id' ),\n\t\t\tcontext: 'site-icon',\n\t\t\tcropDetails: cropDetails\n\t\t} );\n\t}\n});\n\nmodule.exports = SiteIconCropper;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/site-icon-cropper.js?");
- if ( id && ! this.states.get( id ) ) {
- this.states.add({ id: id });
- }
- return this.states.get( id );
- },
+/***/ }),
- /**
- * Sets the active state.
- *
- * Bail if we're trying to select the current state, if we haven't
- * created the `states` collection, or are trying to select a state
- * that does not exist.
- *
- * @since 3.5.0
- *
- * @param {string} id
- *
- * @fires wp.media.controller.State#deactivate
- * @fires wp.media.controller.State#activate
- *
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining
- */
- setState: function( id ) {
- var previous = this.state();
+/***/ "./src/wp-includes/js/media/controllers/state-machine.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/state-machine.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- if ( ( previous && id === previous.id ) || ! this.states || ! this.states.get( id ) ) {
- return this;
- }
+eval("/**\n * wp.media.controller.StateMachine\n *\n * A state machine keeps track of state. It is in one state at a time,\n * and can change from one state to another.\n *\n * States are stored as models in a Backbone collection.\n *\n * @memberOf wp.media.controller\n *\n * @since 3.5.0\n *\n * @class\n * @augments Backbone.Model\n * @mixin\n * @mixes Backbone.Events\n *\n * @param {Array} states\n */\nvar StateMachine = function( states ) {\n\t// @todo This is dead code. The states collection gets created in media.view.Frame._createStates.\n\tthis.states = new Backbone.Collection( states );\n};\n\n// Use Backbone's self-propagating `extend` inheritance method.\nStateMachine.extend = Backbone.Model.extend;\n\n_.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{\n\t/**\n\t * Fetch a state.\n\t *\n\t * If no `id` is provided, returns the active state.\n\t *\n\t * Implicitly creates states.\n\t *\n\t * Ensure that the `states` collection exists so the `StateMachine`\n\t * can be used as a mixin.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {string} id\n\t * @returns {wp.media.controller.State} Returns a State model\n\t * from the StateMachine collection\n\t */\n\tstate: function( id ) {\n\t\tthis.states = this.states || new Backbone.Collection();\n\n\t\t// Default to the active state.\n\t\tid = id || this._state;\n\n\t\tif ( id && ! this.states.get( id ) ) {\n\t\t\tthis.states.add({ id: id });\n\t\t}\n\t\treturn this.states.get( id );\n\t},\n\n\t/**\n\t * Sets the active state.\n\t *\n\t * Bail if we're trying to select the current state, if we haven't\n\t * created the `states` collection, or are trying to select a state\n\t * that does not exist.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @param {string} id\n\t *\n\t * @fires wp.media.controller.State#deactivate\n\t * @fires wp.media.controller.State#activate\n\t *\n\t * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining\n\t */\n\tsetState: function( id ) {\n\t\tvar previous = this.state();\n\n\t\tif ( ( previous && id === previous.id ) || ! this.states || ! this.states.get( id ) ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( previous ) {\n\t\t\tprevious.trigger('deactivate');\n\t\t\tthis._lastState = previous.id;\n\t\t}\n\n\t\tthis._state = id;\n\t\tthis.state().trigger('activate');\n\n\t\treturn this;\n\t},\n\n\t/**\n\t * Returns the previous active state.\n\t *\n\t * Call the `state()` method with no parameters to retrieve the current\n\t * active state.\n\t *\n\t * @since 3.5.0\n\t *\n\t * @returns {wp.media.controller.State} Returns a State model\n\t * from the StateMachine collection\n\t */\n\tlastState: function() {\n\t\tif ( this._lastState ) {\n\t\t\treturn this.state( this._lastState );\n\t\t}\n\t}\n});\n\n// Map all event binding and triggering on a StateMachine to its `states` collection.\n_.each([ 'on', 'off', 'trigger' ], function( method ) {\n\t/**\n\t * @function on\n\t * @memberOf wp.media.controller.StateMachine\n\t * @instance\n\t * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.\n\t */\n\t/**\n\t * @function off\n\t * @memberOf wp.media.controller.StateMachine\n\t * @instance\n\t * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.\n\t */\n\t/**\n\t * @function trigger\n\t * @memberOf wp.media.controller.StateMachine\n\t * @instance\n\t * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.\n\t */\n\tStateMachine.prototype[ method ] = function() {\n\t\t// Ensure that the `states` collection exists so the `StateMachine`\n\t\t// can be used as a mixin.\n\t\tthis.states = this.states || new Backbone.Collection();\n\t\t// Forward the method to the `states` collection.\n\t\tthis.states[ method ].apply( this.states, arguments );\n\t\treturn this;\n\t};\n});\n\nmodule.exports = StateMachine;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/state-machine.js?");
- if ( previous ) {
- previous.trigger('deactivate');
- this._lastState = previous.id;
- }
+/***/ }),
- this._state = id;
- this.state().trigger('activate');
+/***/ "./src/wp-includes/js/media/controllers/state.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/controllers/state.js ***!
+ \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- return this;
- },
+eval("/**\n * wp.media.controller.State\n *\n * A state is a step in a workflow that when set will trigger the controllers\n * for the regions to be updated as specified in the frame.\n *\n * A state has an event-driven lifecycle:\n *\n * 'ready' triggers when a state is added to a state machine's collection.\n * 'activate' triggers when a state is activated by a state machine.\n * 'deactivate' triggers when a state is deactivated by a state machine.\n * 'reset' is not triggered automatically. It should be invoked by the\n * proper controller to reset the state to its default.\n *\n * @memberOf wp.media.controller\n *\n * @class\n * @augments Backbone.Model\n */\nvar State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype */{\n\t/**\n\t * Constructor.\n\t *\n\t * @since 3.5.0\n\t */\n\tconstructor: function() {\n\t\tthis.on( 'activate', this._preActivate, this );\n\t\tthis.on( 'activate', this.activate, this );\n\t\tthis.on( 'activate', this._postActivate, this );\n\t\tthis.on( 'deactivate', this._deactivate, this );\n\t\tthis.on( 'deactivate', this.deactivate, this );\n\t\tthis.on( 'reset', this.reset, this );\n\t\tthis.on( 'ready', this._ready, this );\n\t\tthis.on( 'ready', this.ready, this );\n\t\t/**\n\t\t * Call parent constructor with passed arguments\n\t\t */\n\t\tBackbone.Model.apply( this, arguments );\n\t\tthis.on( 'change:menu', this._updateMenu, this );\n\t},\n\t/**\n\t * Ready event callback.\n\t *\n\t * @abstract\n\t * @since 3.5.0\n\t */\n\tready: function() {},\n\n\t/**\n\t * Activate event callback.\n\t *\n\t * @abstract\n\t * @since 3.5.0\n\t */\n\tactivate: function() {},\n\n\t/**\n\t * Deactivate event callback.\n\t *\n\t * @abstract\n\t * @since 3.5.0\n\t */\n\tdeactivate: function() {},\n\n\t/**\n\t * Reset event callback.\n\t *\n\t * @abstract\n\t * @since 3.5.0\n\t */\n\treset: function() {},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_ready: function() {\n\t\tthis._updateMenu();\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t*/\n\t_preActivate: function() {\n\t\tthis.active = true;\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_postActivate: function() {\n\t\tthis.on( 'change:menu', this._menu, this );\n\t\tthis.on( 'change:titleMode', this._title, this );\n\t\tthis.on( 'change:content', this._content, this );\n\t\tthis.on( 'change:toolbar', this._toolbar, this );\n\n\t\tthis.frame.on( 'title:render:default', this._renderTitle, this );\n\n\t\tthis._title();\n\t\tthis._menu();\n\t\tthis._toolbar();\n\t\tthis._content();\n\t\tthis._router();\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_deactivate: function() {\n\t\tthis.active = false;\n\n\t\tthis.frame.off( 'title:render:default', this._renderTitle, this );\n\n\t\tthis.off( 'change:menu', this._menu, this );\n\t\tthis.off( 'change:titleMode', this._title, this );\n\t\tthis.off( 'change:content', this._content, this );\n\t\tthis.off( 'change:toolbar', this._toolbar, this );\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_title: function() {\n\t\tthis.frame.title.render( this.get('titleMode') || 'default' );\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_renderTitle: function( view ) {\n\t\tview.$el.text( this.get('title') || '' );\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_router: function() {\n\t\tvar router = this.frame.router,\n\t\t\tmode = this.get('router'),\n\t\t\tview;\n\n\t\tthis.frame.$el.toggleClass( 'hide-router', ! mode );\n\t\tif ( ! mode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.frame.router.render( mode );\n\n\t\tview = router.get();\n\t\tif ( view && view.select ) {\n\t\t\tview.select( this.frame.content.mode() );\n\t\t}\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_menu: function() {\n\t\tvar menu = this.frame.menu,\n\t\t\tmode = this.get('menu'),\n\t\t\tview;\n\n\t\tthis.frame.$el.toggleClass( 'hide-menu', ! mode );\n\t\tif ( ! mode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmenu.mode( mode );\n\n\t\tview = menu.get();\n\t\tif ( view && view.select ) {\n\t\t\tview.select( this.id );\n\t\t}\n\t},\n\n\t/**\n\t * @access private\n\t * @since 3.5.0\n\t */\n\t_updateMenu: function() {\n\t\tvar previous = this.previous('menu'),\n\t\t\tmenu = this.get('menu');\n\n\t\tif ( previous ) {\n\t\t\tthis.frame.off( 'menu:render:' + previous, this._renderMenu, this );\n\t\t}\n\n\t\tif ( menu ) {\n\t\t\tthis.frame.on( 'menu:render:' + menu, this._renderMenu, this );\n\t\t}\n\t},\n\n\t/**\n\t * Create a view in the media menu for the state.\n\t *\n\t * @access private\n\t * @since 3.5.0\n\t *\n\t * @param {media.view.Menu} view The menu view.\n\t */\n\t_renderMenu: function( view ) {\n\t\tvar menuItem = this.get('menuItem'),\n\t\t\ttitle = this.get('title'),\n\t\t\tpriority = this.get('priority');\n\n\t\tif ( ! menuItem && title ) {\n\t\t\tmenuItem = { text: title };\n\n\t\t\tif ( priority ) {\n\t\t\t\tmenuItem.priority = priority;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! menuItem ) {\n\t\t\treturn;\n\t\t}\n\n\t\tview.set( this.id, menuItem );\n\t}\n});\n\n_.each(['toolbar','content'], function( region ) {\n\t/**\n\t * @access private\n\t */\n\tState.prototype[ '_' + region ] = function() {\n\t\tvar mode = this.get( region );\n\t\tif ( mode ) {\n\t\t\tthis.frame[ region ].render( mode );\n\t\t}\n\t};\n});\n\nmodule.exports = State;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/controllers/state.js?");
- /**
- * Returns the previous active state.
- *
- * Call the `state()` method with no parameters to retrieve the current
- * active state.
- *
- * @since 3.5.0
- *
- * @returns {wp.media.controller.State} Returns a State model
- * from the StateMachine collection
- */
- lastState: function() {
- if ( this._lastState ) {
- return this.state( this._lastState );
- }
- }
-});
+/***/ }),
-// Map all event binding and triggering on a StateMachine to its `states` collection.
-_.each([ 'on', 'off', 'trigger' ], function( method ) {
- /**
- * @function on
- * @memberOf wp.media.controller.StateMachine
- * @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
- */
- /**
- * @function off
- * @memberOf wp.media.controller.StateMachine
- * @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
- */
- /**
- * @function trigger
- * @memberOf wp.media.controller.StateMachine
- * @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
- */
- StateMachine.prototype[ method ] = function() {
- // Ensure that the `states` collection exists so the `StateMachine`
- // can be used as a mixin.
- this.states = this.states || new Backbone.Collection();
- // Forward the method to the `states` collection.
- this.states[ method ].apply( this.states, arguments );
- return this;
- };
-});
+/***/ "./src/wp-includes/js/media/utils/selection-sync.js":
+/*!**********************************************************!*\
+ !*** ./src/wp-includes/js/media/utils/selection-sync.js ***!
+ \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-module.exports = StateMachine;
+eval("/**\n * wp.media.selectionSync\n *\n * Sync an attachments selection in a state with another state.\n *\n * Allows for selecting multiple images in the Add Media workflow, and then\n * switching to the Insert Gallery workflow while preserving the attachments selection.\n *\n * @memberOf wp.media\n *\n * @mixin\n */\nvar selectionSync = {\n\t/**\n\t * @since 3.5.0\n\t */\n\tsyncSelection: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tmanager = this.frame._selection;\n\n\t\tif ( ! this.get('syncSelection') || ! manager || ! selection ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the selection supports multiple items, validate the stored\n\t\t// attachments based on the new selection's conditions. Record\n\t\t// the attachments that are not included; we'll maintain a\n\t\t// reference to those. Other attachments are considered in flux.\n\t\tif ( selection.multiple ) {\n\t\t\tselection.reset( [], { silent: true });\n\t\t\tselection.validateAll( manager.attachments );\n\t\t\tmanager.difference = _.difference( manager.attachments.models, selection.models );\n\t\t}\n\n\t\t// Sync the selection's single item with the master.\n\t\tselection.single( manager.single );\n\t},\n\n\t/**\n\t * Record the currently active attachments, which is a combination\n\t * of the selection's attachments and the set of selected\n\t * attachments that this specific selection considered invalid.\n\t * Reset the difference and record the single attachment.\n\t *\n\t * @since 3.5.0\n\t */\n\trecordSelection: function() {\n\t\tvar selection = this.get('selection'),\n\t\t\tmanager = this.frame._selection;\n\n\t\tif ( ! this.get('syncSelection') || ! manager || ! selection ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( selection.multiple ) {\n\t\t\tmanager.attachments.reset( selection.toArray().concat( manager.difference ) );\n\t\t\tmanager.difference = [];\n\t\t} else {\n\t\t\tmanager.attachments.add( selection.toArray() );\n\t\t}\n\n\t\tmanager.single = selection._single;\n\t}\n};\n\nmodule.exports = selectionSync;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/utils/selection-sync.js?");
-
/***/ }),
-/* 29 */
-/***/ (function(module, exports) {
-/**
- * wp.media.controller.State
- *
- * A state is a step in a workflow that when set will trigger the controllers
- * for the regions to be updated as specified in the frame.
- *
- * A state has an event-driven lifecycle:
- *
- * 'ready' triggers when a state is added to a state machine's collection.
- * 'activate' triggers when a state is activated by a state machine.
- * 'deactivate' triggers when a state is deactivated by a state machine.
- * 'reset' is not triggered automatically. It should be invoked by the
- * proper controller to reset the state to its default.
- *
- * @memberOf wp.media.controller
- *
- * @class
- * @augments Backbone.Model
- */
-var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype */{
- /**
- * Constructor.
- *
- * @since 3.5.0
- */
- constructor: function() {
- this.on( 'activate', this._preActivate, this );
- this.on( 'activate', this.activate, this );
- this.on( 'activate', this._postActivate, this );
- this.on( 'deactivate', this._deactivate, this );
- this.on( 'deactivate', this.deactivate, this );
- this.on( 'reset', this.reset, this );
- this.on( 'ready', this._ready, this );
- this.on( 'ready', this.ready, this );
- /**
- * Call parent constructor with passed arguments
- */
- Backbone.Model.apply( this, arguments );
- this.on( 'change:menu', this._updateMenu, this );
- },
- /**
- * Ready event callback.
- *
- * @abstract
- * @since 3.5.0
- */
- ready: function() {},
+/***/ "./src/wp-includes/js/media/views.manifest.js":
+/*!****************************************************!*\
+ !*** ./src/wp-includes/js/media/views.manifest.js ***!
+ \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
- /**
- * Activate event callback.
- *
- * @abstract
- * @since 3.5.0
- */
- activate: function() {},
+eval("var media = wp.media,\n\t$ = jQuery,\n\tl10n;\n\nmedia.isTouchDevice = ( 'ontouchend' in document );\n\n// Link any localized strings.\nl10n = media.view.l10n = window._wpMediaViewsL10n || {};\n\n// Link any settings.\nmedia.view.settings = l10n.settings || {};\ndelete l10n.settings;\n\n// Copy the `post` setting over to the model settings.\nmedia.model.settings.post = media.view.settings.post;\n\n// Check if the browser supports CSS 3.0 transitions\n$.support.transition = (function(){\n\tvar style = document.documentElement.style,\n\t\ttransitions = {\n\t\t\tWebkitTransition: 'webkitTransitionEnd',\n\t\t\tMozTransition: 'transitionend',\n\t\t\tOTransition: 'oTransitionEnd otransitionend',\n\t\t\ttransition: 'transitionend'\n\t\t}, transition;\n\n\ttransition = _.find( _.keys( transitions ), function( transition ) {\n\t\treturn ! _.isUndefined( style[ transition ] );\n\t});\n\n\treturn transition && {\n\t\tend: transitions[ transition ]\n\t};\n}());\n\n/**\n * A shared event bus used to provide events into\n * the media workflows that 3rd-party devs can use to hook\n * in.\n */\nmedia.events = _.extend( {}, Backbone.Events );\n\n/**\n * Makes it easier to bind events using transitions.\n *\n * @param {string} selector\n * @param {Number} sensitivity\n * @returns {Promise}\n */\nmedia.transition = function( selector, sensitivity ) {\n\tvar deferred = $.Deferred();\n\n\tsensitivity = sensitivity || 2000;\n\n\tif ( $.support.transition ) {\n\t\tif ( ! (selector instanceof $) ) {\n\t\t\tselector = $( selector );\n\t\t}\n\n\t\t// Resolve the deferred when the first element finishes animating.\n\t\tselector.first().one( $.support.transition.end, deferred.resolve );\n\n\t\t// Just in case the event doesn't trigger, fire a callback.\n\t\t_.delay( deferred.resolve, sensitivity );\n\n\t// Otherwise, execute on the spot.\n\t} else {\n\t\tdeferred.resolve();\n\t}\n\n\treturn deferred.promise();\n};\n\nmedia.controller.Region = __webpack_require__( /*! ./controllers/region.js */ \"./src/wp-includes/js/media/controllers/region.js\" );\nmedia.controller.StateMachine = __webpack_require__( /*! ./controllers/state-machine.js */ \"./src/wp-includes/js/media/controllers/state-machine.js\" );\nmedia.controller.State = __webpack_require__( /*! ./controllers/state.js */ \"./src/wp-includes/js/media/controllers/state.js\" );\n\nmedia.selectionSync = __webpack_require__( /*! ./utils/selection-sync.js */ \"./src/wp-includes/js/media/utils/selection-sync.js\" );\nmedia.controller.Library = __webpack_require__( /*! ./controllers/library.js */ \"./src/wp-includes/js/media/controllers/library.js\" );\nmedia.controller.ImageDetails = __webpack_require__( /*! ./controllers/image-details.js */ \"./src/wp-includes/js/media/controllers/image-details.js\" );\nmedia.controller.GalleryEdit = __webpack_require__( /*! ./controllers/gallery-edit.js */ \"./src/wp-includes/js/media/controllers/gallery-edit.js\" );\nmedia.controller.GalleryAdd = __webpack_require__( /*! ./controllers/gallery-add.js */ \"./src/wp-includes/js/media/controllers/gallery-add.js\" );\nmedia.controller.CollectionEdit = __webpack_require__( /*! ./controllers/collection-edit.js */ \"./src/wp-includes/js/media/controllers/collection-edit.js\" );\nmedia.controller.CollectionAdd = __webpack_require__( /*! ./controllers/collection-add.js */ \"./src/wp-includes/js/media/controllers/collection-add.js\" );\nmedia.controller.FeaturedImage = __webpack_require__( /*! ./controllers/featured-image.js */ \"./src/wp-includes/js/media/controllers/featured-image.js\" );\nmedia.controller.ReplaceImage = __webpack_require__( /*! ./controllers/replace-image.js */ \"./src/wp-includes/js/media/controllers/replace-image.js\" );\nmedia.controller.EditImage = __webpack_require__( /*! ./controllers/edit-image.js */ \"./src/wp-includes/js/media/controllers/edit-image.js\" );\nmedia.controller.MediaLibrary = __webpack_require__( /*! ./controllers/media-library.js */ \"./src/wp-includes/js/media/controllers/media-library.js\" );\nmedia.controller.Embed = __webpack_require__( /*! ./controllers/embed.js */ \"./src/wp-includes/js/media/controllers/embed.js\" );\nmedia.controller.Cropper = __webpack_require__( /*! ./controllers/cropper.js */ \"./src/wp-includes/js/media/controllers/cropper.js\" );\nmedia.controller.CustomizeImageCropper = __webpack_require__( /*! ./controllers/customize-image-cropper.js */ \"./src/wp-includes/js/media/controllers/customize-image-cropper.js\" );\nmedia.controller.SiteIconCropper = __webpack_require__( /*! ./controllers/site-icon-cropper.js */ \"./src/wp-includes/js/media/controllers/site-icon-cropper.js\" );\n\nmedia.View = __webpack_require__( /*! ./views/view.js */ \"./src/wp-includes/js/media/views/view.js\" );\nmedia.view.Frame = __webpack_require__( /*! ./views/frame.js */ \"./src/wp-includes/js/media/views/frame.js\" );\nmedia.view.MediaFrame = __webpack_require__( /*! ./views/media-frame.js */ \"./src/wp-includes/js/media/views/media-frame.js\" );\nmedia.view.MediaFrame.Select = __webpack_require__( /*! ./views/frame/select.js */ \"./src/wp-includes/js/media/views/frame/select.js\" );\nmedia.view.MediaFrame.Post = __webpack_require__( /*! ./views/frame/post.js */ \"./src/wp-includes/js/media/views/frame/post.js\" );\nmedia.view.MediaFrame.ImageDetails = __webpack_require__( /*! ./views/frame/image-details.js */ \"./src/wp-includes/js/media/views/frame/image-details.js\" );\nmedia.view.Modal = __webpack_require__( /*! ./views/modal.js */ \"./src/wp-includes/js/media/views/modal.js\" );\nmedia.view.FocusManager = __webpack_require__( /*! ./views/focus-manager.js */ \"./src/wp-includes/js/media/views/focus-manager.js\" );\nmedia.view.UploaderWindow = __webpack_require__( /*! ./views/uploader/window.js */ \"./src/wp-includes/js/media/views/uploader/window.js\" );\nmedia.view.EditorUploader = __webpack_require__( /*! ./views/uploader/editor.js */ \"./src/wp-includes/js/media/views/uploader/editor.js\" );\nmedia.view.UploaderInline = __webpack_require__( /*! ./views/uploader/inline.js */ \"./src/wp-includes/js/media/views/uploader/inline.js\" );\nmedia.view.UploaderStatus = __webpack_require__( /*! ./views/uploader/status.js */ \"./src/wp-includes/js/media/views/uploader/status.js\" );\nmedia.view.UploaderStatusError = __webpack_require__( /*! ./views/uploader/status-error.js */ \"./src/wp-includes/js/media/views/uploader/status-error.js\" );\nmedia.view.Toolbar = __webpack_require__( /*! ./views/toolbar.js */ \"./src/wp-includes/js/media/views/toolbar.js\" );\nmedia.view.Toolbar.Select = __webpack_require__( /*! ./views/toolbar/select.js */ \"./src/wp-includes/js/media/views/toolbar/select.js\" );\nmedia.view.Toolbar.Embed = __webpack_require__( /*! ./views/toolbar/embed.js */ \"./src/wp-includes/js/media/views/toolbar/embed.js\" );\nmedia.view.Button = __webpack_require__( /*! ./views/button.js */ \"./src/wp-includes/js/media/views/button.js\" );\nmedia.view.ButtonGroup = __webpack_require__( /*! ./views/button-group.js */ \"./src/wp-includes/js/media/views/button-group.js\" );\nmedia.view.PriorityList = __webpack_require__( /*! ./views/priority-list.js */ \"./src/wp-includes/js/media/views/priority-list.js\" );\nmedia.view.MenuItem = __webpack_require__( /*! ./views/menu-item.js */ \"./src/wp-includes/js/media/views/menu-item.js\" );\nmedia.view.Menu = __webpack_require__( /*! ./views/menu.js */ \"./src/wp-includes/js/media/views/menu.js\" );\nmedia.view.RouterItem = __webpack_require__( /*! ./views/router-item.js */ \"./src/wp-includes/js/media/views/router-item.js\" );\nmedia.view.Router = __webpack_require__( /*! ./views/router.js */ \"./src/wp-includes/js/media/views/router.js\" );\nmedia.view.Sidebar = __webpack_require__( /*! ./views/sidebar.js */ \"./src/wp-includes/js/media/views/sidebar.js\" );\nmedia.view.Attachment = __webpack_require__( /*! ./views/attachment.js */ \"./src/wp-includes/js/media/views/attachment.js\" );\nmedia.view.Attachment.Library = __webpack_require__( /*! ./views/attachment/library.js */ \"./src/wp-includes/js/media/views/attachment/library.js\" );\nmedia.view.Attachment.EditLibrary = __webpack_require__( /*! ./views/attachment/edit-library.js */ \"./src/wp-includes/js/media/views/attachment/edit-library.js\" );\nmedia.view.Attachments = __webpack_require__( /*! ./views/attachments.js */ \"./src/wp-includes/js/media/views/attachments.js\" );\nmedia.view.Search = __webpack_require__( /*! ./views/search.js */ \"./src/wp-includes/js/media/views/search.js\" );\nmedia.view.AttachmentFilters = __webpack_require__( /*! ./views/attachment-filters.js */ \"./src/wp-includes/js/media/views/attachment-filters.js\" );\nmedia.view.DateFilter = __webpack_require__( /*! ./views/attachment-filters/date.js */ \"./src/wp-includes/js/media/views/attachment-filters/date.js\" );\nmedia.view.AttachmentFilters.Uploaded = __webpack_require__( /*! ./views/attachment-filters/uploaded.js */ \"./src/wp-includes/js/media/views/attachment-filters/uploaded.js\" );\nmedia.view.AttachmentFilters.All = __webpack_require__( /*! ./views/attachment-filters/all.js */ \"./src/wp-includes/js/media/views/attachment-filters/all.js\" );\nmedia.view.AttachmentsBrowser = __webpack_require__( /*! ./views/attachments/browser.js */ \"./src/wp-includes/js/media/views/attachments/browser.js\" );\nmedia.view.Selection = __webpack_require__( /*! ./views/selection.js */ \"./src/wp-includes/js/media/views/selection.js\" );\nmedia.view.Attachment.Selection = __webpack_require__( /*! ./views/attachment/selection.js */ \"./src/wp-includes/js/media/views/attachment/selection.js\" );\nmedia.view.Attachments.Selection = __webpack_require__( /*! ./views/attachments/selection.js */ \"./src/wp-includes/js/media/views/attachments/selection.js\" );\nmedia.view.Attachment.EditSelection = __webpack_require__( /*! ./views/attachment/edit-selection.js */ \"./src/wp-includes/js/media/views/attachment/edit-selection.js\" );\nmedia.view.Settings = __webpack_require__( /*! ./views/settings.js */ \"./src/wp-includes/js/media/views/settings.js\" );\nmedia.view.Settings.AttachmentDisplay = __webpack_require__( /*! ./views/settings/attachment-display.js */ \"./src/wp-includes/js/media/views/settings/attachment-display.js\" );\nmedia.view.Settings.Gallery = __webpack_require__( /*! ./views/settings/gallery.js */ \"./src/wp-includes/js/media/views/settings/gallery.js\" );\nmedia.view.Settings.Playlist = __webpack_require__( /*! ./views/settings/playlist.js */ \"./src/wp-includes/js/media/views/settings/playlist.js\" );\nmedia.view.Attachment.Details = __webpack_require__( /*! ./views/attachment/details.js */ \"./src/wp-includes/js/media/views/attachment/details.js\" );\nmedia.view.AttachmentCompat = __webpack_require__( /*! ./views/attachment-compat.js */ \"./src/wp-includes/js/media/views/attachment-compat.js\" );\nmedia.view.Iframe = __webpack_require__( /*! ./views/iframe.js */ \"./src/wp-includes/js/media/views/iframe.js\" );\nmedia.view.Embed = __webpack_require__( /*! ./views/embed.js */ \"./src/wp-includes/js/media/views/embed.js\" );\nmedia.view.Label = __webpack_require__( /*! ./views/label.js */ \"./src/wp-includes/js/media/views/label.js\" );\nmedia.view.EmbedUrl = __webpack_require__( /*! ./views/embed/url.js */ \"./src/wp-includes/js/media/views/embed/url.js\" );\nmedia.view.EmbedLink = __webpack_require__( /*! ./views/embed/link.js */ \"./src/wp-includes/js/media/views/embed/link.js\" );\nmedia.view.EmbedImage = __webpack_require__( /*! ./views/embed/image.js */ \"./src/wp-includes/js/media/views/embed/image.js\" );\nmedia.view.ImageDetails = __webpack_require__( /*! ./views/image-details.js */ \"./src/wp-includes/js/media/views/image-details.js\" );\nmedia.view.Cropper = __webpack_require__( /*! ./views/cropper.js */ \"./src/wp-includes/js/media/views/cropper.js\" );\nmedia.view.SiteIconCropper = __webpack_require__( /*! ./views/site-icon-cropper.js */ \"./src/wp-includes/js/media/views/site-icon-cropper.js\" );\nmedia.view.SiteIconPreview = __webpack_require__( /*! ./views/site-icon-preview.js */ \"./src/wp-includes/js/media/views/site-icon-preview.js\" );\nmedia.view.EditImage = __webpack_require__( /*! ./views/edit-image.js */ \"./src/wp-includes/js/media/views/edit-image.js\" );\nmedia.view.Spinner = __webpack_require__( /*! ./views/spinner.js */ \"./src/wp-includes/js/media/views/spinner.js\" );\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views.manifest.js?");
- /**
- * Deactivate event callback.
- *
- * @abstract
- * @since 3.5.0
- */
- deactivate: function() {},
+/***/ }),
- /**
- * Reset event callback.
- *
- * @abstract
- * @since 3.5.0
- */
- reset: function() {},
+/***/ "./src/wp-includes/js/media/views/attachment-compat.js":
+/*!*************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment-compat.js ***!
+ \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * @access private
- * @since 3.5.0
- */
- _ready: function() {
- this._updateMenu();
- },
+eval("var View = wp.media.View,\n\tAttachmentCompat;\n\n/**\n * wp.media.view.AttachmentCompat\n *\n * A view to display fields added via the `attachment_fields_to_edit` filter.\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototype */{\n\ttagName: 'form',\n\tclassName: 'compat-item',\n\n\tevents: {\n\t\t'submit': 'preventDefault',\n\t\t'change input': 'save',\n\t\t'change select': 'save',\n\t\t'change textarea': 'save'\n\t},\n\n\tinitialize: function() {\n\t\tthis.listenTo( this.model, 'change:compat', this.render );\n\t},\n\t/**\n\t * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining\n\t */\n\tdispose: function() {\n\t\tif ( this.$(':focus').length ) {\n\t\t\tthis.save();\n\t\t}\n\t\t/**\n\t\t * call 'dispose' directly on the parent class\n\t\t */\n\t\treturn View.prototype.dispose.apply( this, arguments );\n\t},\n\t/**\n\t * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining\n\t */\n\trender: function() {\n\t\tvar compat = this.model.get('compat');\n\t\tif ( ! compat || ! compat.item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.views.detach();\n\t\tthis.$el.html( compat.item );\n\t\tthis.views.render();\n\t\treturn this;\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tpreventDefault: function( event ) {\n\t\tevent.preventDefault();\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tsave: function( event ) {\n\t\tvar data = {};\n\n\t\tif ( event ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t_.each( this.$el.serializeArray(), function( pair ) {\n\t\t\tdata[ pair.name ] = pair.value;\n\t\t});\n\n\t\tthis.controller.trigger( 'attachment:compat:waiting', ['waiting'] );\n\t\tthis.model.saveCompat( data ).always( _.bind( this.postSave, this ) );\n\t},\n\n\tpostSave: function() {\n\t\tthis.controller.trigger( 'attachment:compat:ready', ['ready'] );\n\t}\n});\n\nmodule.exports = AttachmentCompat;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment-compat.js?");
- /**
- * @access private
- * @since 3.5.0
- */
- _preActivate: function() {
- this.active = true;
- },
+/***/ }),
- /**
- * @access private
- * @since 3.5.0
- */
- _postActivate: function() {
- this.on( 'change:menu', this._menu, this );
- this.on( 'change:titleMode', this._title, this );
- this.on( 'change:content', this._content, this );
- this.on( 'change:toolbar', this._toolbar, this );
+/***/ "./src/wp-includes/js/media/views/attachment-filters.js":
+/*!**************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment-filters.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.frame.on( 'title:render:default', this._renderTitle, this );
+eval("var $ = jQuery,\n\tAttachmentFilters;\n\n/**\n * wp.media.view.AttachmentFilters\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAttachmentFilters = wp.media.View.extend(/** @lends wp.media.view.AttachmentFilters.prototype */{\n\ttagName: 'select',\n\tclassName: 'attachment-filters',\n\tid: 'media-attachment-filters',\n\n\tevents: {\n\t\tchange: 'change'\n\t},\n\n\tkeys: [],\n\n\tinitialize: function() {\n\t\tthis.createFilters();\n\t\t_.extend( this.filters, this.options.filters );\n\n\t\t// Build `' ).val( value ).html( filter.text )[0],\n\t\t\t\tpriority: filter.priority || 50\n\t\t\t};\n\t\t}, this ).sortBy('priority').pluck('el').value() );\n\n\t\tthis.listenTo( this.model, 'change', this.select );\n\t\tthis.select();\n\t},\n\n\t/**\n\t * @abstract\n\t */\n\tcreateFilters: function() {\n\t\tthis.filters = {};\n\t},\n\n\t/**\n\t * When the selected filter changes, update the Attachment Query properties to match.\n\t */\n\tchange: function() {\n\t\tvar filter = this.filters[ this.el.value ];\n\t\tif ( filter ) {\n\t\t\tthis.model.set( filter.props );\n\t\t}\n\t},\n\n\tselect: function() {\n\t\tvar model = this.model,\n\t\t\tvalue = 'all',\n\t\t\tprops = model.toJSON();\n\n\t\t_.find( this.filters, function( filter, id ) {\n\t\t\tvar equal = _.all( filter.props, function( prop, key ) {\n\t\t\t\treturn prop === ( _.isUndefined( props[ key ] ) ? null : props[ key ] );\n\t\t\t});\n\n\t\t\tif ( equal ) {\n\t\t\t\treturn value = id;\n\t\t\t}\n\t\t});\n\n\t\tthis.$el.val( value );\n\t}\n});\n\nmodule.exports = AttachmentFilters;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment-filters.js?");
- this._title();
- this._menu();
- this._toolbar();
- this._content();
- this._router();
- },
+/***/ }),
- /**
- * @access private
- * @since 3.5.0
- */
- _deactivate: function() {
- this.active = false;
+/***/ "./src/wp-includes/js/media/views/attachment-filters/all.js":
+/*!******************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment-filters/all.js ***!
+ \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.frame.off( 'title:render:default', this._renderTitle, this );
+eval("var l10n = wp.media.view.l10n,\n\tAll;\n\n/**\n * wp.media.view.AttachmentFilters.All\n *\n * @memberOf wp.media.view.AttachmentFilters\n *\n * @class\n * @augments wp.media.view.AttachmentFilters\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAll = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.All.prototype */{\n\tcreateFilters: function() {\n\t\tvar filters = {},\n\t\t\tuid = window.userSettings ? parseInt( window.userSettings.uid, 10 ) : 0;\n\n\t\t_.each( wp.media.view.settings.mimeTypes || {}, function( text, key ) {\n\t\t\tfilters[ key ] = {\n\t\t\t\ttext: text,\n\t\t\t\tprops: {\n\t\t\t\t\tstatus: null,\n\t\t\t\t\ttype: key,\n\t\t\t\t\tuploadedTo: null,\n\t\t\t\t\torderby: 'date',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t\tauthor: null\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\n\t\tfilters.all = {\n\t\t\ttext: l10n.allMediaItems,\n\t\t\tprops: {\n\t\t\t\tstatus: null,\n\t\t\t\ttype: null,\n\t\t\t\tuploadedTo: null,\n\t\t\t\torderby: 'date',\n\t\t\t\torder: 'DESC',\n\t\t\t\tauthor: null\n\t\t\t},\n\t\t\tpriority: 10\n\t\t};\n\n\t\tif ( wp.media.view.settings.post.id ) {\n\t\t\tfilters.uploaded = {\n\t\t\t\ttext: l10n.uploadedToThisPost,\n\t\t\t\tprops: {\n\t\t\t\t\tstatus: null,\n\t\t\t\t\ttype: null,\n\t\t\t\t\tuploadedTo: wp.media.view.settings.post.id,\n\t\t\t\t\torderby: 'menuOrder',\n\t\t\t\t\torder: 'ASC',\n\t\t\t\t\tauthor: null\n\t\t\t\t},\n\t\t\t\tpriority: 20\n\t\t\t};\n\t\t}\n\n\t\tfilters.unattached = {\n\t\t\ttext: l10n.unattached,\n\t\t\tprops: {\n\t\t\t\tstatus: null,\n\t\t\t\tuploadedTo: 0,\n\t\t\t\ttype: null,\n\t\t\t\torderby: 'menuOrder',\n\t\t\t\torder: 'ASC',\n\t\t\t\tauthor: null\n\t\t\t},\n\t\t\tpriority: 50\n\t\t};\n\n\t\tif ( uid ) {\n\t\t\tfilters.mine = {\n\t\t\t\ttext: l10n.mine,\n\t\t\t\tprops: {\n\t\t\t\t\tstatus:\t\tnull,\n\t\t\t\t\ttype:\t\tnull,\n\t\t\t\t\tuploadedTo:\tnull,\n\t\t\t\t\torderby:\t'date',\n\t\t\t\t\torder:\t\t'DESC',\n\t\t\t\t\tauthor:\t\tuid\n\t\t\t\t},\n\t\t\t\tpriority: 50\n\t\t\t};\n\t\t}\n\n\t\tif ( wp.media.view.settings.mediaTrash &&\n\t\t\tthis.controller.isModeActive( 'grid' ) ) {\n\n\t\t\tfilters.trash = {\n\t\t\t\ttext: l10n.trash,\n\t\t\t\tprops: {\n\t\t\t\t\tuploadedTo: null,\n\t\t\t\t\tstatus: 'trash',\n\t\t\t\t\ttype: null,\n\t\t\t\t\torderby: 'date',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t\tauthor: null\n\t\t\t\t},\n\t\t\t\tpriority: 50\n\t\t\t};\n\t\t}\n\n\t\tthis.filters = filters;\n\t}\n});\n\nmodule.exports = All;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment-filters/all.js?");
- this.off( 'change:menu', this._menu, this );
- this.off( 'change:titleMode', this._title, this );
- this.off( 'change:content', this._content, this );
- this.off( 'change:toolbar', this._toolbar, this );
- },
+/***/ }),
- /**
- * @access private
- * @since 3.5.0
- */
- _title: function() {
- this.frame.title.render( this.get('titleMode') || 'default' );
- },
+/***/ "./src/wp-includes/js/media/views/attachment-filters/date.js":
+/*!*******************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment-filters/date.js ***!
+ \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * @access private
- * @since 3.5.0
- */
- _renderTitle: function( view ) {
- view.$el.text( this.get('title') || '' );
- },
+eval("var l10n = wp.media.view.l10n,\n\tDateFilter;\n\n/**\n * A filter dropdown for month/dates.\n *\n * @memberOf wp.media.view.AttachmentFilters\n *\n * @class\n * @augments wp.media.view.AttachmentFilters\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nDateFilter = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Date.prototype */{\n\tid: 'media-attachment-date-filters',\n\n\tcreateFilters: function() {\n\t\tvar filters = {};\n\t\t_.each( wp.media.view.settings.months || {}, function( value, index ) {\n\t\t\tfilters[ index ] = {\n\t\t\t\ttext: value.text,\n\t\t\t\tprops: {\n\t\t\t\t\tyear: value.year,\n\t\t\t\t\tmonthnum: value.month\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t\tfilters.all = {\n\t\t\ttext: l10n.allDates,\n\t\t\tprops: {\n\t\t\t\tmonthnum: false,\n\t\t\t\tyear: false\n\t\t\t},\n\t\t\tpriority: 10\n\t\t};\n\t\tthis.filters = filters;\n\t}\n});\n\nmodule.exports = DateFilter;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment-filters/date.js?");
- /**
- * @access private
- * @since 3.5.0
- */
- _router: function() {
- var router = this.frame.router,
- mode = this.get('router'),
- view;
+/***/ }),
- this.frame.$el.toggleClass( 'hide-router', ! mode );
- if ( ! mode ) {
- return;
- }
+/***/ "./src/wp-includes/js/media/views/attachment-filters/uploaded.js":
+/*!***********************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment-filters/uploaded.js ***!
+ \***********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.frame.router.render( mode );
+eval("var l10n = wp.media.view.l10n,\n\tUploaded;\n\n/**\n * wp.media.view.AttachmentFilters.Uploaded\n *\n * @memberOf wp.media.view.AttachmentFilters\n *\n * @class\n * @augments wp.media.view.AttachmentFilters\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nUploaded = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Uploaded.prototype */{\n\tcreateFilters: function() {\n\t\tvar type = this.model.get('type'),\n\t\t\ttypes = wp.media.view.settings.mimeTypes,\n\t\t\tuid = window.userSettings ? parseInt( window.userSettings.uid, 10 ) : 0,\n\t\t\ttext;\n\n\t\tif ( types && type ) {\n\t\t\ttext = types[ type ];\n\t\t}\n\n\t\tthis.filters = {\n\t\t\tall: {\n\t\t\t\ttext: text || l10n.allMediaItems,\n\t\t\t\tprops: {\n\t\t\t\t\tuploadedTo: null,\n\t\t\t\t\torderby: 'date',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t\tauthor:\t null\n\t\t\t\t},\n\t\t\t\tpriority: 10\n\t\t\t},\n\n\t\t\tuploaded: {\n\t\t\t\ttext: l10n.uploadedToThisPost,\n\t\t\t\tprops: {\n\t\t\t\t\tuploadedTo: wp.media.view.settings.post.id,\n\t\t\t\t\torderby: 'menuOrder',\n\t\t\t\t\torder: 'ASC',\n\t\t\t\t\tauthor:\t null\n\t\t\t\t},\n\t\t\t\tpriority: 20\n\t\t\t},\n\n\t\t\tunattached: {\n\t\t\t\ttext: l10n.unattached,\n\t\t\t\tprops: {\n\t\t\t\t\tuploadedTo: 0,\n\t\t\t\t\torderby: 'menuOrder',\n\t\t\t\t\torder: 'ASC',\n\t\t\t\t\tauthor:\t null\n\t\t\t\t},\n\t\t\t\tpriority: 50\n\t\t\t}\n\t\t};\n\n\t\tif ( uid ) {\n\t\t\tthis.filters.mine = {\n\t\t\t\ttext: l10n.mine,\n\t\t\t\tprops: {\n\t\t\t\t\torderby: 'date',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t\tauthor: uid\n\t\t\t\t},\n\t\t\t\tpriority: 50\n\t\t\t};\n\t\t}\n\t}\n});\n\nmodule.exports = Uploaded;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment-filters/uploaded.js?");
- view = router.get();
- if ( view && view.select ) {
- view.select( this.frame.content.mode() );
- }
- },
+/***/ }),
- /**
- * @access private
- * @since 3.5.0
- */
- _menu: function() {
- var menu = this.frame.menu,
- mode = this.get('menu'),
- view;
+/***/ "./src/wp-includes/js/media/views/attachment.js":
+/*!******************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment.js ***!
+ \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- this.frame.$el.toggleClass( 'hide-menu', ! mode );
- if ( ! mode ) {
- return;
- }
+eval("var View = wp.media.View,\n\t$ = jQuery,\n\tAttachment;\n\n/**\n * wp.media.view.Attachment\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAttachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{\n\ttagName: 'li',\n\tclassName: 'attachment',\n\ttemplate: wp.template('attachment'),\n\n\tattributes: function() {\n\t\treturn {\n\t\t\t'tabIndex': 0,\n\t\t\t'role': 'checkbox',\n\t\t\t'aria-label': this.model.get( 'title' ),\n\t\t\t'aria-checked': false,\n\t\t\t'data-id': this.model.get( 'id' )\n\t\t};\n\t},\n\n\tevents: {\n\t\t'click': 'toggleSelectionHandler',\n\t\t'change [data-setting]': 'updateSetting',\n\t\t'change [data-setting] input': 'updateSetting',\n\t\t'change [data-setting] select': 'updateSetting',\n\t\t'change [data-setting] textarea': 'updateSetting',\n\t\t'click .attachment-close': 'removeFromLibrary',\n\t\t'click .check': 'checkClickHandler',\n\t\t'keydown': 'toggleSelectionHandler'\n\t},\n\n\tbuttons: {},\n\n\tinitialize: function() {\n\t\tvar selection = this.options.selection,\n\t\t\toptions = _.defaults( this.options, {\n\t\t\t\trerenderOnModelChange: true\n\t\t\t} );\n\n\t\tif ( options.rerenderOnModelChange ) {\n\t\t\tthis.listenTo( this.model, 'change', this.render );\n\t\t} else {\n\t\t\tthis.listenTo( this.model, 'change:percent', this.progress );\n\t\t}\n\t\tthis.listenTo( this.model, 'change:title', this._syncTitle );\n\t\tthis.listenTo( this.model, 'change:caption', this._syncCaption );\n\t\tthis.listenTo( this.model, 'change:artist', this._syncArtist );\n\t\tthis.listenTo( this.model, 'change:album', this._syncAlbum );\n\n\t\t// Update the selection.\n\t\tthis.listenTo( this.model, 'add', this.select );\n\t\tthis.listenTo( this.model, 'remove', this.deselect );\n\t\tif ( selection ) {\n\t\t\tselection.on( 'reset', this.updateSelect, this );\n\t\t\t// Update the model's details view.\n\t\t\tthis.listenTo( this.model, 'selection:single selection:unsingle', this.details );\n\t\t\tthis.details( this.model, this.controller.state().get('selection') );\n\t\t}\n\n\t\tthis.listenTo( this.controller, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );\n\t},\n\t/**\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\tdispose: function() {\n\t\tvar selection = this.options.selection;\n\n\t\t// Make sure all settings are saved before removing the view.\n\t\tthis.updateAll();\n\n\t\tif ( selection ) {\n\t\t\tselection.off( null, null, this );\n\t\t}\n\t\t/**\n\t\t * call 'dispose' directly on the parent class\n\t\t */\n\t\tView.prototype.dispose.apply( this, arguments );\n\t\treturn this;\n\t},\n\t/**\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\trender: function() {\n\t\tvar options = _.defaults( this.model.toJSON(), {\n\t\t\t\torientation: 'landscape',\n\t\t\t\tuploading: false,\n\t\t\t\ttype: '',\n\t\t\t\tsubtype: '',\n\t\t\t\ticon: '',\n\t\t\t\tfilename: '',\n\t\t\t\tcaption: '',\n\t\t\t\ttitle: '',\n\t\t\t\tdateFormatted: '',\n\t\t\t\twidth: '',\n\t\t\t\theight: '',\n\t\t\t\tcompat: false,\n\t\t\t\talt: '',\n\t\t\t\tdescription: ''\n\t\t\t}, this.options );\n\n\t\toptions.buttons = this.buttons;\n\t\toptions.describe = this.controller.state().get('describe');\n\n\t\tif ( 'image' === options.type ) {\n\t\t\toptions.size = this.imageSize();\n\t\t}\n\n\t\toptions.can = {};\n\t\tif ( options.nonces ) {\n\t\t\toptions.can.remove = !! options.nonces['delete'];\n\t\t\toptions.can.save = !! options.nonces.update;\n\t\t}\n\n\t\tif ( this.controller.state().get('allowLocalEdits') ) {\n\t\t\toptions.allowLocalEdits = true;\n\t\t}\n\n\t\tif ( options.uploading && ! options.percent ) {\n\t\t\toptions.percent = 0;\n\t\t}\n\n\t\tthis.views.detach();\n\t\tthis.$el.html( this.template( options ) );\n\n\t\tthis.$el.toggleClass( 'uploading', options.uploading );\n\n\t\tif ( options.uploading ) {\n\t\t\tthis.$bar = this.$('.media-progress-bar div');\n\t\t} else {\n\t\t\tdelete this.$bar;\n\t\t}\n\n\t\t// Check if the model is selected.\n\t\tthis.updateSelect();\n\n\t\t// Update the save status.\n\t\tthis.updateSave();\n\n\t\tthis.views.render();\n\n\t\treturn this;\n\t},\n\n\tprogress: function() {\n\t\tif ( this.$bar && this.$bar.length ) {\n\t\t\tthis.$bar.width( this.model.get('percent') + '%' );\n\t\t}\n\t},\n\n\t/**\n\t * @param {Object} event\n\t */\n\ttoggleSelectionHandler: function( event ) {\n\t\tvar method;\n\n\t\t// Don't do anything inside inputs and on the attachment check and remove buttons.\n\t\tif ( 'INPUT' === event.target.nodeName || 'BUTTON' === event.target.nodeName ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Catch arrow events\n\t\tif ( 37 === event.keyCode || 38 === event.keyCode || 39 === event.keyCode || 40 === event.keyCode ) {\n\t\t\tthis.controller.trigger( 'attachment:keydown:arrow', event );\n\t\t\treturn;\n\t\t}\n\n\t\t// Catch enter and space events\n\t\tif ( 'keydown' === event.type && 13 !== event.keyCode && 32 !== event.keyCode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\t// In the grid view, bubble up an edit:attachment event to the controller.\n\t\tif ( this.controller.isModeActive( 'grid' ) ) {\n\t\t\tif ( this.controller.isModeActive( 'edit' ) ) {\n\t\t\t\t// Pass the current target to restore focus when closing\n\t\t\t\tthis.controller.trigger( 'edit:attachment', this.model, event.currentTarget );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.controller.isModeActive( 'select' ) ) {\n\t\t\t\tmethod = 'toggle';\n\t\t\t}\n\t\t}\n\n\t\tif ( event.shiftKey ) {\n\t\t\tmethod = 'between';\n\t\t} else if ( event.ctrlKey || event.metaKey ) {\n\t\t\tmethod = 'toggle';\n\t\t}\n\n\t\tthis.toggleSelection({\n\t\t\tmethod: method\n\t\t});\n\n\t\tthis.controller.trigger( 'selection:toggle' );\n\t},\n\t/**\n\t * @param {Object} options\n\t */\n\ttoggleSelection: function( options ) {\n\t\tvar collection = this.collection,\n\t\t\tselection = this.options.selection,\n\t\t\tmodel = this.model,\n\t\t\tmethod = options && options.method,\n\t\t\tsingle, models, singleIndex, modelIndex;\n\n\t\tif ( ! selection ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsingle = selection.single();\n\t\tmethod = _.isUndefined( method ) ? selection.multiple : method;\n\n\t\t// If the `method` is set to `between`, select all models that\n\t\t// exist between the current and the selected model.\n\t\tif ( 'between' === method && single && selection.multiple ) {\n\t\t\t// If the models are the same, short-circuit.\n\t\t\tif ( single === model ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsingleIndex = collection.indexOf( single );\n\t\t\tmodelIndex = collection.indexOf( this.model );\n\n\t\t\tif ( singleIndex < modelIndex ) {\n\t\t\t\tmodels = collection.models.slice( singleIndex, modelIndex + 1 );\n\t\t\t} else {\n\t\t\t\tmodels = collection.models.slice( modelIndex, singleIndex + 1 );\n\t\t\t}\n\n\t\t\tselection.add( models );\n\t\t\tselection.single( model );\n\t\t\treturn;\n\n\t\t// If the `method` is set to `toggle`, just flip the selection\n\t\t// status, regardless of whether the model is the single model.\n\t\t} else if ( 'toggle' === method ) {\n\t\t\tselection[ this.selected() ? 'remove' : 'add' ]( model );\n\t\t\tselection.single( model );\n\t\t\treturn;\n\t\t} else if ( 'add' === method ) {\n\t\t\tselection.add( model );\n\t\t\tselection.single( model );\n\t\t\treturn;\n\t\t}\n\n\t\t// Fixes bug that loses focus when selecting a featured image\n\t\tif ( ! method ) {\n\t\t\tmethod = 'add';\n\t\t}\n\n\t\tif ( method !== 'add' ) {\n\t\t\tmethod = 'reset';\n\t\t}\n\n\t\tif ( this.selected() ) {\n\t\t\t// If the model is the single model, remove it.\n\t\t\t// If it is not the same as the single model,\n\t\t\t// it now becomes the single model.\n\t\t\tselection[ single === model ? 'remove' : 'single' ]( model );\n\t\t} else {\n\t\t\t// If the model is not selected, run the `method` on the\n\t\t\t// selection. By default, we `reset` the selection, but the\n\t\t\t// `method` can be set to `add` the model to the selection.\n\t\t\tselection[ method ]( model );\n\t\t\tselection.single( model );\n\t\t}\n\t},\n\n\tupdateSelect: function() {\n\t\tthis[ this.selected() ? 'select' : 'deselect' ]();\n\t},\n\t/**\n\t * @returns {unresolved|Boolean}\n\t */\n\tselected: function() {\n\t\tvar selection = this.options.selection;\n\t\tif ( selection ) {\n\t\t\treturn !! selection.get( this.model.cid );\n\t\t}\n\t},\n\t/**\n\t * @param {Backbone.Model} model\n\t * @param {Backbone.Collection} collection\n\t */\n\tselect: function( model, collection ) {\n\t\tvar selection = this.options.selection,\n\t\t\tcontroller = this.controller;\n\n\t\t// Check if a selection exists and if it's the collection provided.\n\t\t// If they're not the same collection, bail; we're in another\n\t\t// selection's event loop.\n\t\tif ( ! selection || ( collection && collection !== selection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if the model is already selected.\n\t\tif ( this.$el.hasClass( 'selected' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add 'selected' class to model, set aria-checked to true.\n\t\tthis.$el.addClass( 'selected' ).attr( 'aria-checked', true );\n\t\t// Make the checkbox tabable, except in media grid (bulk select mode).\n\t\tif ( ! ( controller.isModeActive( 'grid' ) && controller.isModeActive( 'select' ) ) ) {\n\t\t\tthis.$( '.check' ).attr( 'tabindex', '0' );\n\t\t}\n\t},\n\t/**\n\t * @param {Backbone.Model} model\n\t * @param {Backbone.Collection} collection\n\t */\n\tdeselect: function( model, collection ) {\n\t\tvar selection = this.options.selection;\n\n\t\t// Check if a selection exists and if it's the collection provided.\n\t\t// If they're not the same collection, bail; we're in another\n\t\t// selection's event loop.\n\t\tif ( ! selection || ( collection && collection !== selection ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.$el.removeClass( 'selected' ).attr( 'aria-checked', false )\n\t\t\t.find( '.check' ).attr( 'tabindex', '-1' );\n\t},\n\t/**\n\t * @param {Backbone.Model} model\n\t * @param {Backbone.Collection} collection\n\t */\n\tdetails: function( model, collection ) {\n\t\tvar selection = this.options.selection,\n\t\t\tdetails;\n\n\t\tif ( selection !== collection ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdetails = selection.single();\n\t\tthis.$el.toggleClass( 'details', details === this.model );\n\t},\n\t/**\n\t * @param {string} size\n\t * @returns {Object}\n\t */\n\timageSize: function( size ) {\n\t\tvar sizes = this.model.get('sizes'), matched = false;\n\n\t\tsize = size || 'medium';\n\n\t\t// Use the provided image size if possible.\n\t\tif ( sizes ) {\n\t\t\tif ( sizes[ size ] ) {\n\t\t\t\tmatched = sizes[ size ];\n\t\t\t} else if ( sizes.large ) {\n\t\t\t\tmatched = sizes.large;\n\t\t\t} else if ( sizes.thumbnail ) {\n\t\t\t\tmatched = sizes.thumbnail;\n\t\t\t} else if ( sizes.full ) {\n\t\t\t\tmatched = sizes.full;\n\t\t\t}\n\n\t\t\tif ( matched ) {\n\t\t\t\treturn _.clone( matched );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\turl: this.model.get('url'),\n\t\t\twidth: this.model.get('width'),\n\t\t\theight: this.model.get('height'),\n\t\t\torientation: this.model.get('orientation')\n\t\t};\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tupdateSetting: function( event ) {\n\t\tvar $setting = $( event.target ).closest('[data-setting]'),\n\t\t\tsetting, value;\n\n\t\tif ( ! $setting.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetting = $setting.data('setting');\n\t\tvalue = event.target.value;\n\n\t\tif ( this.model.get( setting ) !== value ) {\n\t\t\tthis.save( setting, value );\n\t\t}\n\t},\n\n\t/**\n\t * Pass all the arguments to the model's save method.\n\t *\n\t * Records the aggregate status of all save requests and updates the\n\t * view's classes accordingly.\n\t */\n\tsave: function() {\n\t\tvar view = this,\n\t\t\tsave = this._save = this._save || { status: 'ready' },\n\t\t\trequest = this.model.save.apply( this.model, arguments ),\n\t\t\trequests = save.requests ? $.when( request, save.requests ) : request;\n\n\t\t// If we're waiting to remove 'Saved.', stop.\n\t\tif ( save.savedTimer ) {\n\t\t\tclearTimeout( save.savedTimer );\n\t\t}\n\n\t\tthis.updateSave('waiting');\n\t\tsave.requests = requests;\n\t\trequests.always( function() {\n\t\t\t// If we've performed another request since this one, bail.\n\t\t\tif ( save.requests !== requests ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tview.updateSave( requests.state() === 'resolved' ? 'complete' : 'error' );\n\t\t\tsave.savedTimer = setTimeout( function() {\n\t\t\t\tview.updateSave('ready');\n\t\t\t\tdelete save.savedTimer;\n\t\t\t}, 2000 );\n\t\t});\n\t},\n\t/**\n\t * @param {string} status\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\tupdateSave: function( status ) {\n\t\tvar save = this._save = this._save || { status: 'ready' };\n\n\t\tif ( status && status !== save.status ) {\n\t\t\tthis.$el.removeClass( 'save-' + save.status );\n\t\t\tsave.status = status;\n\t\t}\n\n\t\tthis.$el.addClass( 'save-' + save.status );\n\t\treturn this;\n\t},\n\n\tupdateAll: function() {\n\t\tvar $settings = this.$('[data-setting]'),\n\t\t\tmodel = this.model,\n\t\t\tchanged;\n\n\t\tchanged = _.chain( $settings ).map( function( el ) {\n\t\t\tvar $input = $('input, textarea, select, [value]', el ),\n\t\t\t\tsetting, value;\n\n\t\t\tif ( ! $input.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetting = $(el).data('setting');\n\t\t\tvalue = $input.val();\n\n\t\t\t// Record the value if it changed.\n\t\t\tif ( model.get( setting ) !== value ) {\n\t\t\t\treturn [ setting, value ];\n\t\t\t}\n\t\t}).compact().object().value();\n\n\t\tif ( ! _.isEmpty( changed ) ) {\n\t\t\tmodel.save( changed );\n\t\t}\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tremoveFromLibrary: function( event ) {\n\t\t// Catch enter and space events\n\t\tif ( 'keydown' === event.type && 13 !== event.keyCode && 32 !== event.keyCode ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Stop propagation so the model isn't selected.\n\t\tevent.stopPropagation();\n\n\t\tthis.collection.remove( this.model );\n\t},\n\n\t/**\n\t * Add the model if it isn't in the selection, if it is in the selection,\n\t * remove it.\n\t *\n\t * @param {[type]} event [description]\n\t * @return {[type]} [description]\n\t */\n\tcheckClickHandler: function ( event ) {\n\t\tvar selection = this.options.selection;\n\t\tif ( ! selection ) {\n\t\t\treturn;\n\t\t}\n\t\tevent.stopPropagation();\n\t\tif ( selection.where( { id: this.model.get( 'id' ) } ).length ) {\n\t\t\tselection.remove( this.model );\n\t\t\t// Move focus back to the attachment tile (from the check).\n\t\t\tthis.$el.focus();\n\t\t} else {\n\t\t\tselection.add( this.model );\n\t\t}\n\t}\n});\n\n// Ensure settings remain in sync between attachment views.\n_.each({\n\tcaption: '_syncCaption',\n\ttitle: '_syncTitle',\n\tartist: '_syncArtist',\n\talbum: '_syncAlbum'\n}, function( method, setting ) {\n\t/**\n\t * @function _syncCaption\n\t * @memberOf wp.media.view.Attachment\n\t * @instance\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {string} value\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\t/**\n\t * @function _syncTitle\n\t * @memberOf wp.media.view.Attachment\n\t * @instance\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {string} value\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\t/**\n\t * @function _syncArtist\n\t * @memberOf wp.media.view.Attachment\n\t * @instance\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {string} value\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\t/**\n\t * @function _syncAlbum\n\t * @memberOf wp.media.view.Attachment\n\t * @instance\n\t *\n\t * @param {Backbone.Model} model\n\t * @param {string} value\n\t * @returns {wp.media.view.Attachment} Returns itself to allow chaining\n\t */\n\tAttachment.prototype[ method ] = function( model, value ) {\n\t\tvar $setting = this.$('[data-setting=\"' + setting + '\"]');\n\n\t\tif ( ! $setting.length ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// If the updated value is in sync with the value in the DOM, there\n\t\t// is no need to re-render. If we're currently editing the value,\n\t\t// it will automatically be in sync, suppressing the re-render for\n\t\t// the view we're editing, while updating any others.\n\t\tif ( value === $setting.find('input, textarea, select, [value]').val() ) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn this.render();\n\t};\n});\n\nmodule.exports = Attachment;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment.js?");
- menu.mode( mode );
+/***/ }),
- view = menu.get();
- if ( view && view.select ) {
- view.select( this.id );
- }
- },
+/***/ "./src/wp-includes/js/media/views/attachment/details.js":
+/*!**************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/details.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * @access private
- * @since 3.5.0
- */
- _updateMenu: function() {
- var previous = this.previous('menu'),
- menu = this.get('menu');
+eval("var Attachment = wp.media.view.Attachment,\n\tl10n = wp.media.view.l10n,\n\tDetails;\n\n/**\n * wp.media.view.Attachment.Details\n *\n * @memberOf wp.media.view.Attachment\n *\n * @class\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nDetails = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{\n\ttagName: 'div',\n\tclassName: 'attachment-details',\n\ttemplate: wp.template('attachment-details'),\n\n\tattributes: function() {\n\t\treturn {\n\t\t\t'tabIndex': 0,\n\t\t\t'data-id': this.model.get( 'id' )\n\t\t};\n\t},\n\n\tevents: {\n\t\t'change [data-setting]': 'updateSetting',\n\t\t'change [data-setting] input': 'updateSetting',\n\t\t'change [data-setting] select': 'updateSetting',\n\t\t'change [data-setting] textarea': 'updateSetting',\n\t\t'click .delete-attachment': 'deleteAttachment',\n\t\t'click .trash-attachment': 'trashAttachment',\n\t\t'click .untrash-attachment': 'untrashAttachment',\n\t\t'click .edit-attachment': 'editAttachment',\n\t\t'keydown': 'toggleSelectionHandler'\n\t},\n\n\tinitialize: function() {\n\t\tthis.options = _.defaults( this.options, {\n\t\t\trerenderOnModelChange: false\n\t\t});\n\n\t\tthis.on( 'ready', this.initialFocus );\n\t\t// Call 'initialize' directly on the parent class.\n\t\tAttachment.prototype.initialize.apply( this, arguments );\n\t},\n\n\tinitialFocus: function() {\n\t\tif ( ! wp.media.isTouchDevice ) {\n\t\t\t/*\n\t\t\tPreviously focused the first ':input' (the readonly URL text field).\n\t\t\tSince the first ':input' is now a button (delete/trash): when pressing\n\t\t\tspacebar on an attachment, Firefox fires deleteAttachment/trashAttachment\n\t\t\tas soon as focus is moved. Explicitly target the first text field for now.\n\t\t\t@todo change initial focus logic, also for accessibility.\n\t\t\t*/\n\t\t\tthis.$( 'input[type=\"text\"]' ).eq( 0 ).focus();\n\t\t}\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tdeleteAttachment: function( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( window.confirm( l10n.warnDelete ) ) {\n\t\t\tthis.model.destroy();\n\t\t\t// Keep focus inside media modal\n\t\t\t// after image is deleted\n\t\t\tthis.controller.modal.focusManager.focus();\n\t\t}\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\ttrashAttachment: function( event ) {\n\t\tvar library = this.controller.library;\n\t\tevent.preventDefault();\n\n\t\tif ( wp.media.view.settings.mediaTrash &&\n\t\t\t'edit-metadata' === this.controller.content.mode() ) {\n\n\t\t\tthis.model.set( 'status', 'trash' );\n\t\t\tthis.model.save().done( function() {\n\t\t\t\tlibrary._requery( true );\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.model.destroy();\n\t\t}\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\tuntrashAttachment: function( event ) {\n\t\tvar library = this.controller.library;\n\t\tevent.preventDefault();\n\n\t\tthis.model.set( 'status', 'inherit' );\n\t\tthis.model.save().done( function() {\n\t\t\tlibrary._requery( true );\n\t\t} );\n\t},\n\t/**\n\t * @param {Object} event\n\t */\n\teditAttachment: function( event ) {\n\t\tvar editState = this.controller.states.get( 'edit-image' );\n\t\tif ( window.imageEdit && editState ) {\n\t\t\tevent.preventDefault();\n\n\t\t\teditState.set( 'image', this.model );\n\t\t\tthis.controller.setState( 'edit-image' );\n\t\t} else {\n\t\t\tthis.$el.addClass('needs-refresh');\n\t\t}\n\t},\n\t/**\n\t * When reverse tabbing(shift+tab) out of the right details panel, deliver\n\t * the focus to the item in the list that was being edited.\n\t *\n\t * @param {Object} event\n\t */\n\ttoggleSelectionHandler: function( event ) {\n\t\tif ( 'keydown' === event.type && 9 === event.keyCode && event.shiftKey && event.target === this.$( ':tabbable' ).get( 0 ) ) {\n\t\t\tthis.controller.trigger( 'attachment:details:shift-tab', event );\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( 37 === event.keyCode || 38 === event.keyCode || 39 === event.keyCode || 40 === event.keyCode ) {\n\t\t\tthis.controller.trigger( 'attachment:keydown:arrow', event );\n\t\t\treturn;\n\t\t}\n\t}\n});\n\nmodule.exports = Details;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/details.js?");
- if ( previous ) {
- this.frame.off( 'menu:render:' + previous, this._renderMenu, this );
- }
+/***/ }),
- if ( menu ) {
- this.frame.on( 'menu:render:' + menu, this._renderMenu, this );
- }
- },
+/***/ "./src/wp-includes/js/media/views/attachment/edit-library.js":
+/*!*******************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/edit-library.js ***!
+ \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- /**
- * Create a view in the media menu for the state.
- *
- * @access private
- * @since 3.5.0
- *
- * @param {media.view.Menu} view The menu view.
- */
- _renderMenu: function( view ) {
- var menuItem = this.get('menuItem'),
- title = this.get('title'),
- priority = this.get('priority');
+eval("/**\n * wp.media.view.Attachment.EditLibrary\n *\n * @memberOf wp.media.view.Attachment\n *\n * @class\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nvar EditLibrary = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.EditLibrary.prototype */{\n\tbuttons: {\n\t\tclose: true\n\t}\n});\n\nmodule.exports = EditLibrary;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/edit-library.js?");
- if ( ! menuItem && title ) {
- menuItem = { text: title };
+/***/ }),
- if ( priority ) {
- menuItem.priority = priority;
- }
- }
+/***/ "./src/wp-includes/js/media/views/attachment/edit-selection.js":
+/*!*********************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/edit-selection.js ***!
+ \*********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- if ( ! menuItem ) {
- return;
- }
+eval("/**\n * wp.media.view.Attachment.EditSelection\n *\n * @memberOf wp.media.view.Attachment\n *\n * @class\n * @augments wp.media.view.Attachment.Selection\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nvar EditSelection = wp.media.view.Attachment.Selection.extend(/** @lends wp.media.view.Attachment.EditSelection.prototype */{\n\tbuttons: {\n\t\tclose: true\n\t}\n});\n\nmodule.exports = EditSelection;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/edit-selection.js?");
- view.set( this.id, menuItem );
- }
-});
+/***/ }),
-_.each(['toolbar','content'], function( region ) {
- /**
- * @access private
- */
- State.prototype[ '_' + region ] = function() {
- var mode = this.get( region );
- if ( mode ) {
- this.frame[ region ].render( mode );
- }
- };
-});
+/***/ "./src/wp-includes/js/media/views/attachment/library.js":
+/*!**************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/library.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-module.exports = State;
+eval("/**\n * wp.media.view.Attachment.Library\n *\n * @memberOf wp.media.view.Attachment\n *\n * @class\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nvar Library = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Library.prototype */{\n\tbuttons: {\n\t\tcheck: true\n\t}\n});\n\nmodule.exports = Library;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/library.js?");
+/***/ }),
-/***/ }),
-/* 30 */
+/***/ "./src/wp-includes/js/media/views/attachment/selection.js":
+/*!****************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachment/selection.js ***!
+ \****************************************************************/
+/*! no static exports found */
/***/ (function(module, exports) {
-/**
- * wp.media.selectionSync
- *
- * Sync an attachments selection in a state with another state.
- *
- * Allows for selecting multiple images in the Add Media workflow, and then
- * switching to the Insert Gallery workflow while preserving the attachments selection.
- *
- * @memberOf wp.media
- *
- * @mixin
- */
-var selectionSync = {
- /**
- * @since 3.5.0
- */
- syncSelection: function() {
- var selection = this.get('selection'),
- manager = this.frame._selection;
+eval("/**\n * wp.media.view.Attachment.Selection\n *\n * @memberOf wp.media.view.Attachment\n *\n * @class\n * @augments wp.media.view.Attachment\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nvar Selection = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Selection.prototype */{\n\tclassName: 'attachment selection',\n\n\t// On click, just select the model, instead of removing the model from\n\t// the selection.\n\ttoggleSelection: function() {\n\t\tthis.options.selection.single( this.model );\n\t}\n});\n\nmodule.exports = Selection;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachment/selection.js?");
- if ( ! this.get('syncSelection') || ! manager || ! selection ) {
- return;
- }
+/***/ }),
- // If the selection supports multiple items, validate the stored
- // attachments based on the new selection's conditions. Record
- // the attachments that are not included; we'll maintain a
- // reference to those. Other attachments are considered in flux.
- if ( selection.multiple ) {
- selection.reset( [], { silent: true });
- selection.validateAll( manager.attachments );
- manager.difference = _.difference( manager.attachments.models, selection.models );
- }
+/***/ "./src/wp-includes/js/media/views/attachments.js":
+/*!*******************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachments.js ***!
+ \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- // Sync the selection's single item with the master.
- selection.single( manager.single );
- },
+eval("var View = wp.media.View,\n\t$ = jQuery,\n\tAttachments;\n\n/**\n * wp.media.view.Attachments\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n */\nAttachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{\n\ttagName: 'ul',\n\tclassName: 'attachments',\n\n\tattributes: {\n\t\ttabIndex: -1\n\t},\n\n\tinitialize: function() {\n\t\tthis.el.id = _.uniqueId('__attachments-view-');\n\n\t\t_.defaults( this.options, {\n\t\t\trefreshSensitivity: wp.media.isTouchDevice ? 300 : 200,\n\t\t\trefreshThreshold: 3,\n\t\t\tAttachmentView: wp.media.view.Attachment,\n\t\t\tsortable: false,\n\t\t\tresize: true,\n\t\t\tidealColumnWidth: $( window ).width() < 640 ? 135 : 150\n\t\t});\n\n\t\tthis._viewsByCid = {};\n\t\tthis.$window = $( window );\n\t\tthis.resizeEvent = 'resize.media-modal-columns';\n\n\t\tthis.collection.on( 'add', function( attachment ) {\n\t\t\tthis.views.add( this.createAttachmentView( attachment ), {\n\t\t\t\tat: this.collection.indexOf( attachment )\n\t\t\t});\n\t\t}, this );\n\n\t\tthis.collection.on( 'remove', function( attachment ) {\n\t\t\tvar view = this._viewsByCid[ attachment.cid ];\n\t\t\tdelete this._viewsByCid[ attachment.cid ];\n\n\t\t\tif ( view ) {\n\t\t\t\tview.remove();\n\t\t\t}\n\t\t}, this );\n\n\t\tthis.collection.on( 'reset', this.render, this );\n\n\t\tthis.listenTo( this.controller, 'library:selection:add', this.attachmentFocus );\n\n\t\t// Throttle the scroll handler and bind this.\n\t\tthis.scroll = _.chain( this.scroll ).bind( this ).throttle( this.options.refreshSensitivity ).value();\n\n\t\tthis.options.scrollElement = this.options.scrollElement || this.el;\n\t\t$( this.options.scrollElement ).on( 'scroll', this.scroll );\n\n\t\tthis.initSortable();\n\n\t\t_.bindAll( this, 'setColumns' );\n\n\t\tif ( this.options.resize ) {\n\t\t\tthis.on( 'ready', this.bindEvents );\n\t\t\tthis.controller.on( 'open', this.setColumns );\n\n\t\t\t// Call this.setColumns() after this view has been rendered in the DOM so\n\t\t\t// attachments get proper width applied.\n\t\t\t_.defer( this.setColumns, this );\n\t\t}\n\t},\n\n\tbindEvents: function() {\n\t\tthis.$window.off( this.resizeEvent ).on( this.resizeEvent, _.debounce( this.setColumns, 50 ) );\n\t},\n\n\tattachmentFocus: function() {\n\t\tthis.$( 'li:first' ).focus();\n\t},\n\n\trestoreFocus: function() {\n\t\tthis.$( 'li.selected:first' ).focus();\n\t},\n\n\tarrowEvent: function( event ) {\n\t\tvar attachments = this.$el.children( 'li' ),\n\t\t\tperRow = this.columns,\n\t\t\tindex = attachments.filter( ':focus' ).index(),\n\t\t\trow = ( index + 1 ) <= perRow ? 1 : Math.ceil( ( index + 1 ) / perRow );\n\n\t\tif ( index === -1 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Left arrow\n\t\tif ( 37 === event.keyCode ) {\n\t\t\tif ( 0 === index ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tattachments.eq( index - 1 ).focus();\n\t\t}\n\n\t\t// Up arrow\n\t\tif ( 38 === event.keyCode ) {\n\t\t\tif ( 1 === row ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tattachments.eq( index - perRow ).focus();\n\t\t}\n\n\t\t// Right arrow\n\t\tif ( 39 === event.keyCode ) {\n\t\t\tif ( attachments.length === index ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tattachments.eq( index + 1 ).focus();\n\t\t}\n\n\t\t// Down arrow\n\t\tif ( 40 === event.keyCode ) {\n\t\t\tif ( Math.ceil( attachments.length / perRow ) === row ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tattachments.eq( index + perRow ).focus();\n\t\t}\n\t},\n\n\tdispose: function() {\n\t\tthis.collection.props.off( null, null, this );\n\t\tif ( this.options.resize ) {\n\t\t\tthis.$window.off( this.resizeEvent );\n\t\t}\n\n\t\t/**\n\t\t * call 'dispose' directly on the parent class\n\t\t */\n\t\tView.prototype.dispose.apply( this, arguments );\n\t},\n\n\tsetColumns: function() {\n\t\tvar prev = this.columns,\n\t\t\twidth = this.$el.width();\n\n\t\tif ( width ) {\n\t\t\tthis.columns = Math.min( Math.round( width / this.options.idealColumnWidth ), 12 ) || 1;\n\n\t\t\tif ( ! prev || prev !== this.columns ) {\n\t\t\t\tthis.$el.closest( '.media-frame-content' ).attr( 'data-columns', this.columns );\n\t\t\t}\n\t\t}\n\t},\n\n\tinitSortable: function() {\n\t\tvar collection = this.collection;\n\n\t\tif ( ! this.options.sortable || ! $.fn.sortable ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.$el.sortable( _.extend({\n\t\t\t// If the `collection` has a `comparator`, disable sorting.\n\t\t\tdisabled: !! collection.comparator,\n\n\t\t\t// Change the position of the attachment as soon as the\n\t\t\t// mouse pointer overlaps a thumbnail.\n\t\t\ttolerance: 'pointer',\n\n\t\t\t// Record the initial `index` of the dragged model.\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tui.item.data('sortableIndexStart', ui.item.index());\n\t\t\t},\n\n\t\t\t// Update the model's index in the collection.\n\t\t\t// Do so silently, as the view is already accurate.\n\t\t\tupdate: function( event, ui ) {\n\t\t\t\tvar model = collection.at( ui.item.data('sortableIndexStart') ),\n\t\t\t\t\tcomparator = collection.comparator;\n\n\t\t\t\t// Temporarily disable the comparator to prevent `add`\n\t\t\t\t// from re-sorting.\n\t\t\t\tdelete collection.comparator;\n\n\t\t\t\t// Silently shift the model to its new index.\n\t\t\t\tcollection.remove( model, {\n\t\t\t\t\tsilent: true\n\t\t\t\t});\n\t\t\t\tcollection.add( model, {\n\t\t\t\t\tsilent: true,\n\t\t\t\t\tat: ui.item.index()\n\t\t\t\t});\n\n\t\t\t\t// Restore the comparator.\n\t\t\t\tcollection.comparator = comparator;\n\n\t\t\t\t// Fire the `reset` event to ensure other collections sync.\n\t\t\t\tcollection.trigger( 'reset', collection );\n\n\t\t\t\t// If the collection is sorted by menu order,\n\t\t\t\t// update the menu order.\n\t\t\t\tcollection.saveMenuOrder();\n\t\t\t}\n\t\t}, this.options.sortable ) );\n\n\t\t// If the `orderby` property is changed on the `collection`,\n\t\t// check to see if we have a `comparator`. If so, disable sorting.\n\t\tcollection.props.on( 'change:orderby', function() {\n\t\t\tthis.$el.sortable( 'option', 'disabled', !! collection.comparator );\n\t\t}, this );\n\n\t\tthis.collection.props.on( 'change:orderby', this.refreshSortable, this );\n\t\tthis.refreshSortable();\n\t},\n\n\trefreshSortable: function() {\n\t\tif ( ! this.options.sortable || ! $.fn.sortable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the `collection` has a `comparator`, disable sorting.\n\t\tvar collection = this.collection,\n\t\t\torderby = collection.props.get('orderby'),\n\t\t\tenabled = 'menuOrder' === orderby || ! collection.comparator;\n\n\t\tthis.$el.sortable( 'option', 'disabled', ! enabled );\n\t},\n\n\t/**\n\t * @param {wp.media.model.Attachment} attachment\n\t * @returns {wp.media.View}\n\t */\n\tcreateAttachmentView: function( attachment ) {\n\t\tvar view = new this.options.AttachmentView({\n\t\t\tcontroller: this.controller,\n\t\t\tmodel: attachment,\n\t\t\tcollection: this.collection,\n\t\t\tselection: this.options.selection\n\t\t});\n\n\t\treturn this._viewsByCid[ attachment.cid ] = view;\n\t},\n\n\tprepare: function() {\n\t\t// Create all of the Attachment views, and replace\n\t\t// the list in a single DOM operation.\n\t\tif ( this.collection.length ) {\n\t\t\tthis.views.set( this.collection.map( this.createAttachmentView, this ) );\n\n\t\t// If there are no elements, clear the views and load some.\n\t\t} else {\n\t\t\tthis.views.unset();\n\t\t\tthis.collection.more().done( this.scroll );\n\t\t}\n\t},\n\n\tready: function() {\n\t\t// Trigger the scroll event to check if we're within the\n\t\t// threshold to query for additional attachments.\n\t\tthis.scroll();\n\t},\n\n\tscroll: function() {\n\t\tvar view = this,\n\t\t\tel = this.options.scrollElement,\n\t\t\tscrollTop = el.scrollTop,\n\t\t\ttoolbar;\n\n\t\t// The scroll event occurs on the document, but the element\n\t\t// that should be checked is the document body.\n\t\tif ( el === document ) {\n\t\t\tel = document.body;\n\t\t\tscrollTop = $(document).scrollTop();\n\t\t}\n\n\t\tif ( ! $(el).is(':visible') || ! this.collection.hasMore() ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttoolbar = this.views.parent.toolbar;\n\n\t\t// Show the spinner only if we are close to the bottom.\n\t\tif ( el.scrollHeight - ( scrollTop + el.clientHeight ) < el.clientHeight / 3 ) {\n\t\t\ttoolbar.get('spinner').show();\n\t\t}\n\n\t\tif ( el.scrollHeight < scrollTop + ( el.clientHeight * this.options.refreshThreshold ) ) {\n\t\t\tthis.collection.more().done(function() {\n\t\t\t\tview.scroll();\n\t\t\t\ttoolbar.get('spinner').hide();\n\t\t\t});\n\t\t}\n\t}\n});\n\nmodule.exports = Attachments;\n\n\n//# sourceURL=webpack:///./src/wp-includes/js/media/views/attachments.js?");
- /**
- * Record the currently active attachments, which is a combination
- * of the selection's attachments and the set of selected
- * attachments that this specific selection considered invalid.
- * Reset the difference and record the single attachment.
- *
- * @since 3.5.0
- */
- recordSelection: function() {
- var selection = this.get('selection'),
- manager = this.frame._selection;
+/***/ }),
- if ( ! this.get('syncSelection') || ! manager || ! selection ) {
- return;
- }
+/***/ "./src/wp-includes/js/media/views/attachments/browser.js":
+/*!***************************************************************!*\
+ !*** ./src/wp-includes/js/media/views/attachments/browser.js ***!
+ \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- if ( selection.multiple ) {
- manager.attachments.reset( selection.toArray().concat( manager.difference ) );
- manager.difference = [];
- } else {
- manager.attachments.add( selection.toArray() );
- }
+eval("var View = wp.media.View,\n\tmediaTrash = wp.media.view.settings.mediaTrash,\n\tl10n = wp.media.view.l10n,\n\t$ = jQuery,\n\tAttachmentsBrowser;\n\n/**\n * wp.media.view.AttachmentsBrowser\n *\n * @memberOf wp.media.view\n *\n * @class\n * @augments wp.media.View\n * @augments wp.Backbone.View\n * @augments Backbone.View\n *\n * @param {object} [options] The options hash passed to the view.\n * @param {boolean|string} [options.filters=false] Which filters to show in the browser's toolbar.\n * Accepts 'uploaded' and 'all'.\n * @param {boolean} [options.search=true] Whether to show the search interface in the\n * browser's toolbar.\n * @param {boolean} [options.date=true] Whether to show the date filter in the\n * browser's toolbar.\n * @param {boolean} [options.display=false] Whether to show the attachments display settings\n * view in the sidebar.\n * @param {boolean|string} [options.sidebar=true] Whether to create a sidebar for the browser.\n * Accepts true, false, and 'errors'.\n */\nAttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.prototype */{\n\ttagName: 'div',\n\tclassName: 'attachments-browser',\n\n\tinitialize: function() {\n\t\t_.defaults( this.options, {\n\t\t\tfilters: false,\n\t\t\tsearch: true,\n\t\t\tdate: true,\n\t\t\tdisplay: false,\n\t\t\tsidebar: true,\n\t\t\tAttachmentView: wp.media.view.Attachment.Library\n\t\t});\n\n\t\tthis.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );\n\t\tthis.controller.on( 'edit:selection', this.editSelection );\n\n\t\t// In the Media Library, the sidebar is used to display errors before the attachments grid.\n\t\tif ( this.options.sidebar && 'errors' === this.options.sidebar ) {\n\t\t\tthis.createSidebar();\n\t\t}\n\n\t\t/*\n\t\t * For accessibility reasons, place the Inline Uploader before other sections.\n\t\t * This way, in the Media Library, it's right after the Add New button, see ticket #37188.\n\t\t */\n\t\tthis.createUploader();\n\n\t\t/*\n\t\t * Create a multi-purpose toolbar. Used as main toolbar in the Media Library\n\t\t * and also for other things, for example the \"Drag and drop to reorder\" and\n\t\t * \"Suggested dimensions\" info in the media modal.\n\t\t */\n\t\tthis.createToolbar();\n\n\t\t// Create the list of attachments.\n\t\tthis.createAttachments();\n\n\t\t// For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.\n\t\tif ( this.options.sidebar && 'errors' !== this.options.sidebar ) {\n\t\t\tthis.createSidebar();\n\t\t}\n\n\t\tthis.updateContent();\n\n\t\tif ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {\n\t\t\tthis.$el.addClass( 'hide-sidebar' );\n\n\t\t\tif ( 'errors' === this.options.sidebar ) {\n\t\t\t\tthis.$el.addClass( 'sidebar-for-errors' );\n\t\t\t}\n\t\t}\n\n\t\tthis.collection.on( 'add remove reset', this.updateContent, this );\n\t},\n\n\teditSelection: function( modal ) {\n\t\tmodal.$( '.media-button-backToLibrary' ).focus();\n\t},\n\n\t/**\n\t * @returns {wp.media.view.AttachmentsBrowser} Returns itself to allow chaining\n\t */\n\tdispose: function() {\n\t\tthis.options.selection.off( null, null, this );\n\t\tView.prototype.dispose.apply( this, arguments );\n\t\treturn this;\n\t},\n\n\tcreateToolbar: function() {\n\t\tvar LibraryViewSwitcher, Filters, toolbarOptions;\n\n\t\ttoolbarOptions = {\n\t\t\tcontroller: this.controller\n\t\t};\n\n\t\tif ( this.controller.isModeActive( 'grid' ) ) {\n\t\t\ttoolbarOptions.className = 'media-toolbar wp-filter';\n\t\t}\n\n\t\t/**\n\t\t* @member {wp.media.view.Toolbar}\n\t\t*/\n\t\tthis.toolbar = new wp.media.view.Toolbar( toolbarOptions );\n\n\t\tthis.views.add( this.toolbar );\n\n\t\tthis.toolbar.set( 'spinner', new wp.media.view.Spinner({\n\t\t\tpriority: -60\n\t\t}) );\n\n\t\tif ( -1 !== $.inArray( this.options.filters, [ 'uploaded', 'all' ] ) ) {\n\t\t\t// \"Filters\" will return a