├── .eslintrc ├── .firebaserc ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── config ├── env.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── webpack.config.dev.js ├── webpack.config.prod.js └── webpackDevServer.config.js ├── firebase.json ├── package-lock.json ├── package.json ├── public ├── assets │ └── favicon.ico ├── files │ └── PDFTRON_about.pdf ├── index.html ├── manifest.json └── serve.json ├── samples ├── compare │ ├── index.html │ └── index.js ├── index.html ├── redaction │ ├── index.html │ └── index.js └── style.css ├── scripts ├── build.js ├── start.js └── test.js ├── src ├── App.css ├── App.js ├── App.test.js ├── constants │ └── demo-vars.js ├── index.css └── index.js └── tools └── copy-webviewer-files.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "plugins": ["babel", "react", "react-hooks", "import"], 4 | "env": { 5 | "browser": true, 6 | "node": true, 7 | "es6": true 8 | }, 9 | "globals": { 10 | "_": false, 11 | "Annotations": false, 12 | "Tools": false 13 | }, 14 | "extends": [ 15 | "eslint:recommended", 16 | "plugin:react/recommended" 17 | ], 18 | "rules": { 19 | "quotes": [ 20 | 0, 21 | "single", 22 | { 23 | "allowTemplateLiterals": true 24 | } 25 | ], 26 | "curly": 2, 27 | "strict": [2, "never"], 28 | "semi": [2, "always"], 29 | "no-redeclare": [ 30 | 2, 31 | { 32 | "builtinGlobals": true 33 | } 34 | ], 35 | "brace-style": 2, 36 | "no-alert": 0, 37 | "no-console": [ 38 | 0, 39 | { 40 | "allow": ["warn", "error"] 41 | } 42 | ], 43 | "object-shorthand": [2, "always"], 44 | "arrow-parens": [2, "as-needed"], 45 | "no-useless-escape": 0, 46 | "eqeqeq": 2, 47 | "jsx-quotes": 2, 48 | "indent": [ 49 | 2, 50 | 2, 51 | { 52 | "MemberExpression": 1, 53 | "ArrayExpression": 1, 54 | "ImportDeclaration": 1, 55 | "SwitchCase": 1, 56 | "FunctionExpression": { 57 | "body": 1 58 | } 59 | } 60 | ], 61 | "keyword-spacing": 2, 62 | "space-before-blocks": 2, 63 | "arrow-spacing": 2, 64 | "object-curly-spacing": [2, "always"], 65 | "react/jsx-closing-bracket-location": 2, 66 | "react/jsx-curly-spacing": 2, 67 | "react/jsx-boolean-value": 2, 68 | "react/prop-types": 2, 69 | "react-hooks/rules-of-hooks": 2, 70 | "react-hooks/exhaustive-deps": 1, 71 | "react/sort-comp": 0, 72 | "react/no-find-dom-node": 0, 73 | "react/display-name": 0, 74 | "import/no-unresolved": 0, 75 | "import/extensions": 0, 76 | "import/no-extraneous-dependencies": 0, 77 | "import/no-dynamic-require": 0, 78 | "@pdftron/webviewer/no-string-events": 0, 79 | 80 | // these are inherited from git WebViewer's eslint confirguration 81 | "no-use-before-define": 0, 82 | "implicit-arrow-linebreak": 0, 83 | "operator-linebreak": 0, 84 | "function-paren-newline": 0, 85 | "object-curly-newline": 0, 86 | "no-nested-ternary": 0, 87 | "no-unexpected-multiline": 0, 88 | "no-unused-expressions": 0 89 | }, 90 | "settings": { 91 | "react": { 92 | "version": "detect" 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "webviewer-video" 4 | }, 5 | "targets": { 6 | "webviewer-video": { 7 | "hosting": { 8 | "webviewer-video": [ 9 | "webviewer-video" 10 | ], 11 | "webviewer-video-compare": [ 12 | "webviewer-video-compare" 13 | ] 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # WebViewer 4 | public/webviewer 5 | public/ffprobe 6 | public/wv-video-injection.js 7 | 8 | # dependencies 9 | /node_modules 10 | /.pnp 11 | .pnp.js 12 | 13 | # testing 14 | /coverage 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | .env.local 22 | .env.development.local 23 | .env.test.local 24 | .env.production.local 25 | package-lock.json 26 | /public/assets/webviewer/core 27 | /public/assets/webviewer/ui 28 | 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | 33 | .firebase/ -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to WebViewer - React sample 2 | 3 | ## Issues 4 | 1. Check existing issues (open/closed) to avoid duplicates. 5 | 2. Be clear about what the problem is. 6 | 3. Make sure to paste error output or logs. 7 | 4. Code snapshot or demos on online code editor will be very helpful. 8 | 9 | ## Pull requests 10 | 1. Fork the repository. 11 | 2. Create a branch from `master`. 12 | 3. Update the source code using style guides described below. 13 | 4. Lint your code with `npm run lint`. 14 | 5. Commit and push the changes with descriptive messages. 15 | 6. Create a pull request to `master`. 16 | 17 | \* Please note that all pull requests should be tied to an issue, and all but the most trivial pull requests should be discussed before hand. 18 | 19 | ## Style guides 20 | - Tab indentation (size of 2 spaces). 21 | - `'` instead of `"`. 22 | - Curly braces for block statements. 23 | - 1TBS brace style. 24 | - Semicolon at the end of each statement. 25 | - Object shorthand for ES6. 26 | - Parenthesis around arrow function argument. 27 | - Minimum line breaks. 28 | - No `use strict`. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 PDFTron Systems Inc. All rights reserved. 2 | WebViewer React UI project/codebase or any derived works is only permitted in solutions with an active commercial PDFTron WebViewer license. For exact licensing terms please refer to your commercial WebViewer license. For use in other scenario, please contact sales@pdftron.com -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebViewer Video 2 | 3 | ⚠️ This sample has been moved to the [webviewer-samples repo](https://github.com/ApryseSDK/webviewer-samples/tree/main/webviewer-video). ⚠️ -------------------------------------------------------------------------------- /config/env.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | const paths = require('./paths'); 6 | 7 | // Make sure that including paths.js after env.js will read .env variables. 8 | delete require.cache[require.resolve('./paths')]; 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | if (!NODE_ENV) { 12 | throw new Error( 13 | 'The NODE_ENV environment variable is required but was not specified.' 14 | ); 15 | } 16 | 17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use 18 | var dotenvFiles = [ 19 | `${paths.dotenv}.${NODE_ENV}.local`, 20 | `${paths.dotenv}.${NODE_ENV}`, 21 | // Don't include `.env.local` for `test` environment 22 | // since normally you expect tests to produce the same 23 | // results for everyone 24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`, 25 | paths.dotenv, 26 | ].filter(Boolean); 27 | 28 | // Load environment variables from .env* files. Suppress warnings using silent 29 | // if this file is missing. dotenv will never modify any environment variables 30 | // that have already been set. Variable expansion is supported in .env files. 31 | // https://github.com/motdotla/dotenv 32 | // https://github.com/motdotla/dotenv-expand 33 | dotenvFiles.forEach(dotenvFile => { 34 | if (fs.existsSync(dotenvFile)) { 35 | require('dotenv-expand')( 36 | require('dotenv').config({ 37 | path: dotenvFile, 38 | }) 39 | ); 40 | } 41 | }); 42 | 43 | // We support resolving modules according to `NODE_PATH`. 44 | // This lets you use absolute paths in imports inside large monorepos: 45 | // https://github.com/facebook/create-react-app/issues/253. 46 | // It works similar to `NODE_PATH` in Node itself: 47 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders 48 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. 49 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. 50 | // https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421 51 | // We also resolve them to make sure all tools using them work consistently. 52 | const appDirectory = fs.realpathSync(process.cwd()); 53 | process.env.NODE_PATH = (process.env.NODE_PATH || '') 54 | .split(path.delimiter) 55 | .filter(folder => folder && !path.isAbsolute(folder)) 56 | .map(folder => path.resolve(appDirectory, folder)) 57 | .join(path.delimiter); 58 | 59 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be 60 | // injected into the application via DefinePlugin in Webpack configuration. 61 | const REACT_APP = /^REACT_APP_/i; 62 | 63 | function getClientEnvironment(publicUrl) { 64 | const raw = Object.keys(process.env) 65 | .filter(key => REACT_APP.test(key)) 66 | .reduce( 67 | (env, key) => { 68 | env[key] = process.env[key]; 69 | return env; 70 | }, 71 | { 72 | // Useful for determining whether we’re running in production mode. 73 | // Most importantly, it switches React into the correct mode. 74 | NODE_ENV: process.env.NODE_ENV || 'development', 75 | // Useful for resolving the correct path to static assets in `public`. 76 | // For example, . 77 | // This should only be used as an escape hatch. Normally you would put 78 | // images into the `src` and `import` them in code to get their paths. 79 | PUBLIC_URL: publicUrl, 80 | } 81 | ); 82 | // Stringify all values so we can feed into Webpack DefinePlugin 83 | const stringified = { 84 | 'process.env': Object.keys(raw).reduce((env, key) => { 85 | env[key] = JSON.stringify(raw[key]); 86 | return env; 87 | }, {}), 88 | }; 89 | 90 | return { raw, stringified }; 91 | } 92 | 93 | module.exports = getClientEnvironment; 94 | -------------------------------------------------------------------------------- /config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/en/webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | const assetFilename = JSON.stringify(path.basename(filename)); 11 | 12 | if (filename.match(/\.svg$/)) { 13 | return `module.exports = { 14 | __esModule: true, 15 | default: ${assetFilename}, 16 | ReactComponent: (props) => ({ 17 | $$typeof: Symbol.for('react.element'), 18 | type: 'svg', 19 | ref: null, 20 | key: null, 21 | props: Object.assign({}, props, { 22 | children: ${assetFilename} 23 | }) 24 | }), 25 | };`; 26 | } 27 | 28 | return `module.exports = ${assetFilename};`; 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /config/paths.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | const url = require('url'); 6 | 7 | // Make sure any symlinks in the project folder are resolved: 8 | // https://github.com/facebook/create-react-app/issues/637 9 | const appDirectory = fs.realpathSync(process.cwd()); 10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 11 | 12 | const envPublicUrl = process.env.PUBLIC_URL; 13 | 14 | function ensureSlash(inputPath, needsSlash) { 15 | const hasSlash = inputPath.endsWith('/'); 16 | if (hasSlash && !needsSlash) { 17 | return inputPath.substr(0, inputPath.length - 1); 18 | } else if (!hasSlash && needsSlash) { 19 | return `${inputPath}/`; 20 | } else { 21 | return inputPath; 22 | } 23 | } 24 | 25 | const getPublicUrl = appPackageJson => 26 | envPublicUrl || require(appPackageJson).homepage; 27 | 28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer 29 | // "public path" at which the app is served. 30 | // Webpack needs to know it to put the right 37 |
38 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /public/serve.json: -------------------------------------------------------------------------------- 1 | { 2 | "cleanUrls": false 3 | } -------------------------------------------------------------------------------- /samples/compare/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Compare Sample 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/compare/index.js: -------------------------------------------------------------------------------- 1 | window.WebViewer( 2 | { 3 | path: '../../public/webviewer/lib/', 4 | }, 5 | document.getElementById('viewer'), 6 | ).then(async instance => { 7 | instance.UI.setTheme('dark'); 8 | const license = `---- Insert commercial license key here after purchase ----`; 9 | 10 | const { initializeVideoViewer } = window.WebViewerVideo; 11 | const videoInstance = await initializeVideoViewer( 12 | instance, 13 | { 14 | license, 15 | }, 16 | ); 17 | 18 | await videoInstance.UI.enableCompareMode(); 19 | 20 | const videoUrl = 'https://pdftron.s3.amazonaws.com/downloads/pl/video/bunny-short.mp4'; 21 | videoInstance.loadVideo(videoUrl); 22 | 23 | window.addEventListener( 24 | 'documentViewer2Ready', 25 | () => { 26 | videoInstance.UI.loadCompareVideoB(videoUrl); 27 | }, 28 | { once: true }, 29 | ); 30 | }); 31 | -------------------------------------------------------------------------------- /samples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | WebViewer Video Samples 12 | 13 | 14 | 15 |
16 |
17 |
18 | 19 | 20 | 21 | WebViewer Video 22 |
23 |
24 | Go to Guides 25 | Licensing 26 |
27 |
28 |
29 |
30 |
31 |
32 |

Redaction

33 |

34 | Shows how to setup WebViewer and WebViewer Video to redact video frames and/or audio. 35 |
36 |

37 |
38 | Launch demo 39 | View Source 40 |
41 |
42 |
43 |
44 |
45 |
46 |

Compare

47 |

48 | Shows how to setup WebViewer and WebViewer Video to compare two video side by side 49 |
50 |

51 |
52 | Launch demo 53 | View Source 54 |
55 |
56 |
57 |
58 | 59 | -------------------------------------------------------------------------------- /samples/redaction/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redaction Sample 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/redaction/index.js: -------------------------------------------------------------------------------- 1 | window.WebViewer( 2 | { 3 | path: '../../public/webviewer/lib/', 4 | enableRedaction: true, 5 | }, 6 | document.getElementById('viewer'), 7 | ).then(async instance => { 8 | instance.UI.setTheme('dark'); 9 | const license = `---- Insert commercial license key here after purchase ----`; 10 | 11 | const { Waveform } = window.WebViewerAudio; 12 | const { initializeVideoViewer } = window.WebViewerVideo; 13 | const videoInstance = await initializeVideoViewer( 14 | instance, 15 | { 16 | license, 17 | AudioComponent: Waveform, 18 | }, 19 | ); 20 | 21 | const videoUrl = 'https://pdftron.s3.amazonaws.com/downloads/pl/video/bunny-short.mp4'; 22 | videoInstance.loadVideo(videoUrl); 23 | 24 | videoInstance.UI.updateElement('redactApplyButton', { 25 | onClick: async redactAnnotations => { 26 | const response = await fetch('http://localhost:3001/video/redact', { 27 | method: 'POST', 28 | body: JSON.stringify({ 29 | intervals: redactAnnotations.map(annotation => ({ 30 | start: annotation.getStartTime(), 31 | end: annotation.getEndTime(), 32 | shouldRedactAudio: annotation.shouldRedactAudio || annotation.redactionType === 'audioRedaction', 33 | shouldRedactVideo: annotation.redactionType !== 'audioRedaction', 34 | })), 35 | url: videoUrl, 36 | }), 37 | headers: { 38 | 'Accept': 'application/json', 39 | 'Content-Type': 'application/json' 40 | }, 41 | }); 42 | 43 | const videoBuffer = await response.arrayBuffer(); 44 | 45 | const newVideoBlob = new Blob([videoBuffer], { type: 'video/mp4' }); 46 | videoInstance.loadVideo(URL.createObjectURL(newVideoBlob)); 47 | return videoBuffer; 48 | } 49 | }); 50 | }); 51 | -------------------------------------------------------------------------------- /samples/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | width: 100%; 3 | height: 100%; 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | body { 9 | display: -webkit-box; 10 | display: -ms-flexbox; 11 | display: flex; 12 | width: 100%; 13 | height: 100%; 14 | margin: 0; 15 | padding: 8px; 16 | -webkit-box-sizing: border-box; 17 | box-sizing: border-box; 18 | font-family: Arial, Helvetica, sans-serif; 19 | } 20 | 21 | /* Elements in individual sample page */ 22 | 23 | aside { 24 | display: block; 25 | position: fixed; 26 | margin-top: 52px; 27 | padding: 16px 16px 0 8px; 28 | line-height: 25px; 29 | width: 300px; 30 | height: calc(100% - 76px); 31 | font-size: 0.9em; 32 | overflow-y: auto; 33 | } 34 | 35 | aside h1 { 36 | margin-bottom: 0.5em; 37 | font-size: 1.3em; 38 | } 39 | 40 | aside h2 { 41 | margin-bottom: 0.3em; 42 | font-size: 1.1em; 43 | } 44 | 45 | aside hr { 46 | margin-top: 1em; 47 | } 48 | 49 | aside input[type=radio], 50 | aside input[type=checkbox] { 51 | margin-left: 20px; 52 | } 53 | 54 | aside .file-formats { 55 | display: flex; 56 | } 57 | 58 | aside .file-formats ul { 59 | flex-grow: 1; 60 | } 61 | 62 | #viewer { 63 | display: inline-block; 64 | width: calc(100% - 330px); 65 | height: calc(100% - 60px); 66 | margin-top: 60px; 67 | margin-left: 330px; 68 | -webkit-box-shadow: 1px 1px 10px #999; 69 | box-shadow: 1px 1px 10px #999; 70 | } 71 | 72 | /* Header element in all pages */ 73 | 74 | header { 75 | position: fixed; 76 | left: 0; 77 | top: 0; 78 | width: 100vw; 79 | height: 60px; 80 | padding: 8px; 81 | -webkit-box-sizing: border-box; 82 | box-sizing: border-box; 83 | background: #00a5e4; 84 | } 85 | 86 | header .container { 87 | width: 100%; 88 | height: 100%; 89 | -webkit-box-sizing: border-box; 90 | box-sizing: border-box; 91 | min-width: 900px; 92 | max-width: 1200px; 93 | margin: 0 auto; 94 | padding: 0 10px; 95 | } 96 | 97 | header .container > div:first-child { 98 | float: left; 99 | } 100 | 101 | header .container > div:first-child > a { 102 | display: inline-block; 103 | width: 242px; 104 | height: 44px; 105 | } 106 | 107 | header .container > div:last-child { 108 | float: right; 109 | height: 44px; 110 | } 111 | 112 | header .title { 113 | color: white; 114 | font-size: 1.7em; 115 | line-height: 44px; 116 | margin-left: 8px; 117 | float: right; 118 | } 119 | 120 | header .title.sample { 121 | font-size: 1.2em; 122 | float: left; 123 | overflow: hidden; 124 | text-overflow: ellipsis; 125 | white-space: nowrap; 126 | max-width: calc(100% - 52px); 127 | } 128 | 129 | header .button { 130 | display: inline-block; 131 | padding: 12px 17px; 132 | margin: 0 10px; 133 | color: white; 134 | text-decoration: none; 135 | border: 1px solid white; 136 | border-radius: 5px; 137 | } 138 | 139 | header .button.filled { 140 | background: white; 141 | color: #00a5e4; 142 | } 143 | 144 | header .logo { 145 | display: block; 146 | width: 160px; 147 | height: 100%; 148 | margin-right: 82px; 149 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDgiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0MDggNDQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTM5My4xNywwLjQgTDM5My4xNywzMiBDMzkzLjE3LDMyLjYgMzkyLjkxLDMzLjEgMzkyLjQxLDMzLjUgQzM5MS44OSwzMy44IDM5MS4yOSwzNCAzOTAuNTgsMzQgQzM5MC4wMSwzNCAzODkuNDUsMzMuOSAzODguOSwzMy43IEMzODguMzcsMzMuNSAzODcuOTMsMzMuMSAzODcuNiwzMi43IEMzODYuNDIsMzEgMzg0LjU1LDI2LjcgMzgyLDE5LjkgQzM3OS43LDEzLjYgMzc3LjI3LDkuMSAzNzQuNzIsNi4zIEMzNzAuODgsMi4xIDM2NS43NSwzLjYzNzk3ODgxZS0xMiAzNTkuMzIsMy42Mzc5Nzg4MWUtMTIgQzM1NC41MSwzLjYzNzk3ODgxZS0xMiAzNTAuNTQsMC43IDM0Ny40NCwyIEMzNDMuODcsMy43IDM0Mi4wNyw2IDM0Mi4wNyw5LjEgTDM0Mi4wNyw0Mi44IEwzNTYuNDgsNDIuOCBMMzU2LjQ4LDExLjIgQzM1Ni40OCwxMC42IDM1Ni42NSwxMC4yIDM1Ni45OSw5LjggQzM1Ny4zMiw5LjUgMzU3Ljk2LDkuMyAzNTguODgsOS4xIEMzNjAuMjUsOSAzNjIuMDEsMTAuOCAzNjQuMTQsMTQuNiBDMzY1LjY1LDE3LjIgMzY3LjQ2LDIxLjEgMzY5LjYxLDI2LjIgQzM3MS45LDMxLjYgMzczLjE5LDM0LjYgMzczLjQ4LDM1LjEgQzM3NC44OCwzNy45IDM3Ny4zLDQwIDM4MC43MSw0MS41IEMzODMuNzQsNDIuOCAzODcuMTksNDMuNCAzOTEuMDcsNDMuNCBDMzk1LjUsNDMuNCAzOTkuMzIsNDIuNiA0MDIuNTEsNDEgQzQwNS44OSwzOS4yIDQwNy41OCwzNyA0MDcuNTgsMzQuMyBMNDA3LjU4LDAuNCBMMzkzLjE3LDAuNCBaIE0zMjIuMjksMjkuOSBDMzIwLjIyLDMyLjUgMzE3LjQ3LDMzLjggMzE0LjA2LDMzLjggTDI5Ny42NCwzMy44IEMyOTQuMiwzMy44IDI5MS40NSwzMi41IDI4OS40MSwyOS45IEMyODcuNTYsMjcuNiAyODYuNjMsMjQuNyAyODYuNjMsMjEuNCBDMjg2LjYzLDE4LjIgMjg3LjU1LDE1LjUgMjg5LjM2LDEzLjMgQzI5MS4zOCwxMC45IDI5NC4xMyw5LjcgMjk3LjY0LDkuNyBMMzE0LjA2LDkuNyBDMzE3LjYsOS43IDMyMC4zNywxMC45IDMyMi4zOSwxMy4zIEMzMjQuMjEsMTUuNSAzMjUuMTIsMTguMiAzMjUuMTIsMjEuNCBDMzI1LjEyLDI0LjcgMzI0LjE4LDI3LjYgMzIyLjI5LDI5LjkgTDMyMi4yOSwyOS45IFogTTMxNi40NCwwLjggTDI5NS4yNCwwLjggQzI4Ny43NCwwLjggMjgxLjc2LDMgMjc3LjI4LDcuNSBDMjc1LjEzLDkuNyAyNzMuNTcsMTIuMSAyNzIuNTcsMTQuNyBDMjcyLjYxLDE0LjMgMjcyLjYzLDEzLjkgMjcyLjYzLDEzLjUgQzI3Mi42MywxMC4xIDI3MS4xNyw3LjEgMjY4LjIyLDQuOCBDMjY1LDIuMSAyNjAuNjMsMC44IDI1NS4xLDAuOCBMMTcyLjI2LDAuOCBMMTcyLjI2LDkuNyBMMTg2Ljg4LDkuNyBMMTg2Ljg4LDQyLjkgTDIwMS4wOSw0Mi45IEwyMDEuMDksOS43IEwyNTIuNzMsOS43IEMyNTQuMzUsOS43IDI1NS42NCwxMC4xIDI1Ni41NiwxMC45IEMyNTcuMzgsMTEuNiAyNTcuODEsMTIuNSAyNTcuODEsMTMuNSBDMjU3LjgxLDE0LjUgMjU3LjM4LDE1LjMgMjU2LjU2LDE2IEMyNTUuNjQsMTYuOCAyNTQuMzUsMTcuMSAyNTIuNzMsMTcuMSBMMjM1LjA5LDE3LjEgQzIyOS4zMiwxNy4xIDIyNC45NCwxOC4zIDIyMS45NiwyMC43IEMyMTkuMzcsMjIuOCAyMTguMDgsMjUuNSAyMTguMDgsMjguOSBMMjE4LjA4LDQyLjggTDIzMi4yOSw0Mi44IEwyMzIuMjksMzIuMyBMMjczLjE1LDQzLjcgTDI3My4xNSwzMy44IEwyNDYuMTQsMjYuMiBMMjU1LjEsMjYuMiBDMjYwLjY2LDI2LjIgMjY1LjA1LDI0LjkgMjY4LjI3LDIyLjMgQzI2OS43OCwyMSAyNzAuODksMTkuNyAyNzEuNjEsMTguMSBDMjcxLjM4LDE5LjQgMjcxLjI2LDIwLjggMjcxLjI2LDIyLjIgQzI3MS4yNiwyNy44IDI3My4yMywzMi42IDI3Ny4xOSwzNi40IEMyODEuNiw0MC43IDI4Ny42Miw0Mi45IDI5NS4yNCw0Mi45IEwzMTYuNDQsNDIuOSBDMzI0LjEsNDIuOSAzMzAuMTMsNDAuNyAzMzQuNTMsMzYuNCBDMzM4LjQ3LDMyLjYgMzQwLjQzLDI3LjggMzQwLjQzLDIyLjIgQzM0MC40MywxNi40IDMzOC40MSwxMS41IDMzNC40LDcuNSBDMzI5LjkzLDMgMzIzLjk0LDAuOCAzMTYuNDQsMC44IEwzMTYuNDQsMC44IFogTTEyNC43OCwzLjggQzEyMS42Niw1LjUgMTE5LjM1LDggMTE3Ljg5LDExLjQgQzExNi42OCwxNC4yIDExNi4wNywxNy41IDExNi4wNywyMS41IEwxMTYuMDcsNDIuOSBMMTMwLjQ4LDQyLjkgTDEzMC40OCwyNi4yIEwxNzAuODgsMjYuMiBMMTcwLjg4LDE3LjEgTDEzMC40OCwxNy4xIEMxMzAuNTcsMTYuNSAxMzAuNjksMTUuOSAxMzAuODIsMTUuMiBDMTMxLjIzLDEzLjcgMTMxLjk2LDEyLjUgMTMzLjAyLDExLjYgQzEzNC40OSwxMC4zIDEzNi40OSw5LjcgMTM5LjAxLDkuNyBMMTcwLjg4LDkuNyBMMTcwLjg4LDAuOCBMMTM5LjAxLDAuOCBDMTMzLjExLDAuOCAxMjguMzcsMS44IDEyNC43OCwzLjggTDEyNC43OCwzLjggWiBNOTUuNDQsMjkuOSBDOTMuMzcsMzIuNSA5MC42MiwzMy44IDg3LjIxLDMzLjggTDcyLjIyLDMzLjggTDcyLjIyLDkuNyBMODcuMjEsOS43IEM5MC43NSw5LjcgOTMuNTMsMTAuOSA5NS41NCwxMy4zIEM5Ny4zMywxNS41IDk4LjIyLDE4LjIgOTguMjIsMjEuNCBDOTguMjIsMjQuOCA5Ny4yOSwyNy42IDk1LjQ0LDI5LjkgTDk1LjQ0LDI5LjkgWiBNODkuNjEsMC44IEw1Ny44MSwwLjggTDU3LjgxLDQyLjkgTDg5LjYxLDQyLjkgQzk3LjI2LDQyLjkgMTAzLjI5LDQwLjcgMTA3LjcxLDM2LjQgQzExMS42MywzMi42IDExMy41OSwyNy44IDExMy41OSwyMi4yIEMxMTMuNTksMTYuNCAxMTEuNTksMTEuNSAxMDcuNTYsNy41IEMxMDMuMDksMyA5Ny4xMSwwLjggODkuNjEsMC44IEw4OS42MSwwLjggWiBNNTAuMTcsNC44IEM0Ni45NSwyLjEgNDIuNTcsMC44IDM3LjA1LDAuOCBMMC4wNCwwLjggTDAuMDQsOS43IEwzNC42Niw5LjcgQzM2LjMsOS43IDM3LjU4LDEwLjEgMzguNSwxMC45IEMzOS4zNCwxMS42IDM5Ljc1LDEyLjUgMzkuNzUsMTMuNSBDMzkuNzUsMTQuNSAzOS4zNCwxNS4zIDM4LjUsMTYgQzM3LjU4LDE2LjggMzYuMywxNy4xIDM0LjY2LDE3LjEgTDE3LjA0LDE3LjEgQzExLjI2LDE3LjEgNi44OSwxOC4zIDMuOTEsMjAuNyBDMS4zMiwyMi44IDAuMDQsMjUuNiAwLjA0LDI4LjkgQzAuMDIsMzEuMSAxLjI2MjE3NzQ1ZS0yOSwzMy4yIDEuMjYyMTc3NDVlLTI5LDM1LjIgTDEuMjYyMTc3NDVlLTI5LDQwIEMxLjI2MjE3NzQ1ZS0yOSw0MS4yIDAuMDIsNDIuMiAwLjA0LDQyLjkgTDE0LjIzLDQyLjkgTDE0LjIzLDMzLjkgQzE0LjE0LDMzLjggMTQuMDksMzMuNiAxNC4wNywzMy40IEMxNC4wNCwzMy4zIDE0LjAzLDMzIDE0LjAzLDMyLjUgQzE0LjAzLDMwLjkgMTQuNTQsMjkuNiAxNS41NywyOC42IEMxNy4xLDI3IDE5LjYzLDI2LjIgMjMuMTgsMjYuMiBMMzcuMDMsMjYuMiBDNDIuNiwyNi4yIDQ3LDI0LjkgNTAuMjIsMjIuMyBDNTMuMTIsMTkuOSA1NC41OCwxNyA1NC41OCwxMy41IEM1NC41OCwxMC4xIDUzLjExLDcuMSA1MC4xNyw0LjggTDUwLjE3LDQuOCBaIi8+PC9zdmc+); 150 | background-size: contain; 151 | background-repeat: no-repeat; 152 | background-position: center; 153 | } 154 | 155 | header .menu { 156 | width: 40px; 157 | height: 40px; 158 | display: none; 159 | cursor: pointer; 160 | float: right; 161 | } 162 | 163 | header .menu div { 164 | width: 32px; 165 | height: 4px; 166 | background-color: white; 167 | margin: 7px 4px; 168 | } 169 | 170 | /* Section element in navigation pages */ 171 | 172 | section { 173 | display: -webkit-box; 174 | display: -ms-flexbox; 175 | display: flex; 176 | flex-direction: column; 177 | -webkit-box-sizing: border-box; 178 | box-sizing: border-box; 179 | width: 100%; 180 | min-width: 900px; 181 | max-width: 1200px; 182 | margin: 60px auto 0; 183 | padding: 0 10px; 184 | } 185 | 186 | section h1 { 187 | margin-bottom: 1.3em; 188 | } 189 | 190 | section h4 { 191 | margin-top: 2em; 192 | margin-bottom: 0.5em; 193 | } 194 | 195 | section .content { 196 | display: inline-block; 197 | width: 100%; 198 | line-height: 1.5em; 199 | } 200 | 201 | section .content h2 { 202 | margin-top: 2em; 203 | } 204 | 205 | section .content p { 206 | margin: 0; 207 | } 208 | 209 | section .content a { 210 | text-decoration: none; 211 | color: #00a5e4; 212 | } 213 | 214 | section .inline { 215 | margin-top: 10px; 216 | } 217 | 218 | section .inline a { 219 | margin-right: 20px; 220 | } 221 | 222 | .cardWrapper { 223 | margin-top: 60px; 224 | width: 100%; 225 | } 226 | .cardWrapper .card { 227 | border: solid 1px; 228 | text-align: center; 229 | border-radius: 5px; 230 | margin: 10px auto; 231 | padding: 20px; 232 | width: 300px; 233 | height: 100px; 234 | } 235 | 236 | /* Buttons */ 237 | .Button { 238 | display: -ms-inline-flexbox; 239 | display: inline-flex; 240 | -ms-flex-pack: center; 241 | justify-content: center; 242 | -ms-flex-align: center; 243 | align-items: center; 244 | padding: 10px 25px; 245 | border-radius: 4px; 246 | background-color: #00a5e4; 247 | line-height: 16px; 248 | color: #fff; 249 | cursor: pointer; 250 | -webkit-transition: background-color .15s ease; 251 | transition: background-color .15s ease; 252 | white-space: nowrap; 253 | text-decoration: none; 254 | } 255 | 256 | /* Input fields */ 257 | input[type=text] { 258 | border-radius: 4px; 259 | padding: 8px; 260 | margin: 4px; 261 | -webkit-box-sizing: border-box; 262 | box-sizing: border-box; 263 | width: 100%; 264 | font-size: 16px!important; 265 | border: 1px solid #e0e0e0; 266 | } 267 | 268 | select { 269 | border-radius: 4px; 270 | padding: 8px; 271 | margin: 4px; 272 | -webkit-box-sizing: border-box; 273 | box-sizing: border-box; 274 | width: 100%; 275 | font-size: 16px!important; 276 | border: 1px solid #e0e0e0; 277 | } 278 | 279 | div img { 280 | max-width: 100%; 281 | height: 40px; 282 | padding: 5px; 283 | } 284 | 285 | div img:hover { 286 | cursor: pointer; 287 | } 288 | 289 | /* Smaller screens */ 290 | 291 | @media (max-width: 800px) { 292 | header .menu { 293 | display: block; 294 | } 295 | 296 | aside { 297 | display: none; 298 | position: fixed; 299 | left: 0; 300 | background: white; 301 | box-shadow: 50px 0 50px rgba(0, 0, 0, 0.2); 302 | } 303 | 304 | #viewer { 305 | width: 100vw; 306 | margin-left: 0; 307 | } 308 | } -------------------------------------------------------------------------------- /scripts/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'production'; 5 | process.env.NODE_ENV = 'production'; 6 | 7 | // Makes the script crash on unhandled rejections instead of silently 8 | // ignoring them. In the future, promise rejections that are not handled will 9 | // terminate the Node.js process with a non-zero exit code. 10 | process.on('unhandledRejection', err => { 11 | throw err; 12 | }); 13 | 14 | // Ensure environment variables are read. 15 | require('../config/env'); 16 | 17 | 18 | const path = require('path'); 19 | const chalk = require('chalk'); 20 | const fs = require('fs-extra'); 21 | const webpack = require('webpack'); 22 | const bfj = require('bfj'); 23 | const config = require('../config/webpack.config.prod'); 24 | const paths = require('../config/paths'); 25 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 26 | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); 27 | const printHostingInstructions = require('react-dev-utils/printHostingInstructions'); 28 | const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); 29 | const printBuildError = require('react-dev-utils/printBuildError'); 30 | 31 | const measureFileSizesBeforeBuild = 32 | FileSizeReporter.measureFileSizesBeforeBuild; 33 | const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild; 34 | const useYarn = fs.existsSync(paths.yarnLockFile); 35 | 36 | // These sizes are pretty large. We'll warn for bundles exceeding them. 37 | const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024; 38 | const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024; 39 | 40 | const isInteractive = process.stdout.isTTY; 41 | 42 | // Warn and crash if required files are missing 43 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 44 | process.exit(1); 45 | } 46 | 47 | // Process CLI arguments 48 | const argv = process.argv.slice(2); 49 | const writeStatsJson = argv.indexOf('--stats') !== -1; 50 | 51 | // We require that you explicitly set browsers and do not fall back to 52 | // browserslist defaults. 53 | const { checkBrowsers } = require('react-dev-utils/browsersHelper'); 54 | checkBrowsers(paths.appPath, isInteractive) 55 | .then(() => { 56 | // First, read the current file sizes in build directory. 57 | // This lets us display how much they changed later. 58 | return measureFileSizesBeforeBuild(paths.appBuild); 59 | }) 60 | .then(previousFileSizes => { 61 | // Remove all content but keep the directory so that 62 | // if you're in it, you don't end up in Trash 63 | fs.emptyDirSync(paths.appBuild); 64 | // Merge with the public folder 65 | copyPublicFolder(); 66 | // Start the webpack build 67 | return build(previousFileSizes); 68 | }) 69 | .then( 70 | ({ stats, previousFileSizes, warnings }) => { 71 | if (warnings.length) { 72 | console.log(chalk.yellow('Compiled with warnings.\n')); 73 | console.log(warnings.join('\n\n')); 74 | console.log( 75 | '\nSearch for the ' + 76 | chalk.underline(chalk.yellow('keywords')) + 77 | ' to learn more about each warning.' 78 | ); 79 | console.log( 80 | 'To ignore, add ' + 81 | chalk.cyan('// eslint-disable-next-line') + 82 | ' to the line before.\n' 83 | ); 84 | } else { 85 | console.log(chalk.green('Compiled successfully.\n')); 86 | } 87 | 88 | console.log('File sizes after gzip:\n'); 89 | printFileSizesAfterBuild( 90 | stats, 91 | previousFileSizes, 92 | paths.appBuild, 93 | WARN_AFTER_BUNDLE_GZIP_SIZE, 94 | WARN_AFTER_CHUNK_GZIP_SIZE 95 | ); 96 | console.log(); 97 | 98 | const appPackage = require(paths.appPackageJson); 99 | const publicUrl = paths.publicUrl; 100 | const publicPath = config.output.publicPath; 101 | const buildFolder = path.relative(process.cwd(), paths.appBuild); 102 | printHostingInstructions( 103 | appPackage, 104 | publicUrl, 105 | publicPath, 106 | buildFolder, 107 | useYarn 108 | ); 109 | }, 110 | err => { 111 | console.log(chalk.red('Failed to compile.\n')); 112 | printBuildError(err); 113 | process.exit(1); 114 | } 115 | ) 116 | .catch(err => { 117 | if (err && err.message) { 118 | console.log(err.message); 119 | } 120 | process.exit(1); 121 | }); 122 | 123 | // Create the production build and print the deployment instructions. 124 | function build(previousFileSizes) { 125 | console.log('Creating an optimized production build...'); 126 | 127 | let compiler = webpack(config); 128 | return new Promise((resolve, reject) => { 129 | compiler.run((err, stats) => { 130 | let messages; 131 | if (err) { 132 | if (!err.message) { 133 | return reject(err); 134 | } 135 | messages = formatWebpackMessages({ 136 | errors: [err.message], 137 | warnings: [], 138 | }); 139 | } else { 140 | messages = formatWebpackMessages( 141 | stats.toJson({ all: false, warnings: true, errors: true }) 142 | ); 143 | } 144 | if (messages.errors.length) { 145 | // Only keep the first error. Others are often indicative 146 | // of the same problem, but confuse the reader with noise. 147 | if (messages.errors.length > 1) { 148 | messages.errors.length = 1; 149 | } 150 | return reject(new Error(messages.errors.join('\n\n'))); 151 | } 152 | if ( 153 | process.env.CI && 154 | (typeof process.env.CI !== 'string' || 155 | process.env.CI.toLowerCase() !== 'false') && 156 | messages.warnings.length 157 | ) { 158 | console.log( 159 | chalk.yellow( 160 | '\nTreating warnings as errors because process.env.CI = true.\n' + 161 | 'Most CI servers set it automatically.\n' 162 | ) 163 | ); 164 | return reject(new Error(messages.warnings.join('\n\n'))); 165 | } 166 | 167 | const resolveArgs = { 168 | stats, 169 | previousFileSizes, 170 | warnings: messages.warnings, 171 | }; 172 | if (writeStatsJson) { 173 | return bfj 174 | .write(paths.appBuild + '/bundle-stats.json', stats.toJson()) 175 | .then(() => resolve(resolveArgs)) 176 | .catch(error => reject(new Error(error))); 177 | } 178 | 179 | return resolve(resolveArgs); 180 | }); 181 | }); 182 | } 183 | 184 | function copyPublicFolder() { 185 | fs.copySync(paths.appPublic, paths.appBuild, { 186 | dereference: true, 187 | filter: file => file !== paths.appHtml, 188 | }); 189 | } 190 | -------------------------------------------------------------------------------- /scripts/start.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'development'; 5 | process.env.NODE_ENV = 'development'; 6 | 7 | // Makes the script crash on unhandled rejections instead of silently 8 | // ignoring them. In the future, promise rejections that are not handled will 9 | // terminate the Node.js process with a non-zero exit code. 10 | process.on('unhandledRejection', err => { 11 | throw err; 12 | }); 13 | 14 | // Ensure environment variables are read. 15 | require('../config/env'); 16 | 17 | 18 | const fs = require('fs'); 19 | const chalk = require('chalk'); 20 | const webpack = require('webpack'); 21 | const WebpackDevServer = require('webpack-dev-server'); 22 | const clearConsole = require('react-dev-utils/clearConsole'); 23 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 24 | const { 25 | choosePort, 26 | createCompiler, 27 | prepareProxy, 28 | prepareUrls, 29 | } = require('react-dev-utils/WebpackDevServerUtils'); 30 | const openBrowser = require('react-dev-utils/openBrowser'); 31 | const paths = require('../config/paths'); 32 | const config = require('../config/webpack.config.dev'); 33 | const createDevServerConfig = require('../config/webpackDevServer.config'); 34 | 35 | const useYarn = fs.existsSync(paths.yarnLockFile); 36 | const isInteractive = process.stdout.isTTY; 37 | 38 | // Warn and crash if required files are missing 39 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 40 | process.exit(1); 41 | } 42 | 43 | // Tools like Cloud9 rely on this. 44 | const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; 45 | const HOST = process.env.HOST || '0.0.0.0'; 46 | 47 | if (process.env.HOST) { 48 | console.log( 49 | chalk.cyan( 50 | `Attempting to bind to HOST environment variable: ${chalk.yellow( 51 | chalk.bold(process.env.HOST) 52 | )}` 53 | ) 54 | ); 55 | console.log( 56 | `If this was unintentional, check that you haven't mistakenly set it in your shell.` 57 | ); 58 | console.log( 59 | `Learn more here: ${chalk.yellow('http://bit.ly/CRA-advanced-config')}` 60 | ); 61 | console.log(); 62 | } 63 | 64 | // We require that you explictly set browsers and do not fall back to 65 | // browserslist defaults. 66 | const { checkBrowsers } = require('react-dev-utils/browsersHelper'); 67 | checkBrowsers(paths.appPath, isInteractive) 68 | .then(() => { 69 | // We attempt to use the default port but if it is busy, we offer the user to 70 | // run on a different port. `choosePort()` Promise resolves to the next free port. 71 | return choosePort(HOST, DEFAULT_PORT); 72 | }) 73 | .then(port => { 74 | if (port == null) { 75 | // We have not found a port. 76 | return; 77 | } 78 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; 79 | const appName = require(paths.appPackageJson).name; 80 | const urls = prepareUrls(protocol, HOST, port); 81 | // Create a webpack compiler that is configured with custom messages. 82 | const compiler = createCompiler(webpack, config, appName, urls, useYarn); 83 | // Load proxy config 84 | const proxySetting = require(paths.appPackageJson).proxy; 85 | const proxyConfig = prepareProxy(proxySetting, paths.appPublic); 86 | // Serve webpack assets generated by the compiler over a web server. 87 | const serverConfig = createDevServerConfig( 88 | proxyConfig, 89 | urls.lanUrlForConfig 90 | ); 91 | const devServer = new WebpackDevServer(compiler, serverConfig); 92 | // Launch WebpackDevServer. 93 | devServer.listen(port, HOST, err => { 94 | if (err) { 95 | return console.log(err); 96 | } 97 | if (isInteractive) { 98 | clearConsole(); 99 | } 100 | console.log(chalk.cyan('Starting the development server...\n')); 101 | openBrowser(urls.localUrlForBrowser); 102 | }); 103 | 104 | ['SIGINT', 'SIGTERM'].forEach(function(sig) { 105 | process.on(sig, function() { 106 | devServer.close(); 107 | process.exit(); 108 | }); 109 | }); 110 | }) 111 | .catch(err => { 112 | if (err && err.message) { 113 | console.log(err.message); 114 | } 115 | process.exit(1); 116 | }); 117 | -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'test'; 5 | process.env.NODE_ENV = 'test'; 6 | process.env.PUBLIC_URL = ''; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | 19 | const jest = require('jest'); 20 | const execSync = require('child_process').execSync; 21 | let argv = process.argv.slice(2); 22 | 23 | function isInGitRepository() { 24 | try { 25 | execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' }); 26 | return true; 27 | } catch (e) { 28 | return false; 29 | } 30 | } 31 | 32 | function isInMercurialRepository() { 33 | try { 34 | execSync('hg --cwd . root', { stdio: 'ignore' }); 35 | return true; 36 | } catch (e) { 37 | return false; 38 | } 39 | } 40 | 41 | // Watch unless on CI, in coverage mode, or explicitly running all tests 42 | if ( 43 | !process.env.CI && 44 | argv.indexOf('--coverage') === -1 && 45 | argv.indexOf('--watchAll') === -1 46 | ) { 47 | // https://github.com/facebook/create-react-app/issues/5210 48 | const hasSourceControl = isInGitRepository() || isInMercurialRepository(); 49 | argv.push(hasSourceControl ? '--watch' : '--watchAll'); 50 | } 51 | 52 | 53 | jest.run(argv); 54 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | } 7 | 8 | .App .header { 9 | width: 100%; 10 | height: 60px; 11 | padding: 8px 8px 8px 16px; 12 | box-sizing: border-box; 13 | background: #00a5e4; 14 | font-size: 1.2em; 15 | line-height: 44px; 16 | color: white; 17 | } -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useRef, useEffect, useState } from 'react'; 2 | import WebViewer from '@pdftron/webviewer'; 3 | import { initializeVideoViewer } from '@pdftron/webviewer-video'; 4 | import './App.css'; 5 | import { 6 | initializeAudioViewer 7 | } from '@pdftron/webviewer-audio'; 8 | import { 9 | demoPeaks, 10 | demoXFDFString, 11 | } from './constants/demo-vars'; 12 | 13 | const App = () => { 14 | const viewer = useRef(null); 15 | const inputFile = useRef(null); 16 | const [state, setState] = useState({ instance: null, videoInstance: null, audioInstance: null }); 17 | 18 | useEffect(() => { 19 | WebViewer.Iframe( 20 | { 21 | path: '/webviewer/lib', 22 | enableRedaction: process.env.DEMO ? true : false, 23 | }, 24 | viewer.current, 25 | ).then(async instance => { 26 | const license = `---- Insert commercial license key here after purchase ----`; 27 | const videoUrl = 'https://pdftron.s3.amazonaws.com/downloads/pl/video/video.mp4'; 28 | 29 | const audioInstance = await initializeAudioViewer( 30 | instance, 31 | { license }, 32 | ); 33 | 34 | const videoInstance = await initializeVideoViewer( 35 | instance, 36 | { 37 | license, 38 | AudioComponent: audioInstance.Waveform, 39 | isDemoMode: process.env.DEMO, 40 | generatedPeaks: !process.env.DEMO ? null : demoPeaks, // waves can be pre-generated as seen here for fast loading: https://github.com/bbc/audiowaveform 41 | enableRedaction: process.env.DEMO ? true : false, 42 | } 43 | ); 44 | 45 | instance.UI.setTheme('dark'); 46 | 47 | setState({ instance, videoInstance, audioInstance }); 48 | 49 | // Load a video at a specific url. Can be a local or public link 50 | // If local it needs to be relative to lib/ui/index.html. 51 | // Or at the root. (eg '/video.mp4') 52 | videoInstance.loadVideo(videoUrl); 53 | initializeHeader(instance); 54 | 55 | if (process.env.DEMO) { 56 | const { documentViewer } = instance.Core; 57 | const annotManager = documentViewer.getAnnotationManager(); 58 | // Load saved annotations 59 | documentViewer.addEventListener( 60 | 'videoElementReady', 61 | async () => { 62 | const video = videoInstance.getVideo(); 63 | const xfdfString = demoXFDFString; 64 | await annotManager.importAnnotations(xfdfString); 65 | video.updateAnnotationsToTime(0); 66 | }, 67 | { once: true }, 68 | ); 69 | } 70 | }); 71 | }, []); 72 | 73 | const onFileChange = async event => { 74 | const file = event.target.files[0]; 75 | const url = URL.createObjectURL(file); 76 | const { instance, videoInstance, audioInstance } = state; 77 | 78 | // Seamlessly switch between PDFs and videos. 79 | // Can also detect by specific video file types (ie. mp4, ogg, etc.) 80 | if (file.type.includes('video') || 81 | (file.name.includes('.mpd') && file.type === '') 82 | ) { 83 | videoInstance.loadVideo(url, { fileName: file.name }); 84 | // TODO: Notespanel needs to be delayed when opening. Not sure why. 85 | setTimeout(() => { 86 | instance.openElements('notesPanel'); 87 | }); 88 | } else if (file.type.includes('audio')) { 89 | audioInstance.loadAudio(url, { fileName: file.name }); 90 | 91 | setTimeout(() => { 92 | instance.UI.openElements('notesPanel'); 93 | }); 94 | } else { 95 | instance.UI.setToolMode('AnnotationEdit'); 96 | instance.UI.loadDocument(url); 97 | } 98 | }; 99 | 100 | function initializeHeader(instance) { 101 | const { setHeaderItems } = instance.UI; 102 | 103 | setHeaderItems(header => { 104 | // Add upload file button 105 | header.push({ 106 | type: 'actionButton', 107 | img: ` 108 | 109 | 110 | `, 111 | title: 'Load file', 112 | dataElement: 'audio-loadFileButton', 113 | onClick: () => { 114 | inputFile.current.click(); 115 | } 116 | }); 117 | }); 118 | } 119 | 120 | return ( 121 |
122 | 123 |
124 |
125 | ); 126 | }; 127 | 128 | export default App; 129 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | const root = createRoot(div); 8 | root.render(); 9 | root.unmount(); 10 | }); 11 | -------------------------------------------------------------------------------- /src/constants/demo-vars.js: -------------------------------------------------------------------------------- 1 | const demoPeaks = [0.004488801117986441,-0.00441663758829236,0.003447413444519043,-0.0019602268002927303,0.005447397008538246,-0.0074973334558308125,0.005776298698037863,-0.007110693026334047,0.006759031675755978,-0.015885865315794945,0.009044842794537544,-0.004992626141756773,0.008667669259011745,-0.017191193997859955,0.014037245884537697,-0.02124406024813652,0.020891251042485237,-0.013409513048827648,0.021609889343380928,-0.01464191172271967,0.016176797449588776,-0.029334811493754387,0.014477245509624481,-0.020248569548130035,0.019274594262242317,-0.014578934758901596,0.016756748780608177,-0.018712865188717842,0.007440043613314629,-0.008908235467970371,0.00830478873103857,-0.006794546265155077,0.0036025370936840773,-0.012942676432430744,0.012104206718504429,-0.01060642208904028,0.007908238098025322,-0.01699492335319519,0.02032618224620819,-0.012636110186576843,0.023779040202498436,-0.018634293228387833,0.021998420357704163,-0.016747107729315758,0.014297660440206528,-0.016521938145160675,0.029037900269031525,-0.021769290789961815,0.05107530951499939,-0.04137527942657471,0.23863531649112701,-0.13323862850666046,0.1511359065771103,-0.14773905277252197,0.18459627032279968,-0.11760745197534561,0.07381268590688705,-0.1346278041601181,0.16822686791419983,-0.14016729593276978,0.09201414883136749,-0.07892842590808868,0.053997695446014404,-0.08407357335090637,0.09893524646759033,-0.12884114682674408,0.07421387732028961,-0.17979088425636292,0.15127936005592346,-0.03969345986843109,0.058587074279785156,-0.10001654922962189,0.13180378079414368,-0.2737463116645813,0.13977117836475372,-0.1605166494846344,0.1875695437192917,-0.14000298082828522,0.10729985684156418,-0.1654379516839981,0.11601059883832932,-0.11747226864099503,0.08730103820562363,-0.06605542451143265,0.041217200458049774,-0.08155322819948196,0.09148998558521271,-0.10163456946611404,0.13080130517482758,-0.10898414254188538,0.12473034858703613,-0.13339832425117493,0.09513356536626816,-0.06602403521537781,0.07495782524347305,-0.06255154311656952,0.06809112429618835,-0.04717785120010376,0.04316367954015732,-0.03278038650751114,0.04755218327045441,-0.050740040838718414,0.06527787446975708,-0.0364360474050045,0.39113089442253113,-0.285726934671402,0.011151927523314953,-0.2951170802116394,0.01145494170486927,-0.015613739378750324,0.02248203381896019,-0.4394821524620056,0.050347767770290375,-0.0778103694319725,0.0738903284072876,-0.020220424979925156,0.003931347280740738,-0.0034281208645552397,0.007389038801193237,-0.004509613383561373,0.024647263810038567,-0.016432737931609154,0.015448053367435932,-0.02929273061454296,0.020230770111083984,-0.014119028113782406,0.0012546390062198043,-0.03886529803276062,0.009580433368682861,-0.02123614214360714,0.01508643664419651,-0.020059701055288315,0.013310093432664871,-0.007822122424840927,0.01768903061747551,-0.023645808920264244,0.02698102779686451,-0.014434759505093098,0.015532022342085838,-0.01951998844742775,0.007054457440972328,-0.023955710232257843,0.022617939859628677,-0.022404223680496216,0.029881561174988747,-0.01840588077902794,0.015814950689673424,-0.017658183351159096,0.014131478033959866,-0.014168472960591316,0.010765351355075836,-0.019470306113362312,0.019648512825369835,-0.011742278933525085,0.018889224156737328,-0.014596267603337765,0.021231859922409058,-0.01614357717335224,0.015756621956825256,-0.012202468700706959,0.02837153896689415,-0.013781707733869553,0.029078179970383644,-0.021955689415335655,0.027296362444758415,-0.033982135355472565,0.03898013010621071,-0.01965472847223282,0.032527171075344086,-0.03009328432381153,0.01791800558567047,-0.03703382983803749,0.019049298018217087,-0.027842072769999504,0.031248081475496292,-0.050599656999111176,0.08391648530960083,-0.0374213308095932,0.024716556072235107,-0.10343863815069199,0.02665453776717186,-0.059825967997312546,0.0439288429915905,-0.0650569349527359,0.0073032681830227375,-0.07740215212106705,0.07668699324131012,-0.14168600738048553,0.05732628330588341,-0.04441991448402405,0.061202745884656906,-0.11487419903278351,0.07050404697656631,-0.08195758610963821,0.04402872174978256,-0.06266447901725769,0.05235915258526802,-0.05818919464945793,0.042164500802755356,-0.05153396353125572,0.03554374352097511,-0.033495113253593445,0.0312328040599823,-0.03262878209352493,0.01976517029106617,-0.028264865279197693,0.013819870539009571,-0.02054428495466709,0.02167264185845852,-0.021434934809803963,0.019021546468138695,-0.02198193408548832,0.014691103249788284,-0.011238853447139263,0.010737420059740543,-0.02303740195930004,0.01586567610502243,-0.012350023724138737,0.007352618500590324,-0.007691277656704187,0.004834698513150215,-0.008096665143966675,0.014123320579528809,-0.00619433494284749,0.009039562195539474,-0.009973268024623394,0.002704029204323888,-0.0050501530058681965,0.004433595109730959,-0.0026427237316966057,0.003913403023034334,-0.002764835488051176,0.01470866147428751,-0.008634937927126884,0.015339940786361694,-0.024491677060723305,0.026262737810611725,-0.020152058452367783,0.01491732057183981,-0.028060222044587135,0.02436549961566925,-0.0277254618704319,0.0346391387283802,-0.11684053391218185,0.0077787102200090885,-0.0087583614513278,0.004405489191412926,-0.008305455558001995,0.003394987201318145,-0.0004479890631046146,0.005961406975984573,-0.01232069917023182,0.07625843584537506,-0.007896927185356617,0.009256521239876747,-0.011790594086050987,0.008935587480664253,-0.00665505975484848,0.01529077161103487,-0.006507824175059795,0.016119899228215218,-0.010931063443422318,0.04516233131289482,-0.03379395231604576,0.04624992236495018,-0.033574286848306656,0.02689484879374504,-0.03137844055891037,0.014263447374105453,-0.01978425681591034,0.03845435753464699,-0.045675795525312424,0.015561838634312153,-0.015697341412305832,0.009390720166265965,-0.01163371279835701,0.003880114294588566,-0.007132167462259531,0.0033598614390939474,-0.0020633703097701073,0.0017170829232782125,-0.0011705276556313038,0.0012721385573968291,-0.028745753690600395,0.0010477065807208419,-0.03373412787914276,0.020443759858608246,-0.0012713120086118579,0.014170699752867222,-0.013683208264410496,0.03138742595911026,-0.015743762254714966,0.00732638593763113,-0.005739816464483738,0.0668567344546318,-0.04232162982225418,0.021758006885647774,-0.014807505533099174,0.040195588022470474,-0.028392234817147255,0.015588824637234211,-0.019772278144955635,0.016121068969368935,-0.008254756219685078,0.03543601557612419,-0.07136731594800949,0.025989597663283348,-0.016051430255174637,0.016067827120423317,-0.03919903561472893,0.033666741102933884,-0.01952773705124855,0.05939739942550659,-0.03151406720280647,0.05397314578294754,-0.04516817256808281,0.029251018539071083,-0.02692950703203678,0.01069792453199625,-0.0871926099061966,0.03292216360569,-0.02866990678012371,0.028331177309155464,-0.01825678162276745,0.03171316906809807,-0.07450762391090393,0.055393870919942856,-0.06138991937041283,0.04335711523890495,-0.047178082168102264,0.08537214994430542,-0.05459751933813095,0.054867904633283615,-0.06612810492515564,0.07179219275712967,-0.0605170764029026,0.0727364718914032,-0.050212543457746506,0.025687530636787415,-0.05953337252140045,0.02121695503592491,-0.0254422165453434,0.04727184399962425,-0.03907609358429909,0.013317707926034927,-0.024747641757130623,0.012340031564235687,-0.0610969103872776,0.026707949116826057,-0.21528136730194092,0.06384965777397156,-0.054536495357751846,0.026457391679286957,-0.008522631600499153,0.026979167014360428,-0.02339848130941391,0.03994600474834442,-0.067555733025074,0.020503345876932144,-0.02409820817410946,0.01672830805182457,-0.02520754374563694,0.015023883432149887,-0.025066770613193512,0.021099552512168884,-0.006879969034343958,0.04213080555200577,-0.06015130132436752,0.016459351405501366,-0.02116229571402073,0.020744819194078445,-0.02058340609073639,0.021291447803378105,-0.027183448895812035,0.06913875788450241,-0.05758064240217209,0.08643855154514313,-0.05427129939198494,0.043832991272211075,-0.024274267256259918,0.04576055705547333,-0.02146443910896778,0.01505535002797842,-0.026562675833702087,0.0576305016875267,-0.045694079250097275,0.03907032310962677,-0.048220228403806686,0.04092075675725937,-0.05048210918903351,0.04618063196539879,-0.026472557336091995,0.03455883637070656,-0.0211452916264534,0.03239692747592926,-0.022624727338552475,0.0361112579703331,-0.026918385177850723,0.021457236260175705,-0.041227880865335464,0.05748787522315979,-0.050350312143564224,0.06681607663631439,-0.06866107881069183,0.047226328402757645,-0.05928047001361847,0.02678118273615837,-0.044321250170469284,0.05180714651942253,-0.04896347224712372,0.05630502477288246,-0.03293687477707863,0.020601533353328705,-0.05637310445308685,0.03885607048869133,-0.045709263533353806,0.03231482580304146,-0.0335303358733654,0.024891609326004982,-0.023619776591658592,0.04650009423494339,-0.03572222962975502,0.03444723039865494,-0.044206686317920685,0.07303276658058167,-0.05387115478515625,0.032088492065668106,-0.05279020965099335,0.027363469824194908,-0.05020759254693985,0.028226058930158615,-0.03841710090637207,0.0369228795170784,-0.051809437572956085,0.002528180368244648,-0.09662630409002304,0.024782991036772728,-0.042081110179424286,0.0037611371371895075,-0.019572528079152107,0.0015459278365597129,-0.002089096000418067,0.0019154185429215431,-0.001772967167198658,0.0008133765077218413,-0.0006624439265578985,0.0004284788738004863,-0.00018692287267185748,0.000351458991644904,-0.00019031812553294003,0.00028510959236882627,-0.00047007628018036485,0.0014649356016889215,-0.03970438614487648,0.002789781428873539,-0.0007114725885912776,0.00019546234398148954,-0.0004033105506096035,0.00033371627796441317,-0.0005961671122349799,0.0004103227984160185,-0.0003659673093352467,0.0003067747747991234,-0.0002492471830919385,0.0006239622016437352,-0.0005335353780537844,0.00035476870834827423,-0.000989678897894919,0.003713535610586405,-0.0025425052735954523,0.006349348928779364,-0.004736399743705988,0.00666516087949276,-0.0016841227188706398,0.0039813583716750145,-0.00701324176043272,0.0003249588771723211,-0.0005088996258564293,0.00047077590716071427,-0.0003753133933059871,0.0005914328503422439,-0.000652684539090842,0.005468438845127821,-0.011421128176152706,0.01210013311356306,-0.023101624101400375,0.0043941885232925415,-0.005066326353698969,0.010990366339683533,-0.013317295350134373,0.012541236355900764,-0.012562640011310577,0.031269997358322144,-0.06555254012346268,0.002537673572078347,-0.0017658666474744678,0.019105620682239532,-0.01578051969408989,0.020931214094161987,-0.02180088497698307,0.021105267107486725,-0.01961410418152809,0.01888137124478817,-0.037528447806835175,0.027856506407260895,-0.019663622602820396,0.01603996567428112,-0.022295167669653893,0.0037378710694611073,-0.039596233516931534,0.007647773250937462,-0.00861687958240509,0.012850622646510601,-0.017422091215848923,0.005481255240738392,-0.024380439892411232,0.013807842507958412,-0.011595511808991432,0.02202458493411541,-0.01670227013528347,0.03851807489991188,-0.02975466661155224,0.0364440381526947,-0.0452197790145874,0.03647918254137039,-0.022668663412332535,0.05120505765080452,-0.07597436010837555,0.0960286408662796,-0.10968232899904251,0.05138825997710228,-0.05135278403759003,0.07111354917287827,-0.05303504690527916,0.05534607544541359,-0.03836190328001976,0.1509370654821396,-0.08737445622682571,0.10168839246034622,-0.05060984939336777,0.07484613358974457,-0.0876300111413002,0.036327775567770004,-0.06705492734909058,0.029769740998744965,-0.010837201960384846,0.01769641786813736,-0.019575195387005806,0.010647116228938103,-0.014504736289381981,0.012879900634288788,-0.01851622946560383,0.0044865477830171585,-0.010659653693437576,0.01863330602645874,-0.003139629727229476,0.014554676599800587,-0.008203556761145592,0.022084126248955727,-0.012720135971903801,0.02260286547243595,-0.037679273635149,0.013769098557531834,-0.022365570068359375,0.02150159329175949,-0.028907833620905876,0.03455151990056038,-0.02304886281490326,0.019677428528666496,-0.03453151509165764,0.03382869437336922,-0.03098079189658165,0.026236852630972862,-0.022064510732889175,0.02745753526687622,-0.023089086636900902,0.037389080971479416,-0.006274790968745947,0.04813925549387932,-0.013018717989325523,0.029393546283245087,-0.04334588348865509,0.054814379662275314,-0.05793198570609093,0.037223346531391144,-0.01808686926960945,0.05710373446345329,-0.07838612049818039,0.067655548453331,-0.04931590333580971,0.06748417764902115,-0.025811588391661644,0.04876625910401344,-0.006318113300949335,0.04813455790281296,-0.07359719276428223,0.043695032596588135,-0.028329916298389435,0.048514436930418015,-0.038968347012996674,0.04844336956739426,-0.024842316284775734,0.04373479634523392,-0.02601013518869877,0.07208599895238876,-0.054320402443408966,0.056699588894844055,-0.059970587491989136,0.11993539333343506,-0.10308442264795303,0.03953169286251068,-0.0298570916056633,0.0267186276614666,-0.022421224042773247,0.006098544225096703,-0.009043584577739239,0.02041618525981903,-0.01923094317317009,0.01952274516224861,-0.01400842610746622,0.0071983905509114265,-0.014182953163981438,0.010347438044846058,-0.022064050659537315,0.028772911056876183,-0.01668870821595192,0.013510927557945251,-0.01588623970746994,0.019534628838300705,-0.015790708363056183,0.01165139302611351,-0.014714403077960014,0.0027951591182500124,-0.0024251830764114857,0.016443990170955658,-0.0032566336449235678,0.0009507226059213281,-0.0006732243928126991,0.0009324269485659897,-0.0006402033031918108,0.003213750896975398,-0.004667419940233231,0.010046722367405891,-0.0022405933123081923,0.013787236995995045,-0.004252105485647917,0.041802871972322464,-0.033291544765233994,0.06390683352947235,-0.06734494864940643,0.055769555270671844,-0.06737501174211502,0.04579542204737663,-0.040443144738674164,0.01904478296637535,-0.022162603214383125,0.012176700867712498,-0.010079258121550083,0.022634180262684822,-0.023772699758410454,0.026201874017715454,-0.03456900268793106,0.040636852383613586,-0.02740059234201908,0.02718493342399597,-0.030432356521487236,0.022868365049362183,-0.019630366936326027,0.012819381430745125,-0.014319809153676033,0.03668316453695297,-0.021249080076813698,0.07014745473861694,-0.005126560106873512,0.03319863602519035,-0.01634499803185463,0.012786637991666794,-0.01067294366657734,0.0032006544061005116,-0.01994822919368744,0.004347309470176697,-0.0057479459792375565,0.017511041834950447,-0.01121616456657648,0.01626555062830448,-0.019771579653024673,0.01578020304441452,-0.019579894840717316,0.020426785573363304,-0.03216997906565666,0.013777896761894226,-0.020254692062735558,0.014453768730163574,-0.007684524171054363,0.004605058580636978,-0.029174858704209328,0.011349146254360676,-0.031191805377602577,0.008642749860882759,-0.013422520831227303,0.0032132109627127647,-0.009287560358643532,0.0052017089910805225,-0.005064697936177254,0.006476110313087702,-0.003533904207870364,0.002349643735215068,-0.002408717991784215,0.0029690153896808624,-0.0015199820045381784,0.002210476202890277,-0.002174259861931205,0.0061042471788823605,-0.0050667510367929935,0.0114021897315979,-0.002311987802386284,0.0390111580491066,-0.05971686542034149,0.02493998408317566,-0.02273843251168728,0.013827765360474586,-0.02484895847737789,0.01882663182914257,-0.0029704729095101357,0.02050737291574478,-0.018213069066405296,0.014301774092018604,-0.03308742865920067,0.10466025769710541,-0.02883121930062771,0.20670241117477417,-0.050054408609867096,0.005217009223997593,-0.003552480135113001,0.0011310138506814837,-0.0013595479540526867,0.0016012928681448102,-0.0011068079620599747,0.0006440262077376246,-0.002113284543156624,0.0017393967136740685,-0.002019452629610896,0.04840351268649101,-0.004202107898890972,0.004628954455256462,-0.04198809340596199,0.0032989922910928726,-0.029635073617100716,0.005742799490690231,-0.04874289780855179,0.008403212763369083,-0.017984699457883835,0.016289489343762398,-0.020345784723758698,0.01982147991657257,-0.022113554179668427,0.016270823776721954,-0.03004191257059574,0.023654460906982422,-0.05730234459042549,0.024887729436159134,-0.028805000707507133,0.10126780718564987,-0.12554354965686798,0.06622682511806488,-0.10164307802915573,0.08540990948677063,-0.07698439806699753,0.03403780236840248,-0.048004601150751114,0.08215293288230896,-0.07975520938634872,0.0703667476773262,-0.04681845009326935,0.0943482518196106,-0.043568432331085205,0.07220824807882309,-0.10051474720239639,0.02266654558479786,-0.06208488717675209,0.006503706332296133,-0.018078818917274475,0.024908458814024925,-0.00779104745015502,0.03073200210928917,-0.002107747597619891,0.0053367335349321365,-0.005830594804137945,0.0571817122399807,-0.01161370612680912,0.031107863411307335,-0.0313231386244297,0.0048593818210065365,-0.007078132126480341,0.005067635327577591,-0.01687748171389103,0.04187415912747383,-0.08493995666503906,0.05485401675105095,-0.011169024743139744,0.0020591160282492638,-0.0018434786470606923,0.006060415413230658,-0.0040928758680820465,0.005464734043926001,-0.0066208625212311745,0.0013998841168358922,-0.004237719811499119,0.007978945039212704,-0.006637283600866795,0.00602861400693655,-0.002719821874052286,0.002306969603523612,-0.008131793700158596,0.022113217040896416,-0.006539191585034132,0.016396844759583473,-0.013523177243769169,0.03641575574874878,-0.05105223506689072,0.059734147042036057,-0.04010670632123947,0.0493009127676487,-0.10099870711565018,0.09530839323997498,-0.02105424553155899,0.00992678664624691,-0.020393971353769302,0.0049978746101260185,-0.011448333039879799,0.0014847090933471918,-0.01386860478669405,0.010537848807871342,-0.015548012219369411,0.004658653866499662,-0.0025687264278531075,0.012005018070340157,-0.011633902788162231,0.004602939821779728,-0.024278871715068817,0.009515115059912205,-0.050859447568655014,0.01701282523572445,-0.0010175724746659398,0.0014126913156360388,-0.033467862755060196,0.0015368049498647451,-0.0017368715489283204,0.0011046467116102576,-0.0011373644229024649,0.006299920845776796,-0.0035567351151257753,0.012022127397358418,-0.0011604959145188332,0.007787019480019808,-0.033127546310424805,0.001933059305883944,-0.0019087878754362464,0.009647869504988194,-0.00759650906547904,0.001308721606619656,-0.005688279401510954,0.001174473436549306,-0.0006314597558230162,0.003554911119863391,-0.005592670291662216,0.005399415269494057,-0.007857765071094036,0.0073534660041332245,-0.007375608664005995,0.00816909410059452,-0.011148316785693169,0.007903438061475754,-0.008284853771328926,0.009724629111588001,-0.011201559565961361,0.036528512835502625,-0.08089631795883179,0.016092024743556976,-0.011867795139551163,0.032165877521038055,-0.05610663816332817,0.05806455761194229,-0.12970717251300812,0.06182333454489708,-0.12168210744857788,0.07434409856796265,-0.0700579434633255,0.053903888911008835,-0.07405304163694382,0.008968018926680088,-0.0064599961042404175,0.003700976725667715,-0.003176237689331174,0.0010674777440726757,-0.0004522822273429483,0.0011216774582862854,-0.0015580058097839355,0.0023678301367908716,-0.012531482614576817,0.012369041331112385,-0.027179956436157227,0.005904150661081076,-0.007431910373270512,0.01386809628456831,-0.017831115052103996,0.015447601675987244,-0.0072503541596233845,0.1652430295944214,-0.013939300552010536,0.17902065813541412,-0.04713676497340202,0.1724901795387268,-0.1475093811750412,0.21864578127861023,-0.009264087304472923,0.23577143251895905,-0.04619353264570236,0.09574227035045624,-0.04694497585296631,0.12499065697193146,-0.03316475450992584,0.13112835586071014,-0.045876216143369675,0.05228626728057861,-0.0986119881272316,0.03331557661294937,-0.04245900362730026,0.05016041174530983,-0.03970948979258537,0.0637814849615097,-0.05761575698852539,0.2862180173397064,-0.0911608636379242,0.10390511900186539,-0.017033208161592484,0.04963070526719093,-0.05875476077198982,0.13281115889549255,-0.13173934817314148,0.03169064596295357,-0.08158443868160248,0.15988288819789886,-0.05406523495912552,0.12861396372318268,-0.08869219571352005,0.0848262831568718,-0.05707426741719246,0.06648708879947662,-0.11332160234451294,0.08877675980329514,-0.0767984688282013,0.11348073184490204,-0.16710059344768524,0.1273665428161621,-0.06436370313167572,0.1685921847820282,-0.05285438522696495,0.1739385724067688,-0.11814731359481812,0.04659878835082054,-0.05233164504170418,0.07059764862060547,-0.08657728880643845,0.15983688831329346,-0.05189976096153259,0.013068167492747307,-0.013703196309506893,0.00481059867888689,-0.005476824473589659,0.00734205124899745,-0.006117996294051409,0.010872692801058292,-0.010287961922585964,0.016807908192276955,-0.008912968449294567,0.018580453470349312,-0.014882938005030155,0.013250282034277916,-0.021076513454318047,0.04286488890647888,-0.025005577132105827,0.05406467244029045,-0.03134912997484207,0.06897049397230148,-0.057101648300886154,0.06044146046042442,-0.07550656050443649,0.03202781826257706,-0.05643145367503166,0.05804627761244774,-0.05071504786610603,0.06836187839508057,-0.05531509220600128,0.05728679895401001,-0.07576850801706314,0.07505477219820023,-0.046751853078603745,0.04345550388097763,-0.03834062069654465,0.06984049826860428,-0.03693443909287453,0.0501834861934185,-0.05724603682756424,0.06496962904930115,-0.03907530754804611,0.04003250598907471,-0.07365512102842331,0.057883597910404205,-0.07878565788269043,0.07291477918624878,-0.0883391797542572,0.12406647205352783,-0.10181791335344315,0.09755757451057434,-0.08839763700962067,0.12521860003471375,-0.27739349007606506,0.09813062846660614,-0.28759536147117615,0.6516836881637573,-0.3342784345149994,0.08822456747293472,-0.1905072033405304,0.22424998879432678,-0.2053356170654297,0.25582432746887207,-0.2439814954996109,0.1544809192419052,-0.23008295893669128,0.21361862123012543,-0.14786013960838318,0.09713223576545715,-0.1284085512161255,0.071316197514534,-0.08399637788534164,0.04024689272046089,-0.07707703858613968,0.03427419438958168,-0.019359935075044632,0.01756100542843342,-0.021699532866477966,0.021437766030430794,-0.01014796458184719,0.020259961485862732,-0.013686295598745346,0.018789997324347496,-0.013094902969896793,0.09570280462503433,-0.014921974390745163,0.03959069028496742,-0.00941153522580862,0.029104726389050484,-0.013932972215116024,0.009154895320534706,-0.012022175826132298,0.015406029298901558,-0.01464968454092741,0.006606132723391056,-0.006520654074847698,0.004869899246841669,-0.0050602867268025875,0.006992167327553034,-0.0080166170373559,0.013189507648348808,-0.017653077840805054,0.005677990615367889,-0.017621807754039764,0.01973826251924038,-0.014978003688156605,0.0069099790416657925,-0.01590675674378872,0.019800541922450066,-0.013470166362822056,0.026389244943857193,-0.024251028895378113,0.027020743116736412,-0.0260042492300272,0.014336402527987957,-0.014214553870260715,0.02706312946975231,-0.015885986387729645,0.014807894825935364,-0.013879568316042423,0.014474577270448208,-0.01850065588951111,0.039818357676267624,-0.05145484581589699,0.038336895406246185,-0.054911740124225616,0.0402420312166214,-0.03711584582924843,0.03469107672572136,-0.030608128756284714,0.04374157264828682,-0.034217897802591324,0.03830300271511078,-0.039952393621206284,0.03312676399946213,-0.03982877358794212,0.03394997864961624,-0.03492671623826027,0.04752475768327713,-0.06112391874194145,0.012524637393653393,-0.020466310903429985,0.043513838201761246,-0.06699646264314651,0.017224213108420372,-0.08493965864181519,0.06490931659936905,-0.05197812244296074,0.05626431107521057,-0.055808331817388535,0.053006116300821304,-0.26111239194869995,0.08340752869844437,-0.2214338481426239,0.03232988342642784,-0.055765144526958466,0.030477238819003105,-0.003442301182076335,0.04492298141121864,-0.05778118968009949,0.05763161554932594,-0.0396454744040966,0.02663872018456459,-0.015244037844240665,0.015092398971319199,-0.01653219573199749,0.01277769636362791,-0.0038544400595128536,0.002099295612424612,-0.004229380749166012,0.017951544374227524,-0.022874686866998672,0.032040830701589584,-0.028123050928115845,0.02391262724995613,-0.03476665914058685,0.03355052322149277,-0.02679731324315071,0.028032155707478523,-0.04571043699979782,0.01807933859527111,-0.0263015516102314,0.053939007222652435,-0.011710495688021183,0.029431942850351334,-0.028375284746289253,0.007402327843010426,-0.01184055209159851,0.00741526298224926,-0.006084917113184929,0.006660557817667723,-0.006279936991631985,0.004518791101872921,-0.012561383657157421,0.00887374673038721,-0.00536147179082036,0.008225349709391594,-0.009158449247479439,0.030573969706892967,-0.04048346355557442,0.06885994225740433,-0.023751478642225266,0.10734729468822479,-0.04387403652071953,0.04410359263420105,-0.048906657844781876,0.054222315549850464,-0.0938541442155838,0.05607850104570389,-0.06488863378763199,0.03863257169723511,-0.11667683720588684,0.07309291511774063,-0.11263052374124527,0.20369306206703186,-0.16896657645702362,0.44440677762031555,-0.15699653327465057,0.15863288938999176,-0.10047607868909836,0.1444293111562729,-0.12420704215765,0.10697054117918015,-0.16246666014194489,0.0643831342458725,-0.14819999039173126,0.03717992082238197,-0.02811766229569912,0.028300011530518532,-0.026465412229299545,0.008969303220510483,-0.017411550506949425,0.010668526403605938,-0.006498407106846571,0.004648989997804165,-0.007877873256802559,0.011098193004727364,-0.009882490150630474,0.00813199207186699,-0.009875011630356312,0.012170238420367241,-0.007963213138282299,0.008986782282590866,-0.0183095745742321,0.009989827871322632,-0.0062554869800806046,0.0067878724075853825,-0.005355939269065857,0.006990283727645874,-0.0035741531755775213,0.011838394217193127,-0.017458638176321983,0.008410844951868057,-0.013509467244148254,0.009813221171498299,-0.013060756027698517,0.0073032137006521225,-0.011122048832476139,0.03731227293610573,-0.009615588933229446,0.08722652494907379,-0.0907343402504921,0.0551992803812027,-0.048306241631507874,0.039615899324417114,-0.026489833369851112,0.07010550051927567,-0.07800742983818054,0.03579537570476532,-0.05121195688843727,0.06933951377868652,-0.0778297483921051,0.0557512491941452,-0.0493597537279129,0.12406744807958603,-0.12211702018976212,0.04655919224023819,-0.05751641094684601,0.04274778813123703,-0.058881811797618866,0.035214412957429886,-0.07147824019193649,0.0877470076084137,-0.07276309281587601,0.09710121899843216,-0.08210234344005585,0.09200413525104523,-0.11296142637729645,0.06289882212877274,-0.03957865759730339,0.07114691287279129,-0.09981594234704971,0.14186018705368042,-0.10146929323673248,0.12547260522842407,-0.08667990565299988,0.026221763342618942,-0.019601015374064445,0.000033155345590785146,-0.08865584433078766,-0.010906538926064968,-0.08723417669534683,0.008968408219516277,-0.08586828410625458,0.03908054158091545,-0.10499550402164459,0.03773282840847969,-0.11453131586313248,0.08221506327390671,-0.08777561038732529,0.09635359048843384,-0.005847103428095579,0.0722431093454361,-0.044766999781131744,0.04565022140741348,-0.05551251396536827,0.08726346492767334,-0.07792288064956665,0.1652117520570755,-0.0932123139500618,0.051640916615724564,-0.10156215727329254,0.053606584668159485,-0.09880872070789337,0.1092284694314003,-0.16754506528377533,0.20489820837974548,-0.036796241998672485,0.07559854537248611,-0.09272854030132294,0.055468134582042694,-0.12920397520065308,0.13597247004508972,-0.15080015361309052,0.1289394646883011,-0.15745723247528076,0.12438454478979111,-0.1648547500371933,0.1881091147661209,-0.15788047015666962,0.2324194759130478,-0.1461748629808426,0.1780674010515213,-0.23504406213760376,0.24589763581752777,-0.21911494433879852,0.13041287660598755,-0.13142353296279907,0.14846982061862946,-0.3156183660030365,0.28211167454719543,-0.23820576071739197,0.28653138875961304,-0.16552025079727173,0.24359117448329926,-0.2219877690076828,0.16000092029571533,-0.07210265100002289,0.2807932496070862,-0.38962841033935547,0.24375146627426147,-0.4618300795555115,0.3825381398200989,-0.43408554792404175,0.4755471348762512,-0.41428327560424805,0.15920443832874298,-0.21592071652412415,0.33208152651786804,-0.3325144648551941,0.15522389113903046,-0.13762272894382477,0.20885592699050903,-0.3466632068157196,0.1871468871831894,-0.20615892112255096,0.21708747744560242,-0.2113446146249771,0.2798878252506256,-0.19507603347301483,0.2178364247083664,-0.28678518533706665,0.32130923867225647,-0.2628668546676636,0.21646907925605774,-0.19179588556289673,0.3058246672153473,-0.22138673067092896,0.23534618318080902,-0.23211762309074402,0.3529317378997803,-0.16632112860679626,0.24888047575950623,-0.3609257936477661,0.19104769825935364,-0.44251057505607605,0.257877916097641,-0.08951949328184128,0.10140957683324814,-0.2861396074295044,0.35919153690338135,-0.2955751419067383,0.31615352630615234,-0.33497893810272217,0.27494966983795166,-0.25897470116615295,0.11933338642120361,-0.349813312292099,0.24904759228229523,-0.38174059987068176,0.24863053858280182,-0.3214544355869293,0.28023573756217957,-0.21246777474880219,0.10215827077627182,-0.19246473908424377,0.5432582497596741,-0.21627286076545715,0.35013213753700256,-0.14615963399410248,0.3254716098308563,-0.26917970180511475,0.31141436100006104,-0.34320685267448425,0.28009817004203796,-0.11742925643920898,0.20859642326831818,-0.2864035665988922,0.1671477109193802,-0.48187267780303955,0.27782338857650757,-0.19901160895824432,0.20151515305042267,-0.2781810164451599,0.1145729348063469,-0.23064012825489044,0.17829595506191254,-0.4836678206920624,0.2187216579914093,-0.2199403941631317,0.3712272644042969,-0.3126083314418793,0.2740640640258789,-0.23071356117725372,0.2851752042770386,-0.18464787304401398,0.13780081272125244,-0.19813019037246704,0.10637472569942474,-0.13515962660312653,0.19113022089004517,-0.19267211854457855,0.08355842530727386,-0.1426316350698471,0.16728709638118744,-0.11883489787578583,0.24187329411506653,-0.22239089012145996,0.26778852939605713,-0.2461157739162445,0.25357919931411743,-0.3000245988368988,0.03973257914185524,-0.06319130957126617,0.006472718436270952,-0.005974260624498129,0.011811934411525726,-0.016458693891763687,0.025765514001250267,-0.07107322663068771,0.12114820629358292,-0.08421139419078827,0.25464898347854614,-0.15992042422294617,0.24576465785503387,-0.16378828883171082,0.13186104595661163,-0.18222658336162567,0.2103857845067978,-0.08514216542243958,0.26077932119369507,-0.11995977908372879,0.19529151916503906,-0.14412878453731537,0.23306512832641602,-0.2074793130159378,0.15249358117580414,-0.16417300701141357,0.18216058611869812,-0.2463914304971695,0.22679808735847473,-0.08773517608642578,0.30061763525009155,-0.2804400622844696,0.24927397072315216,-0.26601681113243103,0.16383112967014313,-0.11944635957479477,0.2632354199886322,-0.14342661201953888,0.15453046560287476,-0.21404165029525757,0.19053499400615692,-0.1951550394296646,0.2455979585647583,-0.11539313197135925,0.16104108095169067,-0.19683831930160522,0.34321656823158264,-0.23576904833316803,0.23189394176006317,-0.3225896656513214,0.1970851719379425,-0.17611485719680786,0.14663587510585785,-0.12833064794540405,0.15546837449073792,-0.1988494098186493,0.19445954263210297,-0.2217404991388321,0.27843454480171204,-0.1935538649559021,0.1611938625574112,-0.1156080961227417,0.16276127099990845,-0.15138643980026245,0.08891180902719498,-0.12610559165477753,0.0900045782327652,-0.07110875844955444,0.11008944362401962,-0.052382465451955795,0.07652003318071365,-0.10131478309631348,0.07205763459205627,-0.0779499039053917,0.14845730364322662,-0.1036679595708847,0.07560981065034866,-0.10367774218320847,0.15499597787857056,-0.12883996963500977,0.1507524847984314,-0.10233388096094131,0.09807827323675156,-0.0665566548705101,0.11783356964588165,-0.1828368902206421,0.28545695543289185,-0.13898341357707977,0.2603580355644226,-0.23407062888145447,0.13421842455863953,-0.24645449221134186,0.26820722222328186,-0.3619215190410614,0.17072352766990662,-0.32966217398643494,0.17603543400764465,-0.41360992193222046,0.23214033246040344,-0.30815157294273376,0.3351786434650421,-0.24916410446166992,0.2992648780345917,-0.3651733100414276,0.28259485960006714,-0.3821081519126892,0.28905242681503296,-0.3252065181732178,0.34469595551490784,-0.28812453150749207,0.14982154965400696,-0.2903839945793152,0.33542320132255554,-0.22563450038433075,0.4307670295238495,-0.2047235667705536,0.10642330348491669,-0.19277185201644897,0.24072124063968658,-0.156233012676239,0.4230826199054718,-0.16451804339885712,0.06072908267378807,-0.08561675995588303,0.009573830291628838,-0.032128553837537766,0.006821741349995136,-0.02155826799571514,0.006649915594607592,-0.013209904544055462,0.004474634770303965,-0.004629175644367933,0.0030345565173774958,-0.004153197631239891,0.0012215569149702787,-0.002245640615001321,0.0021416740491986275,-0.0003189441340509802,0.004124256782233715,-0.003674826119095087,0.00389473675750196,-0.006844114512205124,0.005192135460674763,-0.01090707816183567,0.006010423414409161,-0.015238311141729355,0.019784651696681976,-0.021362917497754097,0.08081039041280746,-0.08238467574119568,0.03556130826473236,-0.05838794261217117,0.032540157437324524,-0.03868051990866661,0.01577521488070488,-0.012549451552331448,0.0070945280604064465,-0.017286118119955063,0.007945849560201168,-0.009145546704530716,0.015478049404919147,-0.022036980837583542,0.007678234949707985,-0.008675930090248585,0.010444165207445621,-0.006079137325286865,0.014320239424705505,-0.014774029143154621,0.014191657304763794,-0.022403743118047714,0.013024731539189816,-0.023765139281749725,0.012381032109260559,-0.017744820564985275,0.03701198473572731,-0.032420769333839417,0.0545487180352211,-0.03073430061340332,0.06867392361164093,-0.05032598599791527,0.05941837280988693,-0.06582068651914597,0.024856671690940857,-0.029012683779001236,0.022206269204616547,-0.01630772091448307,0.029590832069516182,-0.020500756800174713,0.021274685859680176,-0.014348909258842468,0.0370415560901165,-0.016550585627555847,0.021576417610049248,-0.03541345149278641,0.02306612767279148,-0.03690333291888237,0.042428549379110336,-0.036665190011262894,0.02966374158859253,-0.04044743627309799,0.0864700973033905,-0.038502972573041916,0.02100089006125927,-0.05092570185661316,0.02062753029167652,-0.015704061836004257,0.014945928007364273,-0.013673261739313602,0.008822090923786163,-0.013312261551618576,0.006704001221805811,-0.007044612895697355,0.004264318384230137,-0.005533094983547926,0.0027804602868855,-0.0042811110615730286,0.002542712027207017,-0.0017522682901471853,0.002400923054665327,-0.0011839901562780142,0.0032001230865716934,-0.0018015872919932008,0.002343366388231516,-0.0009487735223956406,0.0024433869402855635,-0.0012509521329775453,0.0030302871018648148,-0.0008831683662720025,0.006575461011379957,-0.003639650996774435,0.010343842208385468,-0.007627905812114477,0.038886260241270065,-0.02840602956712246,0.030368449166417122,-0.05131197348237038,0.010352461598813534,-0.00847072247415781,0.0015808907337486744,-0.005367353558540344,0.0070966267958283424,-0.007220149971544743,0.0020775909069925547,-0.0029644849710166454,0.013862574473023415,-0.0034223960246890783,0.014145591296255589,-0.011714681051671505,0.01085786335170269,-0.05620846897363663,0.02984621562063694,-0.02686781994998455,0.03102278523147106,-0.028219960629940033,0.11369559913873672,-0.043789710849523544,0.003317954484373331,-0.007938170805573463,0.008391179144382477,-0.0032001815270632505,0.013212352059781551,-0.008916257880628109,0.009838065132498741,-0.00837685726583004,0.008427610620856285,-0.014844059012830257,0.008454280905425549,-0.027925850823521614,0.01201052125543356,-0.02792263962328434,0.025586655363440514,-0.02873717062175274,0.02271847240626812,-0.032511238008737564,0.03308187797665596,-0.022256044670939445,0.03095483034849167,-0.015370858833193779,0.009389568120241165,-0.012084253132343292,0.003687304677441716,-0.009689771570265293,0.018033171072602272,-0.00551396980881691,0.018215280026197433,-0.009188102558255196,0.02246272563934326,-0.018979474902153015,0.019011247903108597,-0.0174256581813097,0.12252049893140793,-0.0581868514418602,0.018406270071864128,-0.13705919682979584,0.028146015480160713,-0.03787605091929436,0.03773747384548187,-0.03520303964614868,0.052056048065423965,-0.03619365766644478,0.030218025669455528,-0.03853486105799675,0.037450291216373444,-0.013931525871157646,0.051778703927993774,-0.03996904566884041,0.0387626551091671,-0.043255023658275604,0.1473308801651001,-0.07356022298336029,0.15434414148330688,-0.31104227900505066,0.17843352258205414,-0.13913822174072266,0.15722718834877014,-0.1587294638156891,0.16595983505249023,-0.13395237922668457,0.11856099218130112,-0.11396921426057816,0.1198701336979866,-0.08465467393398285,0.15126918256282806,-0.15974673628807068,0.1540163904428482,-0.2002260386943817,0.1068548783659935,-0.03179109841585159,0.38228893280029297,-0.8571036458015442,0.18818464875221252,-0.02233143523335457,0.019194431602954865,-0.030409395694732666,0.0021379415411502123,-0.006872099358588457,0.002044953405857086,-0.0030138858128339052,0.001036640489473939,-0.0010608113370835781,0.0005089335609227419,-0.0010268297046422958,0.0005151543882675469,-0.0005037178634665906,0.0018523570615798235,-0.00038542153197340667,0.0005826083943247795,-0.00252277753315866,0.012790882959961891,-0.010719086974859238,0.018435083329677582,-0.017045198008418083,0.02393345907330513,-0.019820885732769966,0.013879788108170033,-0.018263520672917366,0.01198415458202362,-0.04564119875431061,0.031984925270080566,-0.04131980240345001,0.03892938420176506,-0.024695316329598427,0.02336999960243702,-0.0789756178855896,0.002750684041529894,-0.08590556681156158,0.0013986960984766483,-0.0025122812949121,0.0008355650934390724,-0.0008892916375771165,0.06350622326135635,-0.0524817518889904,0.004292421042919159,-0.007805387955158949,0.002148744650185108,-0.005883542355149984,0.08838284015655518,-0.10236639529466629,0.9066609740257263,-0.74831223487854,0.19614610075950623,-0.1242363303899765,0.012567821890115738,-0.032459408044815063,0.025514749810099602,-0.010772273875772953,0.03548895940184593,-0.04635115712881088,0.019840706139802933,-0.04460933431982994,0.035913679748773575,-0.03385167196393013,0.02965500019490719,-0.042904119938611984,0.04611773416399956,-0.05513277277350426,0.05446205660700798,-0.017573200166225433,0.023524345830082893,-0.04018057510256767,0.01803736947476864,-0.023358052596449852,0.03802204877138138,-0.0863359197974205,0.2624105215072632,-0.953132152557373,0.05108621343970299,-0.04993339627981186,0.013091479428112507,-0.015498032793402672,0.012438977137207985,-0.019666269421577454,0.1485375463962555,-0.004925490822643042,0.2681734561920166,-0.15732696652412415,0.011709959246218204,-0.01193478237837553,0.005727279931306839,-0.004008227027952671,0.0005441576358862221,-0.003264956409111619,0.0016561581287533045,-0.001831856439821422,0.0008863495313562453,-0.0008300357148982584,0.0215944591909647,-0.046136848628520966,0.04586666822433472,-0.024482805281877518,0.02910465933382511,-0.037610605359077454,0.023651275783777237,-0.030803652480244637,0.03677601367235184,-0.03146890550851822,0.039589084684848785,-0.032701585441827774,0.02817557379603386,-0.020652130246162415,0.006371361203491688,-0.008575394749641418,0.03233521431684494,-0.03305660933256149,0.01883786730468273,-0.03833366930484772,0.03047233261168003,-0.022017115727066994,0.02414201758801937,-0.041059594601392746,0.042081981897354126,-0.012412169016897678,0.04351316764950752,-0.038573022931814194,0.01633373461663723,-0.06570261716842651,0.012490449473261833,-0.011079516261816025,0.0050465622916817665,-0.003323856508359313,0.00791210774332285,-0.005462818779051304,0.006304705981165171,-0.006524373311549425,0.050454214215278625,-0.047180719673633575,0.027855703607201576,-0.04282824695110321,0.011410091072320938,-0.00883389450609684,0.0021338011138141155,-0.003161842003464699,0.0013321771984919906,-0.00232119532302022,0.0011640898883342743,-0.0027681689243763685,0.0014302091440185905,-0.0012303674593567848,0.0008112608338706195,-0.0009914487600326538,0.0006904650363139808,-0.004471818450838327,0.0023929602466523647,-0.0006400567363016307,0.0011160323629155755,-0.000911305658519268,0.0006209106068126857,-0.001111593097448349,0.0006487749051302671,-0.0012209881097078323,0.0006638988852500916,-0.0010635142680257559,0.0005407566204667091,-0.0008115337113849819,0.0011222660541534424,-0.0012448555789887905,0.0016997274942696095,-0.0010783059988170862,0.0017213341780006886,-0.0005942578427493572,0.00046051928075030446,-0.0016285860911011696,0.0006849020137451589,-0.0004202058771625161,0.0005507655441761017,-0.0004877833416685462,0.0005615437403321266,-0.000925971835386008,0.0007167688454501331,-0.00131590839009732,0.03399951010942459,-0.12940673530101776,0.1816045492887497,-0.11426998674869537,0.06737621873617172,-0.026573456823825836,0.04782088100910187,-0.03967886045575142,0.018807215616106987,-0.0020759860053658485,0.023720020428299904,-0.012751249596476555,0.009881331585347652,-0.006964653264731169,0.006561910267919302,-0.008585667237639427,0.007156399078667164,-0.009169801138341427,0.00441236887127161,-0.008357597514986992,0.009774792939424515,-0.008817112073302269,0.0034273993223905563,-0.009271183051168919,0.0762774646282196,-0.046653829514980316,0.050606515258550644,-0.026313260197639465,0.08885356783866882,-0.07272706180810928,0.12586160004138947,-0.09370311349630356,0.03319554030895233,-0.03245166689157486,0.011149611324071884,-0.005695320200175047,0.013448809273540974,-0.010200523771345615,0.04873219504952431,-0.037294380366802216,0.07514198869466782,-0.031149236485362053,0.02586049772799015,-0.029124675318598747,0.024180365726351738,-0.04514649137854576,0.03540218621492386,-0.03547270596027374,0.03533713519573212,-0.03411639854311943,0.021582435816526413,-0.019146079197525978,0.037518490105867386,-0.03974481299519539,0.02033616602420807,-0.019976671785116196,0.048310182988643646,-0.024502577260136604,0.020912038162350655,-0.014116674661636353,0.011224700137972832,-0.013366802595555782,0.04369136318564415,-0.03920258581638336,0.01916428469121456,-0.01298948097974062,0.025150839239358902,-0.03701085224747658,0.040451910346746445,-0.04075619578361511,0.024918561801314354,-0.021917080506682396,0.053955741226673126,-0.05565754324197769,0.018545333296060562,-0.023729294538497925,0.008204719983041286,-0.005103431176394224,0.003812758019194007,-0.003253336763009429,0.0015144066419452429,-0.0010767140192911029,0.0012528860243037343,-0.0031250992324203253,0.011567054316401482,-0.016130611300468445,0.016494417563080788,-0.2535385489463806,0.20888462662696838,-0.1856224089860916,0.0032190452329814434,-0.0023751547560095787,0.002865029266104102,-0.003660123562440276,0.01947595179080963,-0.023664161562919617,0.025770163163542747,-0.025182146579027176,0.025069143623113632,-0.01397902611643076,0.022280210629105568,-0.02545425109565258,0.015551518648862839,-0.016476809978485107,0.018327932804822922,-0.006406144239008427,0.013085110113024712,-0.006416616030037403,0.006846484262496233,-0.006145591381937265,0.02305947244167328,-0.009576001204550266,0.021659603342413902,-0.015888657420873642,0.007821657694876194,-0.017046034336090088,0.009451335296034813,-0.01223080512136221,0.03495696559548378,-0.03622588515281677,0.015910141170024872,-0.031605467200279236,0.026683181524276733,-0.016097037121653557,0.019528096541762352,-0.00877700001001358,0.021649587899446487,-0.014342587441205978,0.012237479910254478,-0.011465052142739296,0.021375546231865883,-0.016523219645023346,0.02852286398410797,-0.06125647574663162,0.032648809254169464,-0.026115657761693,0.0048419455997645855,-0.04242750629782677,0.19452603161334991,-0.041721198707818985,0.19644227623939514,-0.1611531674861908,0.07076556980609894,-0.13238410651683807,0.0856117308139801,-0.09884987026453018,0.0824873074889183,-0.08595795184373856,0.07954858988523483,-0.06036655232310295,0.08313969522714615,-0.09794022142887115,0.1983528584241867,-0.02385142631828785,0.14915619790554047,-0.04432762414216995,0.17050454020500183,-0.08440770208835602,0.14893211424350739,-0.32383841276168823,0.3183019161224365,-0.2223859280347824,0.11154951900243759,-0.161444753408432,0.16437475383281708,-0.11419637501239777,0.1335512399673462,-0.20517969131469727,0.13829264044761658,-0.10240838676691055,0.23095932602882385,-0.227074533700943,0.17091679573059082,-0.21057172119617462,0.0737115815281868,-0.08764441311359406,0.07269932329654694,-0.0677354633808136,0.05837269127368927,-0.054171789437532425,0.08413965255022049,-0.05990399047732353,0.04906834289431572,-0.08174808323383331,0.028211822733283043,-0.10461565852165222,0.02327810414135456,-0.2126617133617401,0.38697871565818787,-0.2003711760044098,0.1933787763118744,-0.2224162071943283,0.08916866034269333,-0.10112433135509491,0.09268642961978912,-0.08555946499109268,0.07885049283504486,-0.03822619840502739,0.09742943942546844,-0.043587733060121536,0.1857694685459137,-0.20614224672317505,0.20045892894268036,-0.18086698651313782,0.07875494658946991,-0.09906964749097824,0.05243716016411781,-0.09800733625888824,0.1051400825381279,-0.02758658677339554,0.07076152414083481,-0.09874644875526428,0.1332642287015915,-0.1354496031999588,0.11215382069349289,-0.10616421699523926,0.06428799033164978,-0.06268421560525894,0.04214034229516983,-0.05001556873321533,0.03129873797297478,-0.03870498761534691,0.03678978607058525,-0.0269238892942667,0.03672404959797859,-0.046507980674505234,0.16125886142253876,-0.10221357643604279,0.20615927875041962,-0.22980721294879913,0.20914426445960999,-0.21468041837215424,0.03325771167874336,-0.02130470611155033,0.056070420891046524,-0.09434318542480469,0.04772481322288513,-0.047108545899391174,0.0345284640789032,-0.07067611068487167,0.18306249380111694,-0.07277019321918488,0.22933140397071838,-0.36764079332351685,0.21637961268424988,-0.2727232873439789,0.5221101641654968,-0.7655154466629028,0.4766140878200531,-0.4999864101409912,0.1282995492219925,-0.3501153290271759,0.3358691334724426,-0.015601938590407372,0.248626708984375,-0.1159820407629013,0.17884619534015656,-0.2910110056400299,0.1634511947631836,-0.10947585105895996,0.1526704579591751,-0.9198401570320129,0.14941953122615814,-0.19343823194503784,0.11416739970445633,-0.11539018154144287,0.35105621814727783,-0.11529949307441711,0.21080030500888824,-0.09806397557258606,0.06724954396486282,-0.14614802598953247,0.1473637968301773,-0.0689687430858612,0.23362384736537933,-0.2457258552312851,0.15990588068962097,-0.09708757698535919,0.07523995637893677,-0.07096565514802933,0.07010839879512787,-0.05072174593806267,0.1172678992152214,-0.12036071717739105,0.07078268378973007,-0.09200228750705719,0.05586666613817215,-0.07646384090185165,0.0905221477150917,-0.08678622543811798,0.20152214169502258,-0.051893170922994614,0.1428951621055603,-0.1368735134601593,0.09948616474866867,-0.09352464228868484,0.04338887706398964,-0.07454290986061096,0.058218106627464294,-0.057648174464702606,0.07841052114963531,-0.11781368404626846,0.2522447407245636,-0.1983889937400818,0.14017392694950104,-0.261259526014328,0.10985904932022095,-0.17060193419456482,0.48598000407218933,-0.12184073030948639,0.12075654417276382,-0.1595044881105423,0.2514738142490387,-0.332079142332077,0.17197774350643158,-0.3388676047325134,0.11781969666481018,-0.3857225477695465,0.2746574282646179,-0.21506457030773163,0.10116250813007355,-0.3679012060165405,0.2561994791030884,-0.14426861703395844,0.11766373366117477,-0.2493385225534439,0.14698775112628937,-0.22758622467517853,0.21372155845165253,-0.20016053318977356,0.20787487924098969,-0.11841792613267899,0.22159609198570251,-0.14583759009838104,0.503730297088623,-0.4227159917354584,0.3726617693901062,-0.1594962775707245,0.3290378749370575,-0.1948828548192978,0.0756346583366394,-0.14746180176734924,0.017064211890101433,-0.02512696012854576,0.11181052029132843,-0.019764112308621407,0.13834431767463684,-0.0586700513958931,0.0792698934674263,-0.154329314827919,0.02732734940946102,-0.016632862389087677,0.016591697931289673,-0.019233716651797295,0.028314782306551933,-0.02867840975522995,0.09831245243549347,-0.06183459237217903,0.0645516961812973,-0.15854206681251526,0.23674136400222778,-0.1437736302614212,0.1098325252532959,-0.12743662297725677,0.09348681569099426,-0.13512462377548218,0.07188521325588226,-0.22574210166931152,0.0483439676463604,-0.1672772765159607,0.6647357940673828,-0.3696005344390869,0.08695647120475769,-0.2094099223613739,0.23204408586025238,-0.1553065925836563,0.2381201684474945,-0.18371719121932983,0.26698464155197144,-0.2835211753845215,0.3580973148345947,-0.1515779346227646,0.0695469006896019,-0.08366277813911438,0.03542250394821167,-0.036133214831352234,0.04398396983742714,-0.02573447860777378,0.014963832683861256,-0.037357147783041,0.013708346523344517,-0.01665377803146839,0.020735295489430428,-0.025479521602392197,0.01639929600059986,-0.010543176904320717,0.03404265269637108,-0.012444221414625645,0.004266391042619944,-0.0030864709988236427,0.00285169156268239,-0.00043043968616984785,0.0002334754099138081,-0.0008851169841364026,0.0007162548718042672,-0.0007634981884621084,0.004433116409927607,-0.02127033658325672,0.03874293714761734,-0.005123426206409931,0.00371681060642004,-0.004725886508822441,0.0025541186332702637,-0.008481697179377079,0.0033471633214503527,-0.0026143903378397226,0.0018876207759603858,-0.003284384263679385,0.007677649613469839,-0.0060457875952124596,0.004275915212929249,-0.0032306918874382973,0.0022621024399995804,-0.003250008448958397,0.0019485770026221871,-0.0034859043080359697,0.0010109338909387589,-0.0016605412820354104,0.000938373850658536,-0.0012007083278149366,0.0005998333217576146,-0.0012414415832608938,0.0003928077348973602,-0.0008036656072363257,0.00049955042777583,-0.0010866314405575395,0.0003523382474668324,-0.000520451576448977,0.0004333132819738239,-0.0006317840307019651,0.0007370840176008642,-0.0005561543512158096,0.033601295202970505,-0.044297508895397186,0.08860326558351517,-0.030946960672736168,0.022641882300376892,-0.03533991798758507,0.019465161487460136,-0.0275052972137928,0.0006456353585235775,-0.0005225635250099003,0.0008333890582434833,-0.00042379082879051566,0.0005584827740676701,-0.0006305825081653893,0.0005020227399654686,-0.0006914025289006531,0.0005304670194163918,-0.0006713787443004549,0.0006469301297329366,-0.0008822838426567614,0.0006179396295920014,-0.00041595130460336804,0.00020806050451938063,-0.0002496893284842372,0.000049266211135545745,-0.00003944721902371384,0.0006219840724952519,-0.0037340898998081684,0.0060747526586055756,-0.00516008585691452,0.006927694659680128,-0.005940050818026066,0.005865448620170355,-0.011030937545001507,0.02984168939292431,-0.019008029252290726,0.01682407036423683,-0.02176872082054615,0.014130986295640469,-0.023533133789896965,0.021744942292571068,-0.029000887647271156,0.02144582010805607,-0.02894393540918827,0.009968101046979427,-0.015563102439045906,0.020094064995646477,-0.010762084275484085,0.02006441168487072,-0.011017668060958385,0.014555632136762142,-0.029209638014435768,0.04703017696738243,-0.027225961908698082,0.028761569410562515,-0.04554697871208191,0.035208385437726974,-0.023989975452423096,0.02320852503180504,-0.03422533720731735,0.038682982325553894,-0.027183961123228073,0.046753738075494766,-0.04698294773697853,0.03051707334816456,-0.038298264145851135,0.02987227775156498,-0.04713314771652222,0.07743556797504425,-0.0379963144659996,0.029180238023400307,-0.041962504386901855,0.007966989651322365,-0.028235597535967827,0.015954094007611275,-0.02184123545885086,0.012645120732486248,-0.020254112780094147,0.013776539824903011,-0.026306962594389915,0.059900883585214615,-0.014622332528233528,0.025344539433717728,-0.019377125427126884,0.011328174732625484,-0.02111869864165783,0.037836622446775436,-0.01964641734957695,0.018657781183719635,-0.025748109444975853,0.021371064707636833,-0.01822771690785885,0.027417143806815147,-0.0394623838365078,0.03306536376476288,-0.057752158492803574,0.07374949008226395,-0.030191903933882713,0.02922171913087368,-0.047699302434921265,0.032800037413835526,-0.03574710339307785,0.03411644697189331,-0.014271779917180538,0.03663770109415054,-0.04719855263829231,0.034715913236141205,-0.054313141852617264,0.04866480454802513,-0.027183208614587784,0.03499707579612732,-0.16896958649158478,0.06536076217889786,-0.10906325280666351,0.05474615469574928,-0.051396820694208145,0.0645470842719078,-0.08830608427524567,0.11248306185007095,-0.10616010427474976,0.11718767881393433,-0.1689169555902481,0.17062069475650787,-0.23330852389335632,0.1501941680908203,-0.126926451921463,0.11488828808069229,-0.09824962168931961,0.13714639842510223,-0.10985483974218369,0.027294982224702835,-0.053904805332422256,0.03342023491859436,-0.035203881561756134,0.03361368924379349,-0.06530510634183884,0.036652036011219025,-0.040896765887737274,0.014405764639377594,-0.015271930955350399,0.01972242072224617,-0.019684283062815666,0.016393138095736504,-0.019152920693159103,0.03121368959546089,-0.018246475607156754,0.01762763410806656,-0.029206126928329468,0.02677665837109089,-0.05581730231642723,0.04240485653281212,-0.04339580982923508,0.03066888079047203,-0.032298240810632706,0.04866236075758934,-0.02347048930823803,0.018606867641210556,-0.02608916535973549,0.04212561249732971,-0.029383616521954536,0.04510287567973137,-0.036179907619953156,0.04452115669846535,-0.030331825837492943,0.040108900517225266,-0.027300836518406868,0.04066556692123413,-0.034965358674526215,0.15309396386146545,-0.16073723137378693,0.1772456169128418,-0.12330836057662964,0.25664883852005005,-0.542818546295166,0.4154120683670044,-0.4976475238800049,0.17503070831298828,-0.24566438794136047,0.14466555416584015,-0.1829753965139389,0.16612733900547028,-0.1744544953107834,0.1324249655008316,-0.09857552498579025,0.0898766964673996,-0.10288480669260025,0.13222144544124603,-0.050256192684173584,0.08784419298171997,-0.08540033549070358,0.23256656527519226,-0.0929027646780014,0.376230925321579,-0.27957242727279663,0.1930282711982727,-0.12459161877632141,0.15951861441135406,-0.15968379378318787,0.13050177693367004,-0.1752917468547821,0.1125219389796257,-0.19716110825538635,0.12132066488265991,-0.11259237676858902,0.11471226811408997,-0.09479837119579315,0.12611395120620728,-0.08286315947771072,0.09124337881803513,-0.1272336095571518,0.30409765243530273,-0.21415357291698456,0.2542167901992798,-0.34262052178382874,0.11787151545286179,-0.17559336125850677,0.1578831672668457,-0.17130307853221893,0.15274176001548767,-0.18439733982086182,0.15678365528583527,-0.14575521647930145,0.2741723358631134,-0.2731931805610657,0.3213529586791992,-0.262599915266037,0.2855357825756073,-0.24976401031017303,0.351834237575531,-0.2446436733007431,0.17369671165943146,-0.28485697507858276,0.07033858448266983,-0.3487392067909241,0.027957715094089508,-0.25580960512161255,0.21956519782543182,-0.23553943634033203,0.171529620885849,-0.18956488370895386,0.21513918042182922,-0.18004509806632996,0.174015611410141,-0.13975417613983154,0.3512762188911438,-0.17516209185123444,0.20921482145786285,-0.22515670955181122,0.17797765135765076,-0.25610050559043884,0.1593753695487976,-0.131697416305542,0.23882067203521729,-0.18946310877799988,0.23581025004386902,-0.20268546044826508,0.5842419862747192,-0.21939873695373535,0.1306448131799698,-0.2795078456401825,0.22497989237308502,-0.22428923845291138,0.25882038474082947,-0.25534921884536743,0.37063461542129517,-0.47043734788894653,0.5311951041221619,-0.24317307770252228,0.26720041036605835,-0.2733306586742401,0.2417975664138794,-0.17643173038959503,0.18449988961219788,-0.37301141023635864,0.2903657555580139,-0.4747242331504822,0.28323930501937866,-0.410141259431839,0.2588447332382202,-0.30246925354003906,0.17657668888568878,-0.20053718984127045,0.4877723753452301,-0.41847142577171326,0.2454874962568283,-0.2661052644252777,0.2364692986011505,-0.28501853346824646,0.33859825134277344,-0.16496098041534424,0.4689106345176697,-0.44917264580726624,0.5626899600028992,-0.3500923216342926,0.19620727002620697,-0.19606637954711914,0.3792676031589508,-0.3867652714252472,0.27428001165390015,-0.15666954219341278,0.3263241946697235,-0.49797770380973816,0.39757493138313293,-0.3273181915283203,0.2902006506919861,-0.25573450326919556,0.2363782823085785,-0.3425586223602295,0.4710681438446045,-0.1708386242389679,0.3227723240852356,-0.21370559930801392,0.10311609506607056,-0.35421448945999146,0.3838976323604584,-0.13855068385601044,0.20952673256397247,-0.2728080749511719,0.19395458698272705,-0.3132990300655365,0.3795486390590668,-0.09512627124786377,0.19446367025375366,-0.2024627923965454,0.36323192715644836,-0.2005249261856079,0.14574865996837616,-0.18608912825584412,0.30388638377189636,-0.3552345633506775,0.20220719277858734,-0.22135908901691437,0.14639750123023987,-0.396348774433136,0.3345249891281128,-0.18090006709098816,0.2015383392572403,-0.24398194253444672,0.3691803514957428,-0.10477706044912338,0.3177664577960968,-0.30678659677505493,0.4932973384857178,-0.2868492901325226,0.4582199454307556,-0.41527360677719116,0.23404577374458313,-0.2717074453830719,0.350193053483963,-0.6377446055412292,0.39840731024742126,-0.38069942593574524,0.4023869037628174,-0.2538850009441376,0.2947131097316742,-0.3108527958393097,0.24693521857261658,-0.35241639614105225,0.19474062323570251,-0.005465732421725988,0.12644748389720917,-0.425735741853714,0.2520766854286194,-0.11856091767549515,0.35016873478889465,-0.21718020737171173,0.2614199221134186,-0.325335294008255,0.3125927150249481,-0.3723614513874054,0.1828988790512085,-0.19823162257671356,0.3376142382621765,-0.10652992129325867,0.6272397637367249,0.0913720652461052,0.37842991948127747,-0.16785068809986115,0.21571916341781616,-0.21243764460086823,0.26797589659690857,-0.38323432207107544,0.34542328119277954,-0.2710922956466675,0.2321443110704422,-0.2097516655921936,0.20510542392730713,-0.2366805225610733,0.1182258203625679,-0.15574966371059418,0.09192730486392975,-0.21016563475131989,0.14296464622020721,-0.16410313546657562,0.11936134099960327,-0.09284846484661102,0.10752349346876144,-0.07599619776010513,0.0895363986492157,-0.1397227793931961,0.06501501053571701,-0.04909544065594673,0.06753166019916534,-0.04072653874754906,0.024776512756943703,-0.05383822321891785,0.041134901344776154,-0.042768679559230804,0.03429879620671272,-0.02630673721432686,0.032764993607997894,-0.036963701248168945,0.019314760342240334,-0.0231716800481081,0.021281849592924118,-0.03626912087202072,0.024128548800945282,-0.02582327462732792,0.009980779141187668,-0.020274825394153595,0.009034431539475918,-0.017875615507364273,0.017837435007095337,-0.02858753316104412,0.007647209335118532,-0.023683765903115273,0.025999192148447037,-0.04852874204516411,0.03633956238627434,-0.031599316745996475,0.033493418246507645,-0.028565561398863792,0.049409229308366776,-0.05095615237951279,0.023965073749423027,-0.03424285352230072,0.03182487189769745,-0.041494980454444885,0.03044079802930355,-0.026235761120915413,0.019468188285827637,-0.04143877327442169,0.02500281296670437,-0.05995722487568855,0.048613741993904114,-0.06298723071813583,0.023004727438092232,-0.04448230564594269,0.031167717650532722,-0.04603273794054985,0.049801602959632874,-0.03297647833824158,0.039225734770298004,-0.0913715660572052,0.04931625351309776,-0.05191422253847122,0.05941012129187584,-0.058334242552518845,0.04898371174931526,-0.05081583932042122,0.06625691056251526,-0.056134603917598724,0.05583673343062401,-0.0625404641032219,0.03694749251008034,-0.03130088374018669,0.028427673503756523,-0.023408636450767517,0.033633042126894,-0.04304308071732521,0.027117371559143066,-0.035161398351192474,0.04893375560641289,-0.04773229360580444,0.03942998871207237,-0.05968141928315163,0.06539611518383026,-0.057726453989744186,0.07233542203903198,-0.030089525505900383,0.04528769105672836,-0.03591568395495415,0.0431264229118824,-0.04841688275337219,0.027322284877300262,-0.043078817427158356,0.04336690902709961,-0.05940624698996544,0.09943453222513199,-0.07299429923295975,0.0900835171341896,-0.04538865014910698,0.041384339332580566,-0.047082580626010895,0.03754694387316704,-0.06150481849908829,0.038074467331171036,-0.04855518415570259,0.053290486335754395,-0.03270279988646507,0.10572988539934158,-0.060916468501091,0.08761385828256607,-0.09722926467657089,0.08281534910202026,-0.0854344591498375,0.07517237961292267,-0.08712635189294815,0.05244721099734306,-0.03153704106807709,0.06232292950153351,-0.028124405071139336,0.06771941483020782,-0.0471353642642498,0.06460928916931152,-0.07016024738550186,0.03441726043820381,-0.03727676719427109,0.039711304008960724,-0.05002233013510704,0.08988800644874573,-0.09015574306249619,0.06764394789934158,-0.04639018326997757,0.08609610050916672,-0.05717259645462036,0.027462836354970932,-0.04045349732041359,0.02126748487353325,-0.14132092893123627,0.11934663355350494,-0.07607606053352356,0.05269312486052513,-0.08076544851064682,0.015839846804738045,-0.04989670217037201,0.10162825137376785,-0.04529411718249321,0.12430120259523392,-0.14870071411132812,0.11041313409805298,-0.0944393128156662,0.0832442045211792,-0.08662327378988266,0.13837884366512299,-0.05015811696648598,0.06759443879127502,-0.01635076105594635,0.16669625043869019,-0.23002192378044128,0.13271453976631165,-0.08092169463634491,0.10094314813613892,-0.053008001297712326,0.09551988542079926,-0.08743543922901154,0.07239830493927002,-0.07590482383966446,0.10135366022586823,-0.08048120141029358,0.13860048353672028,-0.03863757476210594,0.13667096197605133,-0.11551366746425629,0.07175703346729279,-0.08378273993730545,0.11103273928165436,-0.09745178371667862,0.08375813066959381,-0.10910876840353012,0.10139257460832596,-0.06638539582490921,0.038091015070676804,-0.062442999333143234,0.08394263684749603,-0.07274230569601059,0.03654898330569267,-0.19565585255622864,0.07168294489383698,-0.10440783202648163,0.054670512676239014,-0.031248368322849274,0.06314675509929657,-0.04809824377298355,0.07163776457309723,-0.044070228934288025,0.02902080863714218,-0.045424994081258774,0.038516659289598465,-0.038536861538887024,0.04908144846558571,-0.039082616567611694,0.03490070253610611,-0.023396659642457962,0.0421440415084362,-0.06764428317546844,0.20676453411579132,-0.1815444380044937,0.38458123803138733,-0.3763388395309448,0.29935863614082336,-0.27640002965927124,0.1670072227716446,-0.3327697515487671,0.2970273494720459,-0.267441987991333,0.23311197757720947,-0.3560986816883087,0.23051704466342926,-0.2324809581041336,0.24102172255516052,-0.23404350876808167,0.26816442608833313,-0.31182217597961426,0.18785496056079865,-0.2779523432254791,0.1321076601743698,-0.2003699243068695,0.29721808433532715,-0.24707618355751038,0.25534331798553467,-0.13056151568889618,0.3943847715854645,-0.16295167803764343,0.3111751079559326,-0.25012433528900146,0.30895349383354187,-0.3043992221355438,0.3347455561161041,-0.4457434117794037,0.35339316725730896,-0.3375188708305359,0.2061678171157837,-0.34957846999168396,0.258395254611969,-0.2634948194026947,0.26667964458465576,-0.21895086765289307,0.21166644990444183,-0.320974200963974,0.3055383861064911,-0.31995925307273865,0.3656259775161743,-0.43344348669052124,0.1648542433977127,-0.2635057866573334,0.15174919366836548,-0.12481196969747543,0.09438275545835495,-0.16590145230293274,0.06439316272735596,-0.08986085653305054,0.08925893902778625,-0.10611626505851746,0.02537037990987301,-0.06120164692401886,0.17996057868003845,-0.22656069695949554,0.1154380813241005,-0.07538074254989624,0.08921704441308975,-0.09709282964468002,0.044942233711481094,-0.02160361222922802,0.0295854602009058,-0.02770351991057396,0.05962570011615753,-0.05906112119555473,0.01303865760564804,-0.03389200568199158,0.012528663501143456,-0.021930893883109093,0.00948946550488472,-0.01941172406077385,0.007542829029262066,-0.00949842482805252,0.0106741264462471,-0.011201160959899426,0.06127109006047249,-0.012096252292394638,0.1364249587059021,-0.04208466410636902,0.0683630034327507,-0.06780823320150375,0.03306073322892189,-0.033860091120004654,0.01431027241051197,-0.013813450001180172,0.033986546099185944,-0.023685811087489128,0.044390879571437836,-0.07061643153429031,0.03735288232564926,-0.07247540354728699,0.05890747159719467,-0.028356235474348068,0.03547964617609978,-0.0613652728497982,0.04310297220945358,-0.01769145578145981,0.024676445871591568,-0.02085176296532154,0.030481746420264244,-0.010371174663305283,0.03235422074794769,-0.013841667212545872,0.04285190626978874,-0.04613887518644333,0.05104972794651985,-0.01694415509700775,0.014876442961394787,-0.0790068581700325,0.03817606344819069,-0.026803983375430107,0.038545429706573486,-0.04657917842268944,0.026939449831843376,-0.11191459745168686,0.03958945721387863,-0.04216887429356575,0.05600231513381004,-0.05446479842066765,0.04317425936460495,-0.04722702503204346,0.02701295167207718,-0.03260526806116104,0.0578652061522007,-0.04155896604061127,null,null]; 2 | 3 | const demoXFDFString = `333.61,432.53999999999996;334.31,432.53999999999996;339.92,431.84000000000003;349.03,429.74;374.26,424.13;410.71,414.32;459.77,398.9;475.89,391.89;485.7,388.39;493.41,386.28999999999996;497.61,386.28999999999996;499.02,386.28999999999996;499.02,386.99;499.72,389.78999999999996;502.52,393.3;508.13,398.2;514.43,404.51;522.84,412.91999999999996;531.96,422.73;538.96,431.84000000000003;544.57,442.36;545.97,450.07;546.67,455.66999999999996;546.67,460.58000000000004;546.67,464.78;546.67,466.89;545.27,468.99;545.27,470.39;545.27,474.6;545.27,479.5;545.27,484.40999999999997;543.87,488.61;543.17,492.82;543.17,495.62;542.47,499.13;541.77,501.23;541.77,502.63;541.77,504.73;541.77,507.53999999999996;541.77,510.34000000000003;541.77,513.84;541.77,516.65;541.77,519.45;541.77,522.96;541.77,527.16;543.17,532.77;543.17,536.97;543.87,539.78;544.57,541.1800000000001;544.57,542.58;545.27,543.98;545.27,544.6800000000001;545.97,546.08;545.97,547.49;546.67,549.59;546.67,550.99;546.67,554.49;546.67,557.3;547.37,560.1;547.37,562.2;547.37,565.01;547.37,567.11;545.97,569.21;544.57,571.3199999999999;541.77,574.8199999999999;540.37,576.92;538.26,579.73;536.86,581.13;535.46,582.53;534.06,583.23;533.36,583.93;531.96,583.93;530.55,583.93;528.45,583.93;526.35,583.93;524.25,583.23;522.14,581.83;519.34,580.43;516.54,579.73;511.63,578.32;507.43,577.62;503.92,576.92;499.72,576.22;499.02,576.22;498.31,576.22;498.31,576.22;498.31,576.22;497.61,576.22;496.91,576.22;495.51,576.22;492.01,576.92;490.6,576.92;488.5,577.62;485.7,578.32;483.6,579.02;481.49,579.02;480.09,579.73;478.69,580.43;476.59,581.13;475.89,582.53;473.78,583.23;472.38,584.63;470.98,585.33;470.28,586.73;468.88,588.14;467.48,589.54;466.07,591.64;465.37,593.74;464.67,595.14;464.67,597.25;464.67,597.95;463.97,599.35;463.27,600.75;461.87,603.56;461.17,605.66;460.47,607.76;459.07,609.86;459.07,611.26;458.37,612.67;457.66,614.07;456.96,615.47;456.26,616.87;456.26,617.57;455.56,618.27;455.56,618.27;455.56,618.27;455.56,618.97;454.86,619.67;454.86,620.38;454.16,621.08;454.16,621.78;454.16,623.18;454.16,623.88;453.46,625.28;453.46,626.68;453.46,628.09;453.46,629.49;453.46,629.49;453.46,630.19;453.46,630.89;453.46,631.59;453.46,632.29;453.46,632.99;453.46,632.99;453.46,633.69;452.76,633.69;452.76,632.99;452.76,632.99;452.76,632.99;452.06,632.99;452.06,632.99;452.06,632.99;450.66,632.99;448.55,632.99;445.05,632.99;440.14,632.29;433.13,631.59;427.53,630.89;421.22,630.19;411.41,628.79;406.5,628.79;402.3,628.79;398.79,628.79;398.09,628.79;397.39,628.79;391.78,628.79;385.48,629.49;377.06,630.89;351.83,635.09;335.01,639.3;324.5,640;316.09,640;308.38,640;303.47,640;299.27,640;297.17,640;295.06,640;293.66,640;292.96,640;292.26,640;290.86,640;287.35,640;283.15,640;279.64,640;275.44,640;270.53,640;267.73,640;267.03,640;266.33,640;266.33,640;266.33,640;268.43,640;276.14,638.6;285.25,634.39;291.56,630.89;296.47,626.68;299.27,623.18;299.97,621.08;299.97,617.57;298.57,612.67;293.66,607.76;287.35,602.15;281.05,596.55;276.14,593.74;272.64,590.24;269.13,588.14;265.63,586.03;263.52,584.63;261.42,583.23;258.62,581.13;255.11,579.02;253.01,576.92;251.61,576.22;250.21,574.8199999999999;249.51,574.12;248.81,573.42;248.81,572.72;248.11,572.72;248.11,572.02;248.11,572.02;246,569.21;243.2,566.41;241.1,564.31;239.7,562.9;236.89,560.8;234.09,558.7;230.58,557.3;227.78,555.9;221.47,555.2;215.87,553.79;212.36,553.09;208.86,552.39;204.65,551.69;201.15,551.69;198.34,550.99;194.14,550.99;189.93,550.99;187.13,550.99;183.63,550.99;180.82,550.99;175.22,550.29;171.01,549.59;166.81,548.19;161.2,546.79;155.59,544.6800000000001;150.69,542.58;145.08,539.08;142.28,537.67;138.77,535.5699999999999;137.37,535.5699999999999;133.16,535.5699999999999;127.56,535.5699999999999;121.25,535.5699999999999;107.23,535.5699999999999;98.12,534.87;84.1,533.47;72.19,533.47;65.18,533.47;58.87,533.47;53.27,533.47;51.86,533.47;50.46,533.47;49.06,534.17;47.66,534.17;45.56,534.87;44.15,535.5699999999999;42.75,535.5699999999999;41.35,535.5699999999999;40.65,535.5699999999999;39.95,535.5699999999999;39.25,535.5699999999999;37.85,535.5699999999999;36.44,532.77;34.34,529.96;32.24,527.16;29.44,523.66;27.33,520.85;25.23,518.75;23.13,516.65;21.73,515.25;20.33,513.14;19.62,511.74;19.62,510.34000000000003;18.92,508.24;18.92,506.84000000000003;18.92,505.43;18.92,504.73;18.92,503.33000000000004;18.92,502.63;18.92,502.63;18.92,502.63;19.62,502.63;22.43,502.63;21.03,499.13;18.22,492.82;14.72,485.81;12.62,480.9;9.11,473.9;7.71,468.99;6.31,464.08000000000004;6.31,461.28;6.31,459.88;6.31,457.78;6.31,456.37;7.01,454.27;8.41,452.87;9.11,451.47;9.81,450.77;10.51,450.07;11.21,449.37;12.62,447.96000000000004;13.32,446.56;14.02,445.86;14.72,444.46000000000004;16.12,443.06;18.22,440.25;19.62,438.15;21.73,435.35;23.83,433.25;24.53,431.84000000000003;25.23,430.44;25.93,428.34000000000003;26.63,426.24;27.33,424.13;28.03,422.03;28.74,420.63;32.24,420.63;38.55,419.23;45.56,417.83000000000004;55.37,414.32;69.39,408.01;73.59,405.21000000000004;77.8,402.40999999999997;79.9,400.3;82,398.9;83.4,398.2;85.51,397.5;86.91,396.8;88.31,396.1;89.71,396.1;91.81,395.4;93.92,395.4;95.32,395.4;96.72,394.7;98.12,394.7;100.92,393.3;104.43,391.19;107.93,389.09000000000003;111.44,386.99;114.94,385.59000000000003;116.34,384.89;117.75,384.18;118.45,384.18;124.05,384.18;131.76,384.18;142.28,382.78;149.28,382.08;155.59,381.38;161.9,380.68;165.4,380.68;168.21,380.68;171.01,380.68;171.71,380.68;172.41,380.68;173.81,381.38;175.92,382.78;177.32,384.18;180.12,386.99;183.63,389.78999999999996;187.13,393.3;192.04,396.1;195.54,398.2;201.85,401.71000000000004;203.95,402.40999999999997;206.75,403.11;209.56,403.81;213.06,405.21000000000004;216.57,405.90999999999997;218.67,407.31;222.17,408.71000000000004;224.98,410.12;227.08,410.82;229.18,410.82;230.58,411.52;231.99,412.22;231.99,412.22;231.99,412.22;238.29,415.02;246,418.53;253.01,421.33000000000004;262.12,424.83000000000004;272.64,428.34000000000003;281.75,431.14;292.26,433.95;295.76,435.35;299.27,436.75;301.37,436.75;302.07,437.45;302.77,437.45;302.77,437.45;303.47,438.15;303.47,438.15;304.17,438.15;304.88,438.15;306.28,438.15;306.98,438.15;307.68,437.45;309.08,436.75;309.78,436.05;311.18,435.35;312.59,434.65;313.99,434.65;315.39,433.95;316.79,433.95;318.19,433.25;318.89,433.25;319.59,432.53999999999996;320.29,432.53999999999996;321,432.53999999999996;321.7,432.53999999999996;322.4,432.53999999999996;323.1,432.53999999999996;323.8,432.53999999999996;324.5,432.53999999999996;325.2,432.53999999999996;325.9,432.53999999999996;327.3,432.53999999999996;328,432.53999999999996;329.41,432.53999999999996;330.81,431.84000000000003;331.51,431.84000000000003;332.21,431.84000000000003;332.91,431.14;332.91,431.14;333.61,430.44;333.61,430.44`; 4 | 5 | export { 6 | demoPeaks, 7 | demoXFDFString, 8 | }; -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | html, body, #root { 2 | width: 100%; 3 | height: 100%; 4 | margin: 0; 5 | padding: 0; 6 | font-family: Arial, Helvetica, sans-serif; 7 | } 8 | 9 | .webviewer { 10 | flex: 1; 11 | -webkit-box-shadow: 1px 1px 10px #999; 12 | box-shadow: 1px 1px 10px #999; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | const container = document.getElementById('root'); 7 | const root = createRoot(container); 8 | root.render(); 9 | -------------------------------------------------------------------------------- /tools/copy-webviewer-files.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | 3 | const copyFiles = async () => { 4 | try { 5 | await fs.copy('./node_modules/@pdftron/webviewer/public', './public/webviewer/lib'); 6 | await fs.copy('./node_modules/@pdftron/webviewer/webviewer.min.js', './public/webviewer/lib/webviewer.min.js'); 7 | await fs.copy('./node_modules/@pdftron/webviewer-video/src/lib/api/ServiceWorker/wv-video-injection.js', './public/wv-video-injection.js'); 8 | console.log('WebViewer files copied over successfully'); 9 | } catch (err) { 10 | console.error(err); 11 | } 12 | }; 13 | 14 | copyFiles(); 15 | --------------------------------------------------------------------------------